ReactOS 0.4.15-dev-6049-ge54b32b
NtUserGetClassInfo.c File Reference
#include <win32nt.h>
Include dependency graph for NtUserGetClassInfo.c:

Go to the source code of this file.

Functions

 START_TEST (NtUserGetClassInfo)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtUserGetClassInfo  )

Definition at line 10 of file NtUserGetClassInfo.c.

11{
13 WNDCLASSEXW wclex, wclex2 = {0};
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}
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define RGB(r, g, b)
Definition: precomp.h:62
BOOL NTAPI NtUserGetClassInfo(HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW wcex, LPWSTR *ppszMenuName, BOOL Ansi)
Definition: class.c:2720
#define ASSERT(a)
Definition: mode.c:44
#define TEST(x)
Definition: precomp.h:20
static HINSTANCE hinst
Definition: edit.c:551
static const BYTE us[]
Definition: encode.c:689
#define L(x)
Definition: ntvdm.h:50
LPCWSTR lpszClassName
Definition: winuser.h:3216
LPCWSTR lpszMenuName
Definition: winuser.h:3215
HBRUSH hbrBackground
Definition: winuser.h:3214
WNDPROC lpfnWndProc
Definition: winuser.h:3208
UINT cbSize
Definition: winuser.h:3206
int cbWndExtra
Definition: winuser.h:3210
HCURSOR hCursor
Definition: winuser.h:3213
HICON hIconSm
Definition: winuser.h:3217
HINSTANCE hInstance
Definition: winuser.h:3211
UINT style
Definition: winuser.h:3207
int cbClsExtra
Definition: winuser.h:3209
HICON hIcon
Definition: winuser.h:3212
uint16_t * PWSTR
Definition: typedefs.h:56
#define GetModuleHandle
Definition: winbase.h:3698
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
struct _WNDCLASSEXW WNDCLASSEXW