Export (0) Print
Expand All

AVStrMiniDeviceStart routine

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

Syntax


PFNKSDEVICEPNPSTART AVStrMiniDeviceStart;

NTSTATUS AVStrMiniDeviceStart(
  _In_      PKSDEVICE Device,
  _In_      PIRP Irp,
  _In_opt_  PCM_RESOURCE_LIST TranslatedResourceList,
  _In_opt_  PCM_RESOURCE_LIST UntranslatedResourceList
)
{ ... }

Parameters

Device [in]

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

Irp [in]

Pointer to the IRP_MN_START_DEVICE that was received.

TranslatedResourceList [in, optional]

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 [in, optional]

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

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

See also

KSDEVICE_DISPATCH
CM_RESOURCE_LIST

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft