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 us.Length = 8; 18 us.MaximumLength = 8; 19 us.Buffer = L"test"; 20 21 wclex.cbSize = sizeof(WNDCLASSEXW); 22 wclex.style = 0; 23 wclex.lpfnWndProc = NULL; 24 wclex.cbClsExtra = 2; 25 wclex.cbWndExtra = 4; 26 wclex.hInstance = hinst; 27 wclex.hIcon = NULL; 28 wclex.hCursor = NULL; 29 wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5)); 30 wclex.lpszMenuName = L"MyMenu"; 31 wclex.lpszClassName = us.Buffer; 32 wclex.hIconSm = NULL; 33 34 ASSERT(RegisterClassExW(&wclex) != 0); 35 36 TEST(GetClassInfoExW(hinst, us.Buffer, &wclex) != 0); 37 wclex2.cbSize = sizeof(WNDCLASSEXW); 38 TEST(NtUserGetClassInfo(hinst, &us, &wclex2, &pwstr, 0) != 0); 39 40 TEST(pwstr == wclex.lpszMenuName); 41 TEST(wclex2.cbSize == wclex.cbSize); 42 TEST(wclex2.style == wclex.style); 43 TEST(wclex2.lpfnWndProc == wclex.lpfnWndProc); 44 TEST(wclex2.cbClsExtra == wclex.cbClsExtra); 45 TEST(wclex2.cbWndExtra == wclex.cbWndExtra); 46 TEST(wclex2.hInstance == wclex.hInstance); 47 TEST(wclex2.hIcon == wclex.hIcon); 48 TEST(wclex2.hCursor == wclex.hCursor); 49 TEST(wclex2.hbrBackground == wclex.hbrBackground); 50 TEST(wclex2.lpszMenuName == 0); 51 TEST(wclex2.lpszClassName == 0); 52 TEST(wclex2.hIconSm == wclex.hIconSm); 53 54 } 55