From: Vincent Fatica on 27 Mar 2006 02:41 On Mon, 27 Mar 2006 09:03:09 +0200, "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote: >To summarize : default ( no key ) TO is INFINITIVE ( as Win32 define that ) >and TO can change it to some less infinitive value :) >Arkady That is not in keeping with my experience. With a non-existent registry TO value and an unqualified Sleep(10000) (10 seconds) in the low level keyboard hook callback process, keystrokes seem to get through to apps in considerably less than 1 second. -- - Vince
From: Arkady Frenkel on 27 Mar 2006 03:03 With Sleep you return control to the system , just set while loop and check that Arkady "Vincent Fatica" <abuse(a)localhost.com> wrote in message news:44279743$1(a)news.vefatica.net... > On Mon, 27 Mar 2006 09:03:09 +0200, "Arkady Frenkel" > <arkadyf(a)hotmailxdotx.com> wrote: > >>To summarize : default ( no key ) TO is INFINITIVE ( as Win32 define >>that ) >>and TO can change it to some less infinitive value :) >>Arkady > > That is not in keeping with my experience. With a non-existent registry > TO > value and an unqualified Sleep(10000) (10 seconds) in the low level > keyboard > hook callback process, keystrokes seem to get through to apps in > considerably less than 1 second. > -- > - Vince
From: Vincent Fatica on 27 Mar 2006 10:38 On Mon, 27 Mar 2006 10:03:54 +0200, "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote: >With Sleep you return control to the system , just set while loop and check >that OK, with no registry value, and with this hook: HHOOK hKbHook = NULL; LRESULT CALLBACK KbProc(int nCode, WPARAM wParam, LPARAM lParam ) { for ( LONGLONG i=0; i<5000000000; i++ ); return CallNextHookEx(hKbHook, nCode, wParam, lParam); } set this way: hKbHook = SetWindowsHookEx(WH_KEYBOARD_LL, KbProc, hThisDll, 0); in and by a DLL manually loaded by a console application, the host app shows keystrokes in about 6 seconds (that's how long the loop takes) but all other apps, both GUI and CUI show keystrokes in (apparently) about 1/2 second (obviously slowly, but much quicker than the time to do the loop). So there appears to me to be some default timeout enforced for (at least) all processes but the host one ... and possibly for the host process too (which might be too busy looping to show the keystroke). I am back to square one ... what's the default value of LowLevelHooksTimeout; what's its registry type; is logoff/logon required for changes to it to be effective? -- - Vince
From: Arkady Frenkel on 27 Mar 2006 11:00 No default value otherwise you'll be outof the loop before , set instead your loop just while(true) ; and you'll be there forever. As for key itself that defined as TO value in miliseconds , so set it as DWORD and value of 5000 with stand for 5 sec e.g. Arkady "Vincent Fatica" <abuse(a)localhost.com> wrote in message news:442806f3$1(a)news.vefatica.net... > On Mon, 27 Mar 2006 10:03:54 +0200, "Arkady Frenkel" > <arkadyf(a)hotmailxdotx.com> wrote: > >>With Sleep you return control to the system , just set while loop and >>check >>that > > OK, with no registry value, and with this hook: > > HHOOK hKbHook = NULL; > LRESULT CALLBACK KbProc(int nCode, WPARAM wParam, LPARAM lParam ) { > for ( LONGLONG i=0; i<5000000000; i++ ); > return CallNextHookEx(hKbHook, nCode, wParam, lParam); > } > > set this way: > > hKbHook = SetWindowsHookEx(WH_KEYBOARD_LL, KbProc, hThisDll, 0); > > in and by a DLL manually loaded by a console application, the host app > shows > keystrokes in about 6 seconds (that's how long the loop takes) but all > other > apps, both GUI and CUI show keystrokes in (apparently) about 1/2 second > (obviously slowly, but much quicker than the time to do the loop). > > So there appears to me to be some default timeout enforced for (at least) > all processes but the host one ... and possibly for the host process too > (which might be too busy looping to show the keystroke). > > I am back to square one ... what's the default value of > LowLevelHooksTimeout; what's its registry type; is logoff/logon required > for > changes to it to be effective? > -- > - Vince
From: Vincent Fatica on 27 Mar 2006 11:34 On Mon, 27 Mar 2006 18:00:47 +0200, "Arkady Frenkel" <arkadyf(a)hotmailxdotx.com> wrote: >No default value otherwise you'll be outof the loop before , set instead >your loop just while(true) ; and you'll be there forever. >As for key itself that defined as TO value in miliseconds , so set it as >DWORD and value of 5000 with stand for 5 sec e.g. Similar observation as before ... no registry value ... using HHOOK hKbHook; LRESULT CALLBACK KbProc(int nCode, WPARAM wParam, LPARAM lParam ) { while (TRUE); return CallNextHookEx(hKbHook, nCode, wParam, lParam); } hKbHook = SetWindowsHookEx(WH_KEYBOARD_LL, KbProc, hThisDll, 0); Host app never shows keystrokes, other apps show keystrokes after about 1/2 second. -- - Vince
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Administrator elevation via RPC fails on Vista, why? Next: Memory leak with CreateProcess() |