1

I am monitoring HID connections using EnumDevices(..., DIEDFL_ATTACHEDONLY). When I disconnect a game controller it no longer shows up in the callback. However, when I disconnect the keyboard, it still shows up in EnumDevices.

I've looked through the API, but I don't see where else to query if a device is connected.

RunHolt
  • 1,892
  • 2
  • 19
  • 26
  • Does it happen often that users disconnect keyboards while using your application? ;-) – Cameron Feb 17 '12 at 18:59
  • My application will capture all keyboard state and will replicate it on non-PC platforms. This includes connect and disconnect. – RunHolt Feb 17 '12 at 19:01

1 Answers1

0

What about http://msdn.microsoft.com/en-us/library/windows/desktop/aa363432%28v=vs.85%29.aspx

You can subscribe to any device notifications like attach,detach,etc...

rkosegi
  • 14,165
  • 5
  • 50
  • 83
  • Since I am a console application, I don't have a message processing loop. Is there another alternative, or is there a simple way to add a message loop to a console application. – RunHolt Feb 17 '12 at 20:41