user32/tests: Skip DefWindowProc tests on Vista+.

This commit is contained in:
Greg Geldorp 2011-01-02 10:55:48 +01:00 committed by Alexandre Julliard
parent 9c9762d1ab
commit 4856c299ba
1 changed files with 47 additions and 35 deletions

View File

@ -617,6 +617,7 @@ static void test_builtinproc(void)
static const WCHAR classW[] = {'d','e','f','t','e','s','t',0};
WCHAR unistring[] = {0x142, 0x40e, 0x3b4, 0}; /* a string that would be destroyed by a W->A->W conversion */
WNDPROC pDefWindowProcA, pDefWindowProcW;
WNDPROC pNtdllDefWindowProcA, pNtdllDefWindowProcW;
WNDPROC oldproc;
WNDCLASSEXA cls; /* the memory layout of WNDCLASSEXA and WNDCLASSEXW is the same */
WCHAR buf[128];
@ -626,7 +627,17 @@ static void test_builtinproc(void)
pDefWindowProcA = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcA");
pDefWindowProcW = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcW");
pNtdllDefWindowProcA = (void *)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtdllDefWindowProc_A");
pNtdllDefWindowProcW = (void *)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtdllDefWindowProc_W");
/* On Vista+, the user32.dll export DefWindowProcA/W is forwarded to */
/* ntdll.NtdllDefWindowProc_A/W. However, the wndproc returned by */
/* GetClassLong/GetWindowLong points to an unexported user32 function */
if (pDefWindowProcA == pNtdllDefWindowProcA &&
pDefWindowProcW == pNtdllDefWindowProcW)
skip("user32.DefWindowProcX forwarded to ntdll.NtdllDefWindowProc_X\n");
else
{
for (i = 0; i < 4; i++)
{
ZeroMemory(&cls, sizeof(cls));
@ -666,6 +677,7 @@ static void test_builtinproc(void)
DestroyWindow(hwnd);
UnregisterClass((LPSTR)(DWORD_PTR)atom, GetModuleHandle(NULL));
}
}
/* built-in winproc - window A/W type automatically detected */
ZeroMemory(&cls, sizeof(cls));