Hello,

I'm currently trying to handle USB HID device notifications using HID library from Windows Development Kit.
I'm using a HID device (SpacePoint Fusion, for those who are interested) and I can detect it, open it and read data from it without any issue.
My problem is concerning RegisterDeviceNotification function, which enables to get noticed when an event has occured concerning the device (eg. connection/disconnection).

Everything works fine for a MFC application, but not for a Win32 console application.
The first parameter of RegisterDeviceNotification method is the handle of the window that will process the events. So I'm using the handle of the window console, the return of the function (HDEVNOTIFY type) seems to notice me that everything went fine since GetLastError() returns 0.
The problem is that the message processing function (WindowProc) is never called, so I don't have any chance to see a WM_DEVICECHANGE event happen.

Does anyone has an idea for this issue ?

Regards,
Aymeric.