CM_NOTIFY_EVENT_DATA structure (cfgmgr32.h)
This is a device notification event data structure.
Syntax
typedef struct _CM_NOTIFY_EVENT_DATA {
CM_NOTIFY_FILTER_TYPE FilterType;
DWORD Reserved;
union {
struct {
GUID ClassGuid;
WCHAR SymbolicLink[ANYSIZE_ARRAY];
} DeviceInterface;
struct {
GUID EventGuid;
LONG NameOffset;
DWORD DataSize;
BYTE Data[ANYSIZE_ARRAY];
} DeviceHandle;
struct {
WCHAR InstanceId[ANYSIZE_ARRAY];
} DeviceInstance;
} u;
} CM_NOTIFY_EVENT_DATA, *PCM_NOTIFY_EVENT_DATA;
Members
FilterType
The CM_NOTIFY_FILTER_TYPE from the CM_NOTIFY_FILTER structure that was used in the registration that generated this notification event data.
Reserved
Reserved. Must be 0.
u
A union that contains information about the notification event data. To determine which member of the union to examine, check the FilterType of the event data.
u.DeviceInterface
Examine this part of the union when the FilterType is CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE.
u.DeviceInterface.ClassGuid
The GUID of the device interface class for the device interface to which the notification event data pertains.
u.DeviceInterface.SymbolicLink[ANYSIZE_ARRAY]
The symbolic link path of the device interface to which the notification event data pertains.
u.DeviceHandle
Examine this part of the union when the FilterType is CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE and the notification action is CM_NOTIFY_ACTION_DEVICECUSTOMEVENT.
u.DeviceHandle.EventGuid
The GUID for the custom event.
u.DeviceHandle.NameOffset
The offset of an optional string buffer. Usage depends on the contract for the EventGuid.
u.DeviceHandle.DataSize
The number of bytes that can be read from the Data member.
u.DeviceHandle.Data[ANYSIZE_ARRAY]
Optional binary data. Usage depends on the contract for the EventGuid.
u.DeviceInstance
Examine this part of the union when the FilterType is CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE.
u.DeviceInstance.InstanceId[ANYSIZE_ARRAY]
The device instance ID of the device to which the notification event data pertains.
Remarks
The notification callback supplied to CM_Register_Notification receives a pointer to a structure of type CM_NOTIFY_EVENT_DATA in the callback's EventData parameter.
Requirements
Requirement | Value |
---|---|
Header | cfgmgr32.h |