1 /* 2 * PROJECT: ReactOS api tests 3 * LICENSE: GPL - See COPYING in the top level directory 4 * PURPOSE: Test for NtUserGetClassInfo 5 * PROGRAMMERS: 6 */ 7 8 #include "../win32nt.h" 9 10 START_TEST(NtUserGetClassInfo) 11 { 12 HINSTANCE hinst = GetModuleHandle(NULL); 13 WNDCLASSEXW wclex, wclex2 = {0}; 14 UNICODE_STRING us; 15 PWSTR pwstr = NULL; 16 17 #ifdef _M_AMD64 18 skip("Test is broken on x64.\n"); 19 return; 20 #endif 21 22 us.Length = 8; 23 us.MaximumLength = 8; 24 us.Buffer = L"test"; 25 26 wclex.cbSize = sizeof(WNDCLASSEXW); 27 wclex.style = 0; 28 wclex.lpfnWndProc = NULL; 29 wclex.cbClsExtra = 2; 30 wclex.cbWndExtra = 4; 31 wclex.hInstance = hinst; 32 wclex.hIcon = NULL; 33 wclex.hCursor = NULL; 34 wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5)); 35 wclex.lpszMenuName = L"MyMenu"; 36 wclex.lpszClassName = us.Buffer; 37 wclex.hIconSm = NULL; 38 39 ASSERT(RegisterClassExW(&wclex) != 0); 40 41 TEST(GetClassInfoExW(hinst, us.Buffer, &wclex) != 0); 42 wclex2.cbSize = sizeof(WNDCLASSEXW); 43 TEST(NtUserGetClassInfo(hinst, &us, &wclex2, &pwstr, 0) != 0); 44 45 TEST(pwstr == wclex.lpszMenuName); 46 TEST(wclex2.cbSize == wclex.cbSize); 47 TEST(wclex2.style == wclex.style); 48 TEST(wclex2.lpfnWndProc == wclex.lpfnWndProc); 49 TEST(wclex2.cbClsExtra == wclex.cbClsExtra); 50 TEST(wclex2.cbWndExtra == wclex.cbWndExtra); 51 TEST(wclex2.hInstance == wclex.hInstance); 52 TEST(wclex2.hIcon == wclex.hIcon); 53 TEST(wclex2.hCursor == wclex.hCursor); 54 TEST(wclex2.hbrBackground == wclex.hbrBackground); 55 TEST(wclex2.lpszMenuName == 0); 56 TEST(wclex2.lpszClassName == 0); 57 TEST(wclex2.hIconSm == wclex.hIconSm); 58 59 } 60