user32: Show that IME window class is one of builtin classes.

This commit is contained in:
Piotr Caban 2014-10-28 12:19:40 +01:00 committed by Alexandre Julliard
parent 3311684e6e
commit 43dcd40c0b
1 changed files with 52 additions and 0 deletions

View File

@ -1101,6 +1101,57 @@ static void test_comctl32_classes(void)
}
}
static void test_IME(void)
{
static const WCHAR ime_classW[] = {'I','M','E',0};
char module_name[MAX_PATH], *ptr;
MEMORY_BASIC_INFORMATION mbi;
HMODULE imm32 = NULL;
WNDCLASSW wnd_classw;
WNDCLASSA wnd_class;
SIZE_T size;
BOOL ret;
if (!GetProcAddress(GetModuleHandleA("user32.dll"), "BroadcastSystemMessageExA"))
{
skip("BroadcastSystemMessageExA not available, skipping IME class test\n");
return;
}
todo_wine ok(GetModuleHandleA("imm32") != 0, "imm32.dll is not loaded\n");
if (!GetModuleHandleA("imm32"))
imm32 = LoadLibraryA("imm32");
ret = GetClassInfoA(NULL, "IME", &wnd_class);
ok(ret, "GetClassInfo failed: %d\n", GetLastError());
size = VirtualQuery(wnd_class.lpfnWndProc, &mbi, sizeof(mbi));
todo_wine ok(size == sizeof(mbi), "VirtualQuery returned %ld\n", size);
if (size == sizeof(mbi)) {
size = GetModuleFileNameA(mbi.AllocationBase, module_name, sizeof(module_name));
ok(size, "GetModuleFileName failed\n");
for (ptr = module_name+size-1; ptr > module_name; ptr--)
if (*ptr == '\\' || *ptr == '/') break;
if (*ptr == '\\' || *ptr=='/') ptr++;
ok(!lstrcmpiA(ptr, "user32.dll") || !lstrcmpiA(ptr, "ntdll.dll"), "IME window proc implemented in %s\n", ptr);
}
ret = GetClassInfoW(NULL, ime_classW, &wnd_classw);
ok(ret, "GetClassInfo failed: %d\n", GetLastError());
size = VirtualQuery(wnd_classw.lpfnWndProc, &mbi, sizeof(mbi));
ok(size == sizeof(mbi), "VirtualQuery returned %ld\n", size);
size = GetModuleFileNameA(mbi.AllocationBase, module_name, sizeof(module_name));
ok(size, "GetModuleFileName failed\n");
for (ptr = module_name+size-1; ptr > module_name; ptr--)
if (*ptr == '\\' || *ptr == '/') break;
if (*ptr == '\\' || *ptr=='/') ptr++;
todo_wine ok(!lstrcmpiA(ptr, "user32.dll") || !lstrcmpiA(ptr, "ntdll.dll"), "IME window proc implemented in %s\n", ptr);
if (imm32) FreeLibrary(imm32);
}
START_TEST(class)
{
char **argv;
@ -1113,6 +1164,7 @@ START_TEST(class)
return;
}
test_IME();
test_GetClassInfo();
test_extra_values();