| Platform SDK: Hardware |
The _DEV_BROADCAST_USERDEFINED structure contains the user-defined event and optional data associated with the DBT_USERDEFINED device event.
typedef struct _DEV_BROADCAST_USERDEFINED {
struct _DEV_BROADCAST_HDR dbud_dbh;
char dbud_szName[1]; // name string
// BYTE dbud_rgbUserDefined[]; // optional user-defined data
};
"WidgetWare\QueryScannerShutdown"
– Or –
"WidgetWare\Video Q39S\AdapterReady"
Because this structure contains variable length fields, use it as a template for creating a pointer to a user-defined structure. Note that the structure must not contain pointers. The following example shows such a user-defined structure.
#define NAME_LENGTH 32
#define USER_LENGTH 50
typedef struct tagWIDGET_WARE_DEV_BROADCAST_USERDEFINED
{
struct _DEV_BROADCAST_HDR DBHeader;
char szName[NAME_LENGTH]
BYTE UserDefined[USER_LENGTH];
} WIDGET_WARE_DEV_BROADCAST_USERDEFINED;
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Dbt.h.
Device Management Overview, Device Management Structures, DBT_USERDEFINED, DEV_BROADCAST_HDR, WM_DEVICECHANGE