Home > Archive > Smartphone Developer Forum > April 2006 > Access violation using a keyboard Hook
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Access violation using a keyboard Hook
|
|
| manitoba 2006-04-25, 7:18 pm |
| Hello all,
I'm porting a PocketPC ( program to Smartphone 2003.
This program hooks all keyboard event. Thus I use the unsupported
SetWindowsHookExW function (coredll.dll).
The hook is correctly setted, BUT when I try to access to the LPARAM of
the HookProc (pointer on KBDLLHOOKSTRUCT), I got an Access Violation.
However I CAN read the KBDLLHOOKSTRUCT in the debugger !!
I'm still on the emulator right now.
I guess other people got this problem (several post), but nobody tells
the resolution (if any !!)
Thanks,
Manitoba
| |
| Danny Baumann 2006-04-26, 4:06 am |
| Hi,
> The hook is correctly setted, BUT when I try to access to the LPARAM of
> the HookProc (pointer on KBDLLHOOKSTRUCT), I got an Access Violation.
> However I CAN read the KBDLLHOOKSTRUCT in the debugger !!
You need to have privileged rights to access the KBDLLHOOKSTRUCT. So you
either need all users of your app to have their phones in a one-tier
security model (via SDA_ApplicationUnlock.exe or similar), or you need
to sign your app with a privileged certificate.
HTH
Regards,
Danny
|
|
|
|
|