Microsoft KB Archive/263054

{|
 * width="100%"|

DOC: Windows 9x: WM_DEVICECHANGE DBT_xxx lParam Values

 * }

Q263054

-

The information in this article applies to:


 * Microsoft Platform Software Development Kit (SDK)
 * Microsoft Windows 95 Driver Development Kit (DDK)
 * Microsoft Windows 98 Driver Development Kit (DDK)

-

SUMMARY
The Win32 SDK incorrectly documents the lParam value for some WM_DEVICECHANGE messages. In particular, WM_DEVICECHANGE messages with the following wParam values have incorrect lParam values listed in the SDK:


 * DBT_DEVICEARRIVAL
 * DBT_QUERYREMOVE
 * DBT_QUERYREMOVEFAILED
 * DBT_DEVICEREMOVECOMPLETE
 * DBT_DEVICEREMOVEPENDING

For these messages, the SDK states that the lParam value is set to the address of a DEV_BROADCAST_HDR structure. In fact, in Microsoft Windows 95 and Microsoft Windows 98, Configuration Manager sets the lParam value to the address of a DEV_BROADCAST_DEVNODE structure, as defined in the Dbt.h file. The dbcd_devicetype element of this structure is set to DBT_DEVTYP_DEVNODE, and the dbcd_devnode element contains the actual devnode of the device.