_DEV_BROADCAST_USERDEFINED structure (dbt.h)
Contains the user-defined event and optional data associated with the DBT_USERDEFINED device event.
Syntax
struct _DEV_BROADCAST_USERDEFINED {
struct _DEV_BROADCAST_HDR dbud_dbh;
char dbud_szName[1];
};
Members
dbud_dbh
Information about the device affected by a WM_DEVICECHANGE message as specified by the DEV_BROADCAST_HDR structure. Because _DEV_BROADCAST_USERDEFINED is variable length, the dbch_size member of the dbud_dbh structure must be the size in bytes of the entire structure, including the variable length portion.
dbud_szName[1]
A pointer to a case-sensitive, null-terminated string that names the message. The string must consist of the vendor name, a backslash, followed by arbitrary user-defined null-terminated text.
Remarks
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;
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP |
Minimum supported server | Windows Server 2003 |
Header | dbt.h |