Dear Greats,

Objective of my application is to detect the USB keyboard attach and
detach.

What we think is, the KBDHID.dll driver will be loaded and unloaded on
attach and detach respectively. So we added a "PostMessage" on the
Attach and Detach functions.

This works fine if we attach/detach the keyboard once the OS is up.

An exception is coming if we connect the USB keyboard and boot the
terminal. I think the PostMessage service is not available at that boot
time.

[First Chance exception in NK.exe (0xC000001C: Invalid System Service)]

Kindly advice me how to over come this or any other method is available
to meet the objective.

avkumar

Re: PostMessage From USB KBDHID.dll Exception by Tom

Tom
Thu Jan 05 07:42:05 CST 2006

You can use IsAPIReady to see if the required system components are loaded
and ready for use. For PostMessage, you'll probably want to check
IsAPIReady(SH_WMGR).

Tom Gensel (eMVP)