PFNKSDEVICEPNPSTART callback function (ks.h)

An AVStream minidriver's AVStrMiniDeviceStart routine is called when an IRP_MN_START_DEVICE request is sent for a specified device.

Syntax

PFNKSDEVICEPNPSTART Pfnksdevicepnpstart;

NTSTATUS Pfnksdevicepnpstart(
  [in]           PKSDEVICE Device,
  [in]           PIRP Irp,
  [in, optional] PCM_RESOURCE_LIST TranslatedResourceList,
  [in, optional] PCM_RESOURCE_LIST UntranslatedResourceList
)
{...}

Parameters

[in] Device

Pointer to a KSDEVICE structure describing the device to be started.

[in] Irp

Pointer to the IRP_MN_START_DEVICE that was received.

[in, optional] TranslatedResourceList

Pointer to a CM_RESOURCE_LIST structure that contains the translated resource list extracted from Irp. Equals NULL if Device has no assigned resources. Optional.

[in, optional] UntranslatedResourceList

Pointer to a CM_RESOURCE_LIST structure that contains the untranslated resource list extracted from Irp. Equals NULL if the KSDEVICE member of this parameter list has no assigned resources. Optional.

Return value

Should return STATUS_SUCCESS or the error code that was returned from the attempt to perform the operation. The start is guaranteed to succeed if the routine returns a successful status code. Do NOT return STATUS_PENDING.

Remarks

Specify this routine's address in the Start member of its KSDEVICE_DISPATCH structure.

Typically, this routine is used by minidrivers that must evaluate assigned resources. Resource lists are extracted from Irp for the convenience of the minidriver. A minidriver can parse the resource list to find the interrupt assigned to the device, as well as the physical address of memory resources.

Minidrivers may use this routine to allocate context information to associate with the AVStream device. (This is similar to a minidriver under stream class using the device extension to store context information.)

Note that STATUS_PENDING is not a legal return code from this function. To perform actions in the context of a worker thread before AVStream has completed start actions such as enabling device interfaces, use a post start dispatch. See AVStrMiniDevicePostStart.

This routine is optional.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Desktop
Header ks.h (include Ks.h)

See also

CM_RESOURCE_LIST

KSDEVICE_DISPATCH