Re: hooks help

  • From: Veli-Pekka Tätilä <vtatila@xxxxxxxxxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Thu, 13 Dec 2007 22:06:16 +0200

Hi Tyler,
I played around with other kinds of Win32 hooks some years back and even
wrote a small uni paper about it in Finnish. My idea was to see if it
would be possible to do basic screen reading of menus and dialog
controls based on focus tracking, and yup that's possible, though MSAA
and other accessibility APIs should be preferred, of course. There's a
rough ENglish translation on-line, which might be able to solve some of
your issues. I knew virtually nothing about Win32 on writing this thing,
so my first project turned out to be pretty low level, it does work,
however.Well, here it is:

http://tols17.oulu.fi/~vtatila/ohjy/english/

MIcrosot has a great but old article on hooks here:

http://msdn2.microsoft.com/en-us/library/ms997537.aspx

Also Google for 

site:www.codeproject.com +hook +dll

Lots of very useful results and sample code there.

-- 
With kind regards Veli-Pekka Tätilä (vtatila@xxxxxxxxxxxxxxxxxxxx)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila

"Littlefield, Tyler" wrote:
>I've got an issue.
>I wrote a keyboard hook, and it seems to be working, though I don't think I 
>wrote the hook proc right.
>Help would be awesome.
>
>
>/*hook procedure*/
>LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam) {
> LRESULT mx;
>mx=(CallNextHookEx(NULL, code,wParam,lParam));
>if (mx==HC_ACTION) {
> Print((char)wParam);
>return (CallNextHookEx(NULL, code,wParam,lParam));
>}
>/*hook code end*/
>
>I use print, just to print the code to a file, but convert it.
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: