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
|
|
|
|
2023-11-16 20:57: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
|
|
|
{
|
2019-01-30 13:55:10 +00:00
|
|
|
PVOID pRet;
|
|
|
|
PTEB pTeb;
|
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-02-05 10:10:33 +00:00
|
|
|
pNtGdiFlushUserBatch = (PVOID)GetProcAddress(g_hModule, "NtGdiFlushUserBatch");
|
|
|
|
if (pNtGdiFlushUserBatch == NULL)
|
|
|
|
return APISTATUS_NOT_FOUND;
|
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
pTeb = NtCurrentTeb();
|
|
|
|
ok(pTeb != NULL, "pTeb was NULL.\n");
|
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
|
|
|
|
2019-01-30 13:55:10 +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
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
ok(pRet != NULL, "pRet was NULL.\n");
|
|
|
|
ok_ptr(pRet, &pTeb->RealClientId);
|
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
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
ok_long(pTeb->GdiBatchCount, 0);
|
|
|
|
ok_long(pTeb->GdiTebBatch.Offset, 0);
|
|
|
|
ok_ptr(pTeb->GdiTebBatch.HDC, NULL);
|
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
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
/* Set up some bullshit */
|
|
|
|
pTeb->InDbgPrint = 1;
|
|
|
|
pTeb->GdiBatchCount = 12;
|
|
|
|
pTeb->GdiTebBatch.Offset = 21;
|
|
|
|
pTeb->GdiTebBatch.HDC = (HDC)123;
|
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
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
pRet = (PVOID)pNtGdiFlushUserBatch();
|
|
|
|
ok_ptr(pRet, &pTeb->RealClientId);
|
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
|
|
|
|
2019-01-30 13:55:10 +00:00
|
|
|
ok_int(pTeb->InDbgPrint, 0);
|
|
|
|
ok_long(pTeb->GdiBatchCount, 12);
|
|
|
|
ok_long(pTeb->GdiTebBatch.Offset, 0);
|
|
|
|
ok_ptr(pTeb->GdiTebBatch.HDC, NULL);
|
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
|
|
|
}
|