Author: tkreuzer Date: Thu Feb 5 10:10:33 2015 New Revision: 66172
URL: http://svn.reactos.org/svn/reactos?rev=66172&view=rev Log: [W32KNAPI] Load NtGdiFlushUserBatch dynamically to allow loading on Win 2003, where the function does not exist. ROSTESTS-131 #resolve
Modified: trunk/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c
Modified: trunk/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntgdi/Nt... ============================================================================== --- trunk/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c [iso-8859-1] (original) +++ trunk/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c [iso-8859-1] Thu Feb 5 10:10:33 2015 @@ -1,3 +1,8 @@ + + +NTSTATUS +(NTAPI +*pNtGdiFlushUserBatch)(VOID);
INT Test_NtGdiFlushUserBatch(PTESTINFO pti) @@ -5,10 +10,14 @@ PVOID pRet; PTEB pTeb;
+ pNtGdiFlushUserBatch = (PVOID)GetProcAddress(g_hModule, "NtGdiFlushUserBatch"); + if (pNtGdiFlushUserBatch == NULL) + return APISTATUS_NOT_FOUND; + pTeb = NtCurrentTeb(); ASSERT(pTeb);
- pRet = (PVOID)NtGdiFlushUserBatch(); + pRet = (PVOID)pNtGdiFlushUserBatch();
TEST(pRet != 0); TEST(pRet == &pTeb->RealClientId); @@ -23,7 +32,7 @@ pTeb->GdiTebBatch.Offset = 21; pTeb->GdiTebBatch.HDC = (HDC)123;
- pRet = (PVOID)NtGdiFlushUserBatch(); + pRet = (PVOID)pNtGdiFlushUserBatch(); TEST(pRet == &pTeb->RealClientId);
TEST(pTeb->InDbgPrint == 0);