Sign in to follow this  
n0ob

Windows message hook..

Recommended Posts

n0ob    176
Hey there! I recently got a laptop, but there is no windows key on the bottom where I like it :( Instead, there's the 'Fn' key, so what I'm trying to do is write a message hook to intercept the message. From there I can emulate a windows key event. I've used Spy++ to watch messages, and I've determined that there's a WM_USER+4097 message that's sent to certain programs (such as a program called "Fn-esse" installed on my laptop which lets you configure function key combos to execute commands). I want to get this message! I've used low-level keyboard hooks before, and I've been trying to use it again, or the WH_CALLWNDPROC hook... but I'm having no luck. In fact, I keep crashing explorer and visual studio.. At one time I couldn't get the keyboard hook to work because it would crash, but then I switched the project back to ASCII single-byte shizzle (thanks 2005..) and it worked. Buuut, it's still crashing for the other hooks I've been trying. Does anyone have any tips on how I can determine when the Fn key is pressed? If hooks are the answer, why do you suppose I'm crashing? I'm calling CallNextHookEx when nCode is less than 0 like they say you should.. Thanks for your time!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this