Развернуть Свернуть

IoInvalidateDeviceRelations routine

The IoInvalidateDeviceRelations routine notifies the PnP manager that the relations for a device (such as bus relations, ejection relations, removal relations, and the target device relation) have changed.

Syntax


VOID IoInvalidateDeviceRelations(
  _In_  PDEVICE_OBJECT DeviceObject,
  _In_  DEVICE_RELATION_TYPE Type
);

Parameters

DeviceObject [in]

Pointer to the PDO for the device.

Type [in]

Specifies a DEVICE_RELATION_TYPE enumeration value that describes the type of relations that have changed. Possible values include BusRelations, EjectionRelations, RemovalRelations, and TargetDeviceRelation. Starting with Windows 7, the PowerRelations value is also supported.

Return value

None

Remarks

For some relation types, such as BusRelations, this routine causes the PnP manager or power manager to gather updated relations information by sending an IRP_MN_QUERY_DEVICE_RELATIONS request to the drivers for the device. For other relation types, such as EjectionRelations, the PnP manager does not need to gather new relation information immediately; the PnP manager queries drivers for ejection relations only when it is preparing to eject a device.

After a bus driver calls IoInvalidateDeviceRelations to inform the PnP manager that a device has disappeared, the bus driver must continue to handle PnP IRPs for that device until it receives an IRP_MN_REMOVE_DEVICE request. In response to this IRP, the bus driver returns STATUS_NO_SUCH_DEVICE. Until the bus driver successfully completes the IRP_MN_REMOVE_DEVICE request, the bus driver can access the device extension to check its flags for the device.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

HwStorPortProhibitedDDIs

See also

IRP_MN_QUERY_DEVICE_RELATIONS
IRP_MN_REMOVE_DEVICE

 

 

Send comments about this topic to Microsoft

Показ:
© 2014 Microsoft