I'm trying to write an application that benchmarks the time it takes to fully load WinMe's helpctr.exe program (Help and Support Center). I'm having a bit of trouble getting my mind around setting windows hooks using the Win32::API perl library. Also, confused as to the best way one would determine which "handle to application instance" I should pass SetWindowsHookEx. Would I need to determine which DLL's helpctr.exe uses? Can one get this from knowing the window handle for helpctr?
use Win32::API; use strict; # # Omitted code: # (1) start the helpctr.exe process # (2) create time 0 benchmark object # # SetWindowsHookEx prototype info - # HHOOK SetWindowsHookEx ( # int idHook, // hook type # HOOKPROC lpfn, // hook procedure # HINSTANCE hMod, // handle to application instance # DWORD dwThreadId // thread identifier # ); # use constant WH_CALLWNDPROCRET => 12; my $SetWindowsHookEx = new Win32::API( "user32", "SetWindowsHookEx", [qw(I P N N)], 'N'); # how to determine hInstance(s) of helpctr for the following call? my $Hook = $SetWindowsHookEx->Call( WH_CALLWNDPROCRET, 'CallWndRetProc', $hInstance, 0); </b> Am I right in thinking that the best way to determine the state of the window is to evaluate all the return values of the message processed by that window? Thanks much. Marshall Random thot - it would be really cool if this site used something like the GURPs system for tracking the monastic ascension of users - something like the character development in the PC game "Fallout".
In reply to Inspecting messages using Win32::API by mtaylor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |