ReactOS 0.4.16-dev-87-g3dfbe52
NtUserGetKeyboardLayoutName.c File Reference
#include "../win32nt.h"
#include <pseh/pseh2.h>
Include dependency graph for NtUserGetKeyboardLayoutName.c:

Go to the source code of this file.

Typedefs

typedef BOOL(APIENTRYFN_NtUserGetKeyboardLayoutName) (PVOID)
 

Functions

 START_TEST (NtUserGetKeyboardLayoutName)
 

Typedef Documentation

◆ FN_NtUserGetKeyboardLayoutName

typedef BOOL(APIENTRY * FN_NtUserGetKeyboardLayoutName) (PVOID)

Definition at line 11 of file NtUserGetKeyboardLayoutName.c.

Function Documentation

◆ START_TEST()

START_TEST ( NtUserGetKeyboardLayoutName  )

Definition at line 13 of file NtUserGetKeyboardLayoutName.c.

14{
16 UNICODE_STRING ustr;
17 WCHAR szBuff[MAX_PATH];
18 BOOL bHung, ret;
19
20 /* Try NULL */
22
23 /* Try szBuff */
24 ret = bHung = FALSE;
25 RtlZeroMemory(szBuff, sizeof(szBuff));
27 {
28 ret = fn(szBuff);
29 }
31 {
32 bHung = TRUE;
33 }
35
36 ok_int(bHung, FALSE);
37 //ok_int(ret, FALSE); // XP:TRUE, 2k3:FALSE
38 ok(szBuff[0] == 0, "szBuff[0] was %d\n", szBuff[0]);
39
40 /* Try ustr */
41 RtlZeroMemory(szBuff, sizeof(szBuff));
42 ustr.Buffer = szBuff;
43 ustr.Length = 0;
44 ustr.MaximumLength = RTL_NUMBER_OF(szBuff) * sizeof(WCHAR);
45 ret = bHung = FALSE;
47 {
48 ret = fn(&ustr);
49 }
51 {
52 bHung = TRUE;
53 }
55
56 ok_int(bHung, FALSE);
57 ok_int(ret, TRUE);
58 ok(szBuff[0] != 0, "szBuff[0] was %d\n", szBuff[0]);
59 trace("szBuff: %S\n", szBuff);
60}
BOOL(APIENTRY * FN_NtUserGetKeyboardLayoutName)(PVOID)
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define ok_int(expression, result)
Definition: atltest.h:134
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
BOOL NTAPI NtUserGetKeyboardLayoutName(_Inout_ PUNICODE_STRING pustrName)
Definition: kbdlayout.c:1092
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
int ret
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
__wchar_t WCHAR
Definition: xmlstorage.h:180