how can I get programmatically the device status (status code) of all the devices listed in the Device Manager of Windows 2000?
For Windows 9x and NT I found it in the registry.

(9x)
HKEY_DYN_DATA\ConfigManager\Enum\xxxx\Problem

(NT)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\xxx\xxx\Problem