PFNKSDEVICEPNPSTART callback function

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(
  PKSDEVICE Device,
  PIRP Irp,
  PCM_RESOURCE_LIST TranslatedResourceList,
  PCM_RESOURCE_LIST UntranslatedResourceList
)
{...}

Parameters

Device

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

Irp

Pointer to the IRP_MN_START_DEVICE that was received.

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.

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

   
Windows version 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