المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Again KeyBoar dll



C++ Programming
02-22-2010, 11:41 AM
Hi Member

I found keyboard hook example from codeproject.
Click here
[/URL][[URL="http://www.codeproject.com/KB/system/KeyHook.aspx"] (http://www.codeproject.com/KB/system/KeyHook.aspx)]

And follow these step
1.Copy KeyHook.h, KeyHook.dll, Keyhook.lib into your project directory, add KeyHook.lib into your workspace by "Project - Add to Project - Files", and include KeyHook.h where needed.
2.Call InstallKeyHook to install the hook.
3.Call AddKeyEntry to register key entries which consist of information on what kinds of keyboard events should be captured and whom should be notified.
4.Call GetKeyEventResult to retrieve information of the captured key events after your application window receives the notification messages, with values of the wParam and lParam unaltered.
5.Call UninstallKeyHook to release resources as soon as you've finished using the hook.
But Nothing happen.
I just want to get key when Key is press on application(
application may be notepad,word or internet explorer).please help me