mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[Win32k]
- Fix typos found by Mephisto on IRC, also add some debug prints in SetWindowsHookEx to see what hooks are installed. svn path=/trunk/; revision=49269
This commit is contained in:
parent
ba351010ec
commit
4f65bd047d
2 changed files with 8 additions and 3 deletions
|
@ -503,7 +503,7 @@ co_IntCallHookProc(INT HookId,
|
|||
RtlCopyMemory( &CbtCreatewndExtra->Cs, CbtCreateWnd->lpcs, sizeof(CREATESTRUCTW) );
|
||||
CbtCreatewndExtra->WndInsertAfter = CbtCreateWnd->hwndInsertAfter;
|
||||
Extra = (PCHAR) (CbtCreatewndExtra + 1);
|
||||
CbtCreatewndExtra->Cs.lpszClass = ClassName.Buffer; // if Atom
|
||||
CbtCreatewndExtra->Cs.lpszClass = CbtCreateWnd->lpcs->lpszClass; // if Atom
|
||||
|
||||
if (Ansi)
|
||||
{
|
||||
|
@ -517,7 +517,7 @@ co_IntCallHookProc(INT HookId,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (asWindowName.Buffer)
|
||||
if (WindowName.Buffer)
|
||||
RtlCopyMemory(Extra, WindowName.Buffer, WindowName.Length);
|
||||
CbtCreatewndExtra->Cs.lpszName = (LPCWSTR) (Extra - (PCHAR) CbtCreatewndExtra);
|
||||
Extra += WindowName.Length;
|
||||
|
@ -526,7 +526,7 @@ co_IntCallHookProc(INT HookId,
|
|||
Extra += sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (!IS_ATOM(ClassName.Buffer))
|
||||
if (!IS_ATOM(CbtCreateWnd->lpcs->lpszClass))
|
||||
{
|
||||
if (Ansi)
|
||||
{
|
||||
|
|
|
@ -1178,6 +1178,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_MOUSE_LL ||
|
||||
HookId == WH_SYSMSGFILTER)
|
||||
{
|
||||
DPRINT1("Local hook installing Global HookId: %d\n",HookId);
|
||||
/* these can only be global */
|
||||
SetLastWin32Error(ERROR_GLOBAL_ONLY_HOOK);
|
||||
RETURN( NULL);
|
||||
|
@ -1196,6 +1197,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
|
||||
if ( pti->rpdesk != ptiCurrent->rpdesk) // gptiCurrent->rpdesk)
|
||||
{
|
||||
DPRINT1("Local hook wrong desktop HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
@ -1212,6 +1214,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_FOREGROUNDIDLE ||
|
||||
HookId == WH_CALLWNDPROCRET) )
|
||||
{
|
||||
DPRINT1("Local hook needs hMod HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
@ -1245,6 +1248,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_FOREGROUNDIDLE ||
|
||||
HookId == WH_CALLWNDPROCRET) )
|
||||
{
|
||||
DPRINT1("Global hook needs hMod HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
@ -1376,6 +1380,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
else
|
||||
Hook->offPfn = 0;
|
||||
|
||||
DPRINT1("Installing: HookId %d Global %s\n", HookId, !ThreadId ? "TRUE" : "FALSE");
|
||||
RETURN( Handle);
|
||||
|
||||
CLEANUP:
|
||||
|
|
Loading…
Reference in a new issue