Hi Roman,
you missunderstood me.
Your demos all run fine - that´s not the problem. And for sure I took a look into the source codes.
I think it would be more clear if you run my attached demo application.
Let me explain what I wanna do:
If a user plug in a new serial port (USB / Serial converter) or a new HID device I need a popup which shows details about that device. One thing I wanna show is the friendly name of the device.
To achieve this I want to use the WM_DEVICECHANGE windows message. But HID devices only send DBT_DEVNODES_CHANGED (what I need is DBT_DeviceArrival, DBT_DeviceRemoveComplete to get device details). So how can I read the device details after plugin the device?