AVStrMiniDeviceQueryRemove routine

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


PFNKSDEVICEIRP AVStrMiniDeviceQueryRemove;

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


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.


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.



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


Ks.h (include Ks.h)


PASSIVE_LEVEL (See Remarks section)

See also




Send comments about this topic to Microsoft

© 2014 Microsoft. All rights reserved.