Jump to content

Typecasting lParam to PKBDLLHOOKSTRUCT

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Buttacup

Buttacup

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
I have a low level keyboard hook and everything works fine except that when I cast the lParam to KBDLLHOOKSTRUCT I either get nothing or garble??? Any ideas?? Could it have anything to do with the fact that I'm running Vista??

lParam=2490369

PKBDLLHOOKSTRUCT p = reinterpret_cast < PKBDLLHOOKSTRUCT > (lParam);

cannot evaluate or garble ??

I'm getting the virtual key code out on the wParam and no scan code in and where the Typecast is evaluated..... I need to access all the nice info from the supposed to be lParam..... I may just be lost again, it happens :P

[DELETE_MB] Hook[IDM_KEYBOARD_LL].type=WH_KEYBOARD; <= oh noes I must of ctrl z it back into existence and it's only global :(

Edited by Buttacup, 01 December 2009 - 01:04 AM.


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Can you show us more of your code?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Buttacup

Buttacup

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
As I am not sure how I am going to want to set up the injection process of WH_KEYBOARD_LL I have reverted for now to a WH_KEYBOARD procedure. I had read that WH_KEYBOARD_LL was only global but I had forgotten when it came time for implementation. It would be nice to set up the low level call back as I could support a wider range of interfacing devices..... Future revision! :P

thx as always...