From: Arkady Frenkel on
So set registry key to 5 sec and check if you'll be back in 5s
Arkady

"Vincent Fatica" <abuse(a)localhost.com> wrote in message
news:44281426$1(a)news.vefatica.net...
> 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


From: Vincent Fatica on
On Tue, 28 Mar 2006 09:13:33 +0200, "Arkady Frenkel"
<arkadyf(a)hotmailxdotx.com> wrote:

>So set registry key to 5 sec and check if you'll be back in 5s
>Arkady

I adjusted the hookproc to handle only keydown:

LRESULT CALLBACK KbProc(int nCode, WPARAM wParam, LPARAM lParam ) {
if ( wParam == WM_KEYDOWN ) while (TRUE);
return CallNextHookEx(hKbHook, nCode, wParam, lParam);
}

The results were similar using REG_DWORD or REG_SZ (logoff/logon required).
I used 2000 and 4000 (decimal). In both cases, the app hosting the hook (a
CUI app) never got keystrokes (or was too busy to show them). Other apps
showed them in about **twice** the time I specified ... for a while that is
(a few minutes) ... then they reverted to showing keystrokes
instantaneously, as if Windows decided the hook was hung and bypassed it
completely; even then, the host app remained useless.

I'm tired of trying to figure this out by experimentation. All aspects of
LowLevelHooksTimeout should be documented.
--
- Vince
From: Arkady Frenkel on
Hi, Vincent!
Agree that all info have to be documented with more detail and you can
submit bug about it through sdkfdbg(a)microsoft.com , but in general TO work
due to your description. BTW I didn't mention that debugging hooks you can
either through logs or I used direct output on the screen, like to show
string "text" in left/top corner of dispay :
HDC hdc = CreateDC( "DISPLAY" , NULL , NULL , NULL ) ;
TextOut( hdc , 0, 0 , "text" , 4 ) ;
DeleteDC( hdc ) ;
Arkady

"Vincent Fatica" <abuse(a)localhost.com> wrote in message
news:44295474$1(a)news.vefatica.net...
> On Tue, 28 Mar 2006 09:13:33 +0200, "Arkady Frenkel"
> <arkadyf(a)hotmailxdotx.com> wrote:
>
>>So set registry key to 5 sec and check if you'll be back in 5s
>>Arkady
>
> I adjusted the hookproc to handle only keydown:
>
> LRESULT CALLBACK KbProc(int nCode, WPARAM wParam, LPARAM lParam ) {
> if ( wParam == WM_KEYDOWN ) while (TRUE);
> return CallNextHookEx(hKbHook, nCode, wParam, lParam);
> }
>
> The results were similar using REG_DWORD or REG_SZ (logoff/logon
> required).
> I used 2000 and 4000 (decimal). In both cases, the app hosting the hook
> (a
> CUI app) never got keystrokes (or was too busy to show them). Other apps
> showed them in about **twice** the time I specified ... for a while that
> is
> (a few minutes) ... then they reverted to showing keystrokes
> instantaneously, as if Windows decided the hook was hung and bypassed it
> completely; even then, the host app remained useless.
>
> I'm tired of trying to figure this out by experimentation. All aspects of
> LowLevelHooksTimeout should be documented.
> --
> - Vince