// wdm.h
typedef struct _TARGET_DEVICE_REMOVAL_NOTIFICATION {
USHORT Version;
USHORT Size;
GUID Event;
PFILE_OBJECT FileObject;
} TARGET_DEVICE_REMOVAL_NOTIFICATION, *PTARGET_DEVICE_REMOVAL_NOTIFICATION;
View the official Windows Driver Kit DDI referenceNo description available.
The TARGET_DEVICE_REMOVAL_NOTIFICATION structure describes a device-removal event. The PnP manager sends this structure to a driver that registered a callback routine for notification of EventCategoryTargetDeviceChange events.
VersionSpecifies the version of the data structure, currently set to 1.
SizeSpecifies the size of the structure, in bytes, including the size of the standard first three members plus the event-specific data.
EventSpecifies a GUID identifying the event: GUID_TARGET_DEVICE_QUERY_REMOVE, GUID_TARGET_DEVICE_REMOVE_COMPLETE, or GUID_TARGET_DEVICE_REMOVE_CANCELLED. These GUIDs are defined in Wdmguid.h.
FileObjectPointer to a file object for the device.
DEVICE_INTERFACE_CHANGE_NOTIFICATION
IoRegisterPlugPlayNotification
TARGET_DEVICE_CUSTOM_NOTIFICATION