ReactOS  0.4.15-dev-492-ga1108f6
NtGdiFlushUserBatch.c File Reference
#include <win32nt.h>
Include dependency graph for NtGdiFlushUserBatch.c:

Go to the source code of this file.

Functions

 NTSTATUS (NTAPI *pNtGdiFlushUserBatch)(VOID)
 
 START_TEST (NtGdiFlushUserBatch)
 

Function Documentation

◆ NTSTATUS()

NTSTATUS ( NTAPI pNtGdiFlushUserBatch)

◆ START_TEST()

START_TEST ( NtGdiFlushUserBatch  )

Definition at line 14 of file NtGdiFlushUserBatch.c.

15 {
16  PVOID pRet;
17  PTEB pTeb;
18 
19  pNtGdiFlushUserBatch = (PVOID)GetProcAddress(g_hModule, "NtGdiFlushUserBatch");
20  if (pNtGdiFlushUserBatch == NULL)
21  return APISTATUS_NOT_FOUND;
22 
23  pTeb = NtCurrentTeb();
24  ok(pTeb != NULL, "pTeb was NULL.\n");
25 
26  pRet = (PVOID)pNtGdiFlushUserBatch();
27 
28  ok(pRet != NULL, "pRet was NULL.\n");
29  ok_ptr(pRet, &pTeb->RealClientId);
30 
31  ok_long(pTeb->GdiBatchCount, 0);
32  ok_long(pTeb->GdiTebBatch.Offset, 0);
33  ok_ptr(pTeb->GdiTebBatch.HDC, NULL);
34 
35  /* Set up some bullshit */
36  pTeb->InDbgPrint = 1;
37  pTeb->GdiBatchCount = 12;
38  pTeb->GdiTebBatch.Offset = 21;
39  pTeb->GdiTebBatch.HDC = (HDC)123;
40 
41  pRet = (PVOID)pNtGdiFlushUserBatch();
42  ok_ptr(pRet, &pTeb->RealClientId);
43 
44  ok_int(pTeb->InDbgPrint, 0);
45  ok_long(pTeb->GdiBatchCount, 12);
46  ok_long(pTeb->GdiTebBatch.Offset, 0);
47  ok_ptr(pTeb->GdiTebBatch.HDC, NULL);
48 }
static HDC
Definition: imagelist.c:92
HMODULE g_hModule
Definition: ACPPage.cpp:12
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_long(expression, result)
Definition: atltest.h:133
smooth NULL
Definition: ftsmooth.c:416
#define ok_int(expression, result)
Definition: atltest.h:134
void * PVOID
Definition: retypes.h:9
CLIENT_ID RealClientId
Definition: compat.h:519
GDI_TEB_BATCH GdiTebBatch
Definition: compat.h:515
ULONG GdiBatchCount
Definition: compat.h:545
Definition: compat.h:493
ULONG Offset
Definition: compat.h:489
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define ok(value,...)
Definition: atltest.h:57
#define GetProcAddress(x, y)
Definition: compat.h:419
HANDLE HDC
Definition: compat.h:490