2015-12-28 20:31:10 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS api tests
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Test for NtGdiFlushUserBatch
|
|
|
|
* PROGRAMMERS:
|
|
|
|
*/
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
|
2015-12-28 20:31:10 +00:00
|
|
|
#include <win32nt.h>
|
2015-02-05 10:10:33 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
(NTAPI
|
|
|
|
*pNtGdiFlushUserBatch)(VOID);
|
|
|
|
|
2015-12-28 20:31:10 +00:00
|
|
|
START_TEST(NtGdiFlushUserBatch)
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
{
|
|
|
|
PVOID pRet;
|
|
|
|
PTEB pTeb;
|
|
|
|
|
2015-02-05 10:10:33 +00:00
|
|
|
pNtGdiFlushUserBatch = (PVOID)GetProcAddress(g_hModule, "NtGdiFlushUserBatch");
|
|
|
|
if (pNtGdiFlushUserBatch == NULL)
|
|
|
|
return APISTATUS_NOT_FOUND;
|
|
|
|
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
pTeb = NtCurrentTeb();
|
|
|
|
ASSERT(pTeb);
|
|
|
|
|
2015-02-05 10:10:33 +00:00
|
|
|
pRet = (PVOID)pNtGdiFlushUserBatch();
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
|
|
|
|
TEST(pRet != 0);
|
|
|
|
TEST(pRet == &pTeb->RealClientId);
|
|
|
|
|
|
|
|
TEST(pTeb->GdiBatchCount == 0);
|
|
|
|
TEST(pTeb->GdiTebBatch.Offset == 0);
|
|
|
|
TEST(pTeb->GdiTebBatch.HDC == 0);
|
|
|
|
|
|
|
|
/* Set up some bullshit */
|
|
|
|
pTeb->InDbgPrint = 1;
|
|
|
|
pTeb->GdiBatchCount = 12;
|
|
|
|
pTeb->GdiTebBatch.Offset = 21;
|
|
|
|
pTeb->GdiTebBatch.HDC = (HDC)123;
|
|
|
|
|
2015-02-05 10:10:33 +00:00
|
|
|
pRet = (PVOID)pNtGdiFlushUserBatch();
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
TEST(pRet == &pTeb->RealClientId);
|
|
|
|
|
|
|
|
TEST(pTeb->InDbgPrint == 0);
|
|
|
|
TEST(pTeb->GdiBatchCount == 12);
|
|
|
|
TEST(pTeb->GdiTebBatch.Offset == 0);
|
|
|
|
TEST(pTeb->GdiTebBatch.HDC == 0);
|
|
|
|
|
|
|
|
}
|