AVStrMiniDeviceQueryRemove routine

An AVStream minidriver's AVStrMiniDeviceQueryRemove is called when an IRP_MN_QUERY_REMOVE_DEVICE is dispatched by the device.

Syntax


PFNKSDEVICEIRP AVStrMiniDeviceQueryRemove;

NTSTATUS AVStrMiniDeviceQueryRemove(
  _In_  PKSDEVICE Device,
  _In_  PIRP Irp
)
{ ... }

Parameters

Device [in]

Pointer to the KSDEVICE that dispatched the IRP_MN_QUERY_REMOVE_DEVICE.

Irp [in]

The IRP_MN_QUERY_REMOVE_DEVICE issued by Device.

Return value

Should return STATUS_SUCCESS or the error code that was returned from the attempt to perform the operation. Return success if the device can be removed (or drivers can be updated) without disrupting the machine. If this is not the case, return an appropriate error code.

Remarks

The minidriver specifies this routine's address in the QueryRemove member of its KSDEVICE_DISPATCH structure.

This routine is called when an IRP_MN_QUERY_REMOVE_DEVICE is dispatched by the device. It will usually be provided by minidrivers that want to prevent removal of the device or by minidrivers that must disallow activity that would otherwise prevent them from committing to a device removal operation. If this routine is not provided, AVStream will assume that the device can commit to a removal.

The routine is called at IRQL = PASSIVE_LEVEL and may not return STATUS_PENDING; a success code indicates that the device can commit to a removal and an error code indicates that it cannot.

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)

IRQL

PASSIVE_LEVEL (See Remarks section)

See also

KSDEVICE_DISPATCH
KSDEVICE

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.