IOCTL INTERNAL KEYBOARD DISCONNECT not received

Hello all,

In kbfiltr source code, there is a function that gets internal IOCTL commands. I tried using this code to check which KBs are plugged in and which are disconnected.

When I plug-in a USB KB, the IOCTL INTERNAL KEYBOARD CONNECT is received but when I unplug the USB KB it does not go to the IOCTL INTERNAL KEYBOARD DISCONNECT?

Do you guys know why?

Thanks!

I really need to know if a new device has been connected using the kbfiltr source code.
Thanks!

The disconnect ioctl is never sent. When a keyboard is unplugged, the pnp stack is turn down. Except for the ps2 keyboard. Ps2 is not a hot plug bus and does not detect the keyboard is gone and will happily go along until the device is plugged in again.

d

debt from my phone

-----Original Message-----
From: xxxxx@yahoo.com
Sent: Saturday, June 11, 2011 3:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IOCTL INTERNAL KEYBOARD DISCONNECT not received

Hello all,

In kbfiltr source code, there is a function that gets internal IOCTL commands. I tried using this code to check which KBs are plugged in and which are disconnected.

When I plug-in a USB KB, the IOCTL INTERNAL KEYBOARD CONNECT is received but when I unplug the USB KB it does not go to the IOCTL INTERNAL KEYBOARD DISCONNECT?

Do you guys know why?

Thanks!

I really need to know if a new device has been connected using the kbfiltr source code.
Thanks!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

hello doron,

do you know how I can know if a KB is unplugged on the pc?

thanks!

For a USB keyboard you will get a surprise remove/remove irp sequence (in kmdf this is abstracted as a d3final d0exit callback and then destroying the wdfdevice which calls your cleanup routine). For a ps2 keyboard there is no way to detect removal, the fdo doesn’t know it is gone either.

d

debt from my phone

-----Original Message-----
From: xxxxx@yahoo.com
Sent: Sunday, June 12, 2011 12:04 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] IOCTL INTERNAL KEYBOARD DISCONNECT not received

hello doron,

do you know how I can know if a KB is unplugged on the pc?

thanks!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

hello doron,

sorry but can you pls elaborate more on the “in kmdf
this is abstracted as a d3final d0exit callback and then destroying the
wdfdevice which calls your cleanup routine”

I don’t quite get it… :frowning:

thanks