// wdm.h
typedef struct _TARGET_DEVICE_CUSTOM_NOTIFICATION {
USHORT Version;
USHORT Size;
GUID Event;
PFILE_OBJECT FileObject;
LONG NameBufferOffset;
UCHAR CustomDataBuffer[1];
} TARGET_DEVICE_CUSTOM_NOTIFICATION, *PTARGET_DEVICE_CUSTOM_NOTIFICATION;
View the official Windows Driver Kit DDI referenceNo description available.
The TARGET_DEVICE_CUSTOM_NOTIFICATION structure describes a custom device event.
VersionSpecifies the version of the data structure, currently 1.
SizeSpecifies the size of the structure, in bytes, including the first three standard members plus the event-specific data.
EventSpecifies a GUID identifying the event. GUIDs for custom event notification are defined by the components that use this mechanism.
FileObjectPointer to a file object for the device.
NameBufferOffsetSpecifies the offset, in bytes, from beginning of CustomDataBuffer where text begins. A value of -1 indicates that there is no text.
CustomDataBufferA variable-length buffer, optionally containing binary data at the start of the buffer, followed by an optional text buffer (word-aligned).
Kernel-mode components use this structure for custom event notification: to signal a custom event (IoReportTargetDeviceChange[Asynchronous]) and when handling a custom event (in a notification callback routine).
This structure accommodates both a variable-length binary data buffer and a variable-length Unicode text buffer. The NameBufferOffset must indicate where the text buffer begins, so the data can be delivered in the appropriate format (ANSI or Unicode) to user-mode applications that registered for handle-based notification with RegisterDeviceNotification. See also RegisterDeviceNotification.
IoRegisterPlugPlayNotification
IoReportTargetDeviceChangeAsynchronous