FAQ's

From time to time I receive questions that are submitted from this blog related to my old blog, so I have decided to create this post as a place holder for the answers. I will continue updating this post by adding answers to the questions as they come along.

Q: When I use your HookKeys class that you posted on your old blog, but it doesn't work on my smartphone device.

A: When running this code on smarthone (WM Standard) devices, the SetWindowsHookEx API function requires that your application to be signed with at least the developer certificate.

 

Q: I am writing an application on windows mobile phone (smartphone) . When my app is running if I press the VK_TEND/VK_F4 key ( red button on the phone ), our window gets the message "0xC003"(49155). But I am not able to figure out what message is this. How can capture this message?

A: Please see the post about creating keyboard hooks on WM.

 

Q: In your blog post about keyboard hooks you mention that something is missing. What is it?

A: The code that is provided in this blog should be functional. The only part is missing is the code that implements IDisposable interface to handle the scenarios when the HookKeys class goes out of scope and you should unhook messages in the Dispose method.