According to MSDN documentation, SetupDiGetClassDevs can be passed a device instance ID to obtain a device information set for a specific device:
To return only a specific device, set
the DIFCF_DEVICEINTERFACE flag and use
the Enumerator parameter to supply the
device instance ID of the device.
I get the device instance ID by...
I've been playing with the SetupApi on Windows 2003 over the last couple of days, and I'm seeing a bunch of errors I'm not expecting. For example, if I pass GUID_NULL to SetupDiGetClassDescription, it returns FALSE and GetLastError() returns 0xE0000206.
The GUID_NULL came from SetupDiEnumDeviceInfo; I'm not doing this deliberately.
I'v...
I am trying to develop a C# application that can communicate with a USB HID. I have overriden my WndProc method so that is catches all of the WM_DEVICECHANGE events and passes the DeviceChange method to a method OnDeviceChange (this code is actually borrowed from Jan Axelson) which looks like this....
protected override void WndProc( re...
I'm curious as to how WMI works. Particularly, I am currently using WMI to query for the physical monitors via "Select * from Win32_DesktopMonitor" as it has consistently given me the correct result across multiple platforms since I want to know the count of physical monitors and not virtual monitors returned by functions like GetSystem...