TARGET_DEVICE_CUSTOM_NOTIFICATION structure (wdm.h)
The TARGET_DEVICE_CUSTOM_NOTIFICATION structure describes a custom device event.
Syntax
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;
Members
Version
Specifies the version of the data structure, currently 1.
Size
Specifies the size of the structure, in bytes, including the first three standard members plus the event-specific data.
Event
Specifies a GUID identifying the event. GUIDs for custom event notification are defined by the components that use this mechanism.
FileObject
Pointer to a file object for the device.
NameBufferOffset
Specifies the offset, in bytes, from beginning of CustomDataBuffer where text begins. A value of -1 indicates that there is no text.
CustomDataBuffer[1]
A variable-length buffer, optionally containing binary data at the start of the buffer, followed by an optional text buffer (word-aligned).
Remarks
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.
Requirements
Requirement | Value |
---|---|
Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
See also
IoRegisterPlugPlayNotification