- Fix ATOM check for HCBT_CREATEWND callback.

svn path=/trunk/; revision=41615
This commit is contained in:
James Tabor 2009-06-25 21:00:16 +00:00
parent f1ab1a2cae
commit 576c4e61fe

View file

@ -377,15 +377,19 @@ co_IntCallHookProc(INT HookId,
ArgumentLength += WindowName.Length + sizeof(WCHAR); ArgumentLength += WindowName.Length + sizeof(WCHAR);
} }
if (Ansi) if (! IS_ATOM(CbtCreateWnd->lpcs->lpszClass))
RtlInitAnsiString(asClassName, (PCSZ)CbtCreateWnd->lpcs->lpszClass);
else
RtlInitUnicodeString(&ClassName, CbtCreateWnd->lpcs->lpszClass);
if (! IS_ATOM(ClassName.Buffer))
{ {
if (Ansi)
{
RtlInitAnsiString(asClassName, (PCSZ)CbtCreateWnd->lpcs->lpszClass);
ArgumentLength += ClassName.Length + sizeof(CHAR);
}
else
{
RtlInitUnicodeString(&ClassName, CbtCreateWnd->lpcs->lpszClass);
ArgumentLength += ClassName.Length + sizeof(WCHAR); ArgumentLength += ClassName.Length + sizeof(WCHAR);
} }
}
break; break;
default: default:
DPRINT1("Trying to call unsupported CBT hook %d\n", Code); DPRINT1("Trying to call unsupported CBT hook %d\n", Code);