DEV_BROADCAST_HDR structure (dbt.h)

Serves as a standard header for information related to a device event reported through the WM_DEVICECHANGE message.

The members of the DEV_BROADCAST_HDR structure are contained in each device management structure. To determine which structure you have received through WM_DEVICECHANGE, treat the structure as a DEV_BROADCAST_HDR structure and check its dbch_devicetype member.

Syntax

typedef struct _DEV_BROADCAST_HDR {
  DWORD dbch_size;
  DWORD dbch_devicetype;
  DWORD dbch_reserved;
} DEV_BROADCAST_HDR;

Members

dbch_size

The size of this structure, in bytes.

If this is a user-defined event, this member must be the size of this header, plus the size of the variable-length data in the _DEV_BROADCAST_USERDEFINED structure.

dbch_devicetype

The device type, which determines the event-specific information that follows the first three members. This member can be one of the following values.

Value Meaning
DBT_DEVTYP_DEVICEINTERFACE
0x00000005
Class of devices. This structure is a DEV_BROADCAST_DEVICEINTERFACE structure.
DBT_DEVTYP_HANDLE
0x00000006
File system handle. This structure is a DEV_BROADCAST_HANDLE structure.
DBT_DEVTYP_OEM
0x00000000
OEM- or IHV-defined device type. This structure is a DEV_BROADCAST_OEM structure.
DBT_DEVTYP_PORT
0x00000003
Port device (serial or parallel). This structure is a DEV_BROADCAST_PORT structure.
DBT_DEVTYP_VOLUME
0x00000002
Logical volume. This structure is a DEV_BROADCAST_VOLUME structure.

dbch_reserved

Reserved; do not use.

Requirements

Requirement Value
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Header dbt.h

See also

DEV_BROADCAST_DEVICEINTERFACE

DEV_BROADCAST_HANDLE

DEV_BROADCAST_OEM

DEV_BROADCAST_PORT

DEV_BROADCAST_VOLUME

WM_DEVICECHANGE