[APOTESTS]

- Convert win32k native api test to actual wine style api-tests
- Hack around a bit with the win32k dlls, some renaming, etc.
- Delete old apitest stuff

svn path=/trunk/; revision=70458
This commit is contained in:
Timo Kreuzer 2015-12-28 20:31:10 +00:00
parent 3ef0e98b4b
commit 7ad21a4425
111 changed files with 1409 additions and 2967 deletions

View file

@ -1,8 +1,5 @@
include_directories(include)
add_library(apitest apitest.c)
add_dependencies(apitest xdk)
add_subdirectory(advapi32)
add_subdirectory(atl)
add_subdirectory(browseui)
@ -10,6 +7,7 @@ add_subdirectory(com)
add_subdirectory(crt)
add_subdirectory(dciman32)
add_subdirectory(gdi32)
add_subdirectory(gditools)
add_subdirectory(iphlpapi)
if(NOT ARCH STREQUAL "amd64")
add_subdirectory(kernel32)
@ -25,8 +23,8 @@ add_subdirectory(psapi)
add_subdirectory(user32)
add_subdirectory(user32_dynamic)
if(NOT ARCH STREQUAL "amd64")
add_subdirectory(w32kdll)
add_subdirectory(w32knapi)
add_subdirectory(win32kdll)
add_subdirectory(win32nt)
endif()
add_subdirectory(winhttp)
add_subdirectory(wininet)

View file

@ -1,234 +0,0 @@
#include "apitest.h"
const char szFileHeader1[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
"<head>\n"
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n";
const char szFileHeader2[] = "<style type=\"text/css\">\n"
"body {font-family: sans-serif;}\n"
"table {width: 100%;}\n"
"th {text-align: left;}\n"
"td.red {color: red;}\n"
"td.green {color: green;}\n"
"</style>\n"
"</head>\n"
"<body>\n";
const char szTableHeader[] = "<table><tr><th>Function</th><th>Status</th><th>Tests (all/passed/failed)</th><th>Regressions</th></tr>";
const char szFileFooter[] = "</table></body></html>";
void
OutputUsage(LPWSTR pszName)
{
printf("\nUsage:\n\n");
printf("%ls.exe <TestName> - Perform individual test\n", pszName);
printf("%ls.exe all - Perform all tests\n", pszName);
printf("%ls.exe tests - List the valid test names\n", pszName);
printf("%ls.exe status - Create api status file\n", pszName);
printf("%ls.exe -r ... - Perform regression testing\n", pszName);
printf("\n");
}
BOOL
WriteFileHeader(HANDLE hFile, LPDWORD lpdwBytesWritten, LPWSTR pszModule)
{
char szHeader[100];
WriteFile(hFile, szFileHeader1, strlen(szFileHeader1), lpdwBytesWritten, NULL);
sprintf(szHeader, "<title>%ls Test results</title>", pszModule);
WriteFile(hFile, szHeader, strlen(szHeader), lpdwBytesWritten, NULL);
WriteFile(hFile, szFileHeader2, strlen(szFileHeader2), lpdwBytesWritten, NULL);
sprintf(szHeader, "<h1>Test results for %ls</h1>", pszModule);
WriteFile(hFile, szHeader, strlen(szHeader), lpdwBytesWritten, NULL);
WriteFile(hFile, szTableHeader, strlen(szTableHeader), lpdwBytesWritten, NULL);
return TRUE;
}
BOOL
WriteRow(HANDLE hFile, LPDWORD lpdwBytesWritten, LPWSTR pszFunction, PTESTINFO pti)
{
char szLine[500];
sprintf(szLine, "<tr><td>%ls</td>", pszFunction);
switch(pti->nApiStatus)
{
case APISTATUS_NOT_FOUND:
strcat(szLine, "<td class=\"red\">not found</td>");
break;
case APISTATUS_UNIMPLEMENTED:
strcat(szLine, "<td class=\"red\">unimplemented</td>");
break;
case APISTATUS_ASSERTION_FAILED:
strcat(szLine, "<td class=\"red\">assertion failed</td>");
break;
case APISTATUS_REGRESSION:
strcat(szLine, "<td class=\"red\">Regression!</td>");
break;
case APISTATUS_NORMAL:
strcat(szLine, "<td class=\"green\">Implemented</td>");
break;
}
sprintf(szLine + strlen(szLine), "<td>%d / %d / %d</td><td>%d</td></tr>\n",
pti->passed+pti->failed, pti->passed, pti->failed, pti->rfailed);
WriteFile(hFile, szLine, strlen(szLine), lpdwBytesWritten, NULL);
return TRUE;
}
static CHAR
GetDisplayChar(CHAR c)
{
if (c < 32) return '.';
return c;
}
VOID
DumpMem(PVOID pData, ULONG cbSize, ULONG nWidth)
{
ULONG cLines = (cbSize + nWidth - 1) / nWidth;
ULONG cbLastLine = cbSize % nWidth;
INT i,j;
for (i = 0; i <= cLines; i++)
{
printf("%08lx: ", i*nWidth);
for (j = 0; j < (i == cLines? cbLastLine : nWidth); j++)
{
printf("%02x ", ((BYTE*)pData)[i*nWidth + j]);
}
printf(" ");
for (j = 0; j < (i == cLines? cbLastLine : nWidth); j++)
{
printf("%c", GetDisplayChar(((CHAR*)pData)[i*nWidth + j]));
}
printf("\n");
}
}
int
TestMain(LPWSTR pszName, LPWSTR pszModule)
{
INT argc, i, j;
LPWSTR *argv;
TESTINFO ti;
INT opassed, ofailed, orfailed;
BOOL bAll, bStatus;
HANDLE hFile = NULL;
DWORD dwBytesWritten;
ti.bRegress = FALSE;
bAll = FALSE;
bStatus = FALSE;
opassed = ofailed = orfailed = 0;
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
if (argc < 2)
{
OutputUsage(pszName);
return 0;
}
/* Get options */
for (i = 1; i < argc; i++)
{
if (_wcsicmp(argv[i], L"-r") == 0)
{
ti.bRegress = TRUE;
}
else if (_wcsicmp(argv[i], L"all") == 0)
{
bAll = TRUE;
}
else if (_wcsicmp(argv[i], L"status") == 0)
{
bAll = TRUE;
bStatus = TRUE;
}
else if (_wcsicmp(argv[i], L"tests") == 0)
{
/* List all the tests and exit */
printf("Valid test names:\n\n");
for (i = 0; i < NumTests(); i++)
printf("%ls\n", TestList[i].Test);
return 0;
}
}
if (bStatus)
{
WCHAR szOutputFile[MAX_PATH];
ti.bRegress = TRUE;
wcscpy(szOutputFile, pszName);
wcscat(szOutputFile, L".html");
hFile = CreateFileW(szOutputFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
printf("Could not create output file.\n");
return 0;
}
WriteFileHeader(hFile, &dwBytesWritten, pszModule);
}
for (i = 0; i < NumTests(); i++)
{
for (j = 1; j < argc; j++)
{
if (bAll || _wcsicmp(argv[j], TestList[i].Test) == 0)
{
ti.passed = 0;
ti.failed = 0;
ti.rfailed = 0;
if (!IsFunctionPresent(TestList[i].Test))
{
printf("Function %ls was not found!\n", TestList[i].Test);
ti.nApiStatus = APISTATUS_NOT_FOUND;
}
else
{
printf("Executing test: %ls\n", TestList[i].Test);
ti.nApiStatus = TestList[i].Proc(&ti);
opassed += ti.passed;
ofailed += ti.failed;
orfailed += ti.rfailed;
printf(" tests: %d, passed: %d, failed: %d\n\n", ti.passed+ti.failed, ti.passed, ti.failed);
}
if (bStatus)
{
if (ti.rfailed > 0)
ti.nApiStatus = APISTATUS_REGRESSION;
WriteRow(hFile, &dwBytesWritten, TestList[i].Test, &ti);
}
break;
}
}
}
printf("Overall:\n");
printf(" tests: %d, passed: %d, failed: %d\n\n", opassed+ofailed, opassed, ofailed);
if (ti.bRegress)
{
printf(" regressions: %d\n", orfailed);
}
if (bStatus)
{
WriteFile(hFile, szFileFooter, strlen(szFileFooter), &dwBytesWritten, NULL);
CloseHandle(hFile);
}
if (ti.bRegress)
return ti.rfailed;
return ti.failed;
}

View file

@ -1,121 +0,0 @@
#ifndef _APITEST_H
#define _APITEST_H
#include <stdlib.h>
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <shellapi.h>
#define APISTATUS_NORMAL 0
#define APISTATUS_NOT_FOUND 1
#define APISTATUS_UNIMPLEMENTED 2
#define APISTATUS_ASSERTION_FAILED 3
#define APISTATUS_REGRESSION 4
/* type definitions */
typedef struct tagTESTINFO
{
INT passed;
INT failed;
INT rfailed;
BOOL bRegress;
INT nApiStatus;
} TESTINFO, *PTESTINFO;
typedef INT (*TESTPROC)(PTESTINFO);
typedef struct tagTEST
{
WCHAR* Test;
TESTPROC Proc;
} TESTENTRY, *PTESTENTRY;
/* macros */
#define TEST(x) \
if (pti->bRegress) \
{ \
if (x)\
{\
(pti->passed)++;\
printf("%s:%d: non-rtest succeeded (%s)\n", __FILE__, __LINE__, #x);\
} else {\
(pti->failed)++;\
} \
} \
else \
{ \
if (x)\
{\
(pti->passed)++;\
} else {\
(pti->failed)++;\
printf("%s:%d: test failed (%s)\n", __FILE__, __LINE__, #x);\
} \
}
#define TESTX(x, format, ...) \
if (pti->bRegress) \
{ \
if (x)\
{\
(pti->passed)++;\
printf("%s:%d: non-rtest succeeded (%s)\n", __FILE__, __LINE__, #x);\
} else {\
(pti->failed)++;\
} \
} \
else \
{ \
if (x)\
{\
(pti->passed)++;\
} else {\
(pti->failed)++;\
printf("%s:%d: test failed (%s) ", __FILE__, __LINE__, #x);\
printf(format, __VA_ARGS__); \
} \
}
#define RTEST(x) \
if (pti->bRegress) \
{ \
if (x)\
{\
(pti->passed)++;\
} else {\
(pti->failed)++;\
(pti->rfailed)++;\
printf("rtest failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\
} \
} \
else \
{ \
if (x)\
{\
(pti->passed)++;\
} else {\
(pti->failed)++;\
printf("test failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\
} \
}
#undef ASSERT
#define ASSERT(x) \
if (!(x)) \
{ \
printf("Assertion failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\
return APISTATUS_ASSERTION_FAILED; \
}
int TestMain(LPWSTR pszExe, LPWSTR pszModule);
extern TESTENTRY TestList[];
INT NumTests(void);
BOOL IsFunctionPresent(LPWSTR lpszFunction);
VOID DumpMem(PVOID pData, ULONG cbSize, ULONG nWidth);
#endif /* _APITEST_H */

View file

@ -1,6 +0,0 @@
add_subdirectory(w32kdll_ros)
add_subdirectory(w32kdll_xpsp2)
#add_subdirectory(w32kdll_2ksp4)
add_subdirectory(w32kdll_2k3sp2)
#add_subdirectory(w32kdll_vista)

View file

@ -1,11 +0,0 @@
spec2def(w32kdll_2k3sp2.dll w32kdll_2k3sp2.spec ADD_IMPORTLIB)
add_asm_files(w32kdll_2k3sp2_asm sys-stubs.S)
add_library(w32kdll_2k3sp2 SHARED
main.c
${w32kdll_2k3sp2_asm}
${CMAKE_CURRENT_BINARY_DIR}/w32kdll_2k3sp2.def)
set_module_type(w32kdll_2k3sp2 module)
add_dependencies(w32kdll_2k3sp2 psdk)

View file

@ -1,11 +0,0 @@
spec2def(w32kdll_2ksp4.dll w32kdll_2ksp4.spec)
add_asm_files(w32kdll_2ksp4_asm w32kdll_2ksp4.S)
add_library(w32kdll_2ksp4 SHARED
main.c
${w32kdll_2ksp4_asm}
${CMAKE_CURRENT_BINARY_DIR}/w32kdll_2ksp4.def)
set_module_type(w32kdll_2ksp4 module)
add_dependencies(w32kdll_2ksp4 psdk)

View file

@ -1,643 +0,0 @@
#
# win32k systemcalls taken from Windows 2000 SP4 x86
#
NtGdiAbortDoc 1
NtGdiAbortPath 1
NtGdiAddFontResourceW 6
NtGdiAddRemoteFontToDC 4
NtGdiAddFontMemResourceEx 5
NtGdiRemoveMergeFont 2
NtGdiAddRemoteMMInstanceToDC 3
NtGdiAlphaBlend 12
NtGdiAngleArc 6
NtGdiAnyLinkedFonts 0
NtGdiFontIsLinked 1
NtGdiArcInternal 10
NtGdiBeginPath 1
NtGdiBitBlt 11
NtGdiCancelDC 1
NtGdiCheckBitmapBits 8
NtGdiCloseFigure 1
NtGdiColorCorrectPalette 6
NtGdiCombineRgn 4
NtGdiCombineTransform 3
NtGdiComputeXformCoefficients 1
NtGdiConsoleTextOut 4
NtGdiConvertMetafileRect 2
NtGdiCreateBitmap 5
NtGdiCreateClientObj 1
NtGdiCreateColorSpace 1
NtGdiCreateColorTransform 8
NtGdiCreateCompatibleBitmap 3
NtGdiCreateCompatibleDC 1
NtGdiCreateDIBBrush 6
NtGdiCreateDIBitmapInternal 11
NtGdiCreateDIBSection 9
NtGdiCreateEllipticRgn 4
NtGdiCreateHalftonePalette 1
NtGdiCreateHatchBrushInternal 3
NtGdiCreateMetafileDC 1
NtGdiCreatePaletteInternal 2
NtGdiCreatePatternBrushInternal 3
NtGdiCreatePen 4
NtGdiCreateRectRgn 4
NtGdiCreateRoundRectRgn 6
NtGdiCreateServerMetaFile 6
NtGdiCreateSolidBrush 2
NtGdiD3dContextCreate 4
NtGdiD3dContextDestroy 1
NtGdiD3dContextDestroyAll 1
NtGdiD3dValidateTextureStageState 1
NtGdiD3dDrawPrimitives2 7
NtGdiDdGetDriverState 1
NtGdiDdAddAttachedSurface 3
NtGdiDdAlphaBlt 3
NtGdiDdAttachSurface 2
NtGdiDdBeginMoCompFrame 2
NtGdiDdBlt 3
NtGdiDdCanCreateSurface 2
NtGdiDdCanCreateD3DBuffer 2
NtGdiDdColorControl 2
NtGdiDdCreateDirectDrawObject 1
NtGdiDdCreateSurface 8
NtGdiDdCreateD3DBuffer 8
NtGdiDdCreateMoComp 2
NtGdiDdCreateSurfaceObject 6
NtGdiDdDeleteDirectDrawObject 1
NtGdiDdDeleteSurfaceObject 1
NtGdiDdDestroyMoComp 2
NtGdiDdDestroySurface 2
NtGdiDdDestroyD3DBuffer 1
NtGdiDdEndMoCompFrame 2
NtGdiDdFlip 5
NtGdiDdFlipToGDISurface 2
NtGdiDdGetAvailDriverMemory 2
NtGdiDdGetBltStatus 2
NtGdiDdGetDC 2
NtGdiDdGetDriverInfo 2
NtGdiDdGetDxHandle 3
NtGdiDdGetFlipStatus 2
NtGdiDdGetInternalMoCompInfo 2
NtGdiDdGetMoCompBuffInfo 2
NtGdiDdGetMoCompGuids 2
NtGdiDdGetMoCompFormats 2
NtGdiDdGetScanLine 2
NtGdiDdLock 3
NtGdiDdLockD3D 2
NtGdiDdQueryDirectDrawObject 11
NtGdiDdQueryMoCompStatus 2
NtGdiDdReenableDirectDrawObject 2
NtGdiDdReleaseDC 1
NtGdiDdRenderMoComp 2
NtGdiDdResetVisrgn 2
NtGdiDdSetColorKey 2
NtGdiDdSetExclusiveMode 2
NtGdiDdSetGammaRamp 3
NtGdiDdCreateSurfaceEx 3
NtGdiDdSetOverlayPosition 3
NtGdiDdUnattachSurface 2
NtGdiDdUnlock 2
NtGdiDdUnlockD3D 2
NtGdiDdUpdateOverlay 3
NtGdiDdWaitForVerticalBlank 2
NtGdiDvpCanCreateVideoPort 2
NtGdiDvpColorControl 2
NtGdiDvpCreateVideoPort 2
NtGdiDvpDestroyVideoPort 2
NtGdiDvpFlipVideoPort 4
NtGdiDvpGetVideoPortBandwidth 2
NtGdiDvpGetVideoPortField 2
NtGdiDvpGetVideoPortFlipStatus 2
NtGdiDvpGetVideoPortInputFormats 2
NtGdiDvpGetVideoPortLine 2
NtGdiDvpGetVideoPortOutputFormats 2
NtGdiDvpGetVideoPortConnectInfo 2
NtGdiDvpGetVideoSignalStatus 2
NtGdiDvpUpdateVideoPort 4
NtGdiDvpWaitForVideoPortSync 2
NtGdiDeleteClientObj 1
NtGdiDeleteColorSpace 1
NtGdiDeleteColorTransform 2
NtGdiDeleteObjectApp 1
NtGdiDescribePixelFormat 4
NtGdiGetPerBandInfo 2
NtGdiDoBanding 4
NtGdiDoPalette 6
NtGdiDrawEscape 4
NtGdiEllipse 5
NtGdiEnableEudc 1
NtGdiEndDoc 1
NtGdiEndPage 1
NtGdiEndPath 1
NtGdiEnumFontChunk 5
NtGdiEnumFontClose 1
NtGdiEnumFontOpen 7
NtGdiEnumObjects 4
NtGdiEqualRgn 2
NtGdiEudcEnumFaceNameLinkW 4
NtGdiEudcLoadUnloadLink 7
NtGdiExcludeClipRect 5
NtGdiExtCreatePen 11
NtGdiExtCreateRegion 3
NtGdiExtEscape 8
NtGdiExtFloodFill 5
NtGdiExtGetObjectW 3
NtGdiExtSelectClipRgn 3
NtGdiExtTextOutW 9
NtGdiFillPath 1
NtGdiFillRgn 3
NtGdiFlattenPath 1
NtGdiFlushUserBatch 0
NtGdiFlush 0
NtGdiForceUFIMapping 2
NtGdiFrameRgn 5
NtGdiFullscreenControl 5
NtGdiGetAndSetDCDword 4
NtGdiGetAppClipBox 2
NtGdiGetBitmapBits 3
NtGdiGetBitmapDimension 2
NtGdiGetBoundsRect 3
NtGdiGetCharABCWidthsW 6
NtGdiGetCharacterPlacementW 6
NtGdiGetCharSet 1
NtGdiGetCharWidthW 6
NtGdiGetCharWidthInfo 2
NtGdiGetColorAdjustment 2
NtGdiGetColorSpaceforBitmap 1
NtGdiGetDCDword 3
NtGdiGetDCforBitmap 1
NtGdiGetDCObject 2
NtGdiGetDCPoint 3
NtGdiGetDeviceCaps 2
NtGdiGetDeviceGammaRamp 2
NtGdiGetDeviceCapsAll 2
NtGdiGetDIBitsInternal 9
NtGdiGetETM 2
NtGdiGetEudcTimeStampEx 3
NtGdiGetFontData 5
NtGdiGetFontResourceInfoInternalW 7
NtGdiGetGlyphIndicesW 5
NtGdiGetGlyphIndicesWInternal 6
NtGdiGetGlyphOutline 8
NtGdiGetKerningPairs 3
NtGdiGetLinkedUFIs 3
NtGdiGetMiterLimit 2
NtGdiGetMonitorID 3
NtGdiGetNearestColor 2
NtGdiGetNearestPaletteIndex 2
NtGdiGetObjectBitmapHandle 2
NtGdiGetOutlineTextMetricsInternalW 4
NtGdiGetPath 4
NtGdiGetPixel 3
NtGdiGetRandomRgn 3
NtGdiGetRasterizerCaps 2
NtGdiGetRealizationInfo 2
NtGdiGetRegionData 3
NtGdiGetRgnBox 2
NtGdiGetServerMetaFileBits 7
NtGdiGetSpoolMessage 4
NtGdiGetStats 5
NtGdiGetStockObject 1
NtGdiGetStringBitmapW 5
NtGdiGetSystemPaletteUse 1
NtGdiGetTextCharsetInfo 3
NtGdiGetTextExtent 5
NtGdiGetTextExtentExW 8
NtGdiGetTextFaceW 4
NtGdiGetTextMetricsW 3
NtGdiGetTransform 3
NtGdiGetUFI 6
NtGdiGetUFIPathname 10
NtGdiGetFontUnicodeRanges 2
NtGdiGetWidthTable 7
NtGdiGradientFill 6
NtGdiHfontCreate 5
NtGdiIcmBrushInfo 8
NtGdiInit 0
NtGdiInitSpool 0
NtGdiIntersectClipRect 5
NtGdiInvertRgn 2
NtGdiLineTo 3
NtGdiMakeFontDir 5
NtGdiMakeInfoDC 2
NtGdiMaskBlt 13
NtGdiModifyWorldTransform 3
NtGdiMonoBitmap 1
NtGdiMoveTo 4
NtGdiOffsetClipRgn 3
NtGdiOffsetRgn 3
NtGdiOpenDCW 7
NtGdiPatBlt 6
NtGdiPolyPatBlt 5
NtGdiPathToRegion 1
NtGdiPlgBlt 11
NtGdiPolyDraw 4
NtGdiPolyPolyDraw 5
NtGdiPolyTextOutW 4
NtGdiPtInRegion 3
NtGdiPtVisible 3
NtGdiQueryFonts 3
NtGdiQueryFontAssocInfo 1
NtGdiRectangle 5
NtGdiRectInRegion 2
NtGdiRectVisible 2
NtGdiRemoveFontResourceW 6
NtGdiRemoveFontMemResourceEx 1
NtGdiResetDC 5
NtGdiResizePalette 2
NtGdiRestoreDC 2
NtGdiRoundRect 7
NtGdiSaveDC 1
NtGdiScaleViewportExtEx 6
NtGdiScaleWindowExtEx 6
NtGdiSelectBitmap 2
NtGdiSelectBrush 2
NtGdiSelectClipPath 2
NtGdiSelectFont 2
NtGdiSelectPen 2
NtGdiSetBitmapBits 3
NtGdiSetBitmapDimension 4
NtGdiSetBoundsRect 3
NtGdiSetBrushOrg 4
NtGdiSetColorAdjustment 2
NtGdiSetColorSpace 2
NtGdiSetDeviceGammaRamp 2
NtGdiSetDIBitsToDeviceInternal 16
NtGdiSetFontEnumeration 1
NtGdiSetFontXform 3
NtGdiSetIcmMode 3
NtGdiSetLinkedUFIs 3
NtGdiSetMagicColors 3
NtGdiSetMetaRgn 1
NtGdiSetMiterLimit 3
NtGdiGetDeviceWidth 1
NtGdiMirrorWindowOrg 1
NtGdiSetLayout 3
NtGdiSetPixel 4
NtGdiSetPixelFormat 2
NtGdiSetRectRgn 5
NtGdiSetSystemPaletteUse 2
NtGdiSetTextJustification 3
NtGdiSetupPublicCFONT 3
NtGdiSetVirtualResolution 5
NtGdiSetSizeDevice 3
NtGdiStartDoc 4
NtGdiStartPage 1
NtGdiStretchBlt 12
NtGdiStretchDIBitsInternal 16
NtGdiStrokeAndFillPath 1
NtGdiStrokePath 1
NtGdiSwapBuffers 1
NtGdiTransformPoints 5
NtGdiTransparentBlt 11
NtGdiUnloadPrinterDriver 2
NtGdiUnmapMemFont 1
NtGdiUnrealizeObject 1
NtGdiUpdateColors 1
NtGdiWidenPath 1
NtUserActivateKeyboardLayout 2
NtUserAlterWindowStyle 3
NtUserAssociateInputContext 3
NtUserAttachThreadInput 3
NtUserBeginPaint 2
NtUserBitBltSysBmp 8
NtUserBlockInput 1
NtUserBuildHimcList 4
NtUserBuildHwndList 7
NtUserBuildNameList 4
NtUserBuildPropList 4
NtUserCallHwnd 2
NtUserCallHwndLock 2
NtUserCallHwndOpt 2
NtUserCallHwndParam 3
NtUserCallHwndParamLock 3
NtUserCallMsgFilter 2
NtUserCallNextHookEx 4
NtUserCallNoParam 1
NtUserCallOneParam 1
NtUserCallTwoParam 3
NtUserChangeClipboardChain 2
NtUserChangeDisplaySettings 5
NtUserCheckImeHotKey 3
NtUserCheckMenuItem 3
NtUserChildWindowFromPointEx 4
NtUserClipCursor 1
NtUserCloseClipboard 0
NtUserCloseDesktop 1
NtUserCloseWindowStation 1
NtUserConsoleControl 3
NtUserConvertMemHandle 2
NtUserCopyAcceleratorTable 3
NtUserCountClipboardFormats 1
NtUserCreateAcceleratorTable 2
NtUserCreateCaret 4
NtUserCreateDesktop 5
NtUserCreateInputContext 1
NtUserCreateLocalMemHandle 4
NtUserCreateWindowEx 13
NtUserCreateWindowStation 6
NtUserDdeGetQualityOfService 3
NtUserDdeInitialize 5
NtUserDdeSetQualityOfService 3
NtUserDeferWindowPos 8
NtUserDefSetText 2
NtUserDeleteMenu 3
NtUserDestroyAcceleratorTable 1
NtUserDestroyCursor 2
NtUserDestroyInputContext 1
NtUserDestroyMenu 1
NtUserDestroyWindow 1
NtUserDisableThreadIme 1
NtUserDispatchMessage 1
NtUserDragDetect 3
NtUserDragObject 5
NtUserDrawAnimatedRects 4
NtUserDrawCaption 4
NtUserDrawCaptionTemp 7
NtUserDrawIconEx 11
NtUserDrawMenuBarTemp 5
NtUserEmptyClipboard 0
NtUserEnableMenuItem 3
NtUserEnableScrollBar 3
NtUserEndDeferWindowPosEx 2
NtUserEndMenu 0
NtUserEndPaint 2
NtUserEnumDisplayDevices 4
NtUserEnumDisplayMonitors 4
NtUserEnumDisplaySettings 4
NtUserEvent 1
NtUserExcludeUpdateRgn 2
NtUserFillWindow 4
NtUserFindExistingCursorIcon 3
NtUserFindWindowEx 5
NtUserFlashWindowEx 1
NtUserGetAltTabInfo 6
NtUserGetAncestor 2
NtUserGetAppImeLevel 1
NtUserGetAsyncKeyState 1
NtUserGetCaretBlinkTime 0
NtUserGetCaretPos 1
NtUserGetClassInfo 5
NtUserGetClassName 3
NtUserGetClipboardData 2
NtUserGetClipboardFormatName 3
NtUserGetClipboardOwner 0
NtUserGetClipboardSequenceNumber 0
NtUserGetClipboardViewer 0
NtUserGetClipCursor 1
NtUserGetComboBoxInfo 2
NtUserGetControlBrush 3
NtUserGetControlColor 4
NtUserGetCPD 3
NtUserGetCursorFrameInfo 4
NtUserGetCursorInfo 1
NtUserGetDC 1
NtUserGetDCEx 3
NtUserGetDoubleClickTime 0
NtUserGetForegroundWindow 0
NtUserGetGuiResources 2
NtUserGetGUIThreadInfo 2
NtUserGetIconInfo 6
NtUserGetIconSize 4
NtUserGetImeHotKey 4
NtUserGetImeInfoEx 2
NtUserGetInternalWindowPos 3
NtUserGetKeyboardLayoutList 2
NtUserGetKeyboardLayoutName 1
NtUserGetKeyboardState 1
NtUserGetKeyNameText 3
NtUserGetKeyState 1
NtUserGetListBoxInfo 1
NtUserGetMenuBarInfo 4
NtUserGetMenuIndex 2
NtUserGetMenuItemRect 4
NtUserGetMessage 4
NtUserGetMouseMovePointsEx 5
NtUserGetObjectInformation 5
NtUserGetOpenClipboardWindow 0
NtUserGetPriorityClipboardFormat 2
NtUserGetProcessWindowStation 0
NtUserGetScrollBarInfo 3
NtUserGetSystemMenu 2
NtUserGetThreadDesktop 2
NtUserGetThreadState 1
NtUserGetTitleBarInfo 2
NtUserGetUpdateRect 3
NtUserGetUpdateRgn 3
NtUserGetWindowDC 1
NtUserGetWindowPlacement 2
NtUserGetWOWClass 2
NtUserHardErrorControl 3
NtUserHideCaret 1
NtUserHiliteMenuItem 4
NtUserImpersonateDdeClientWindow 2
NtUserInitialize 3
NtUserInitializeClientPfnArrays 4
NtUserInitTask 11
NtUserInternalGetWindowText 3
NtUserInvalidateRect 3
NtUserInvalidateRgn 3
NtUserIsClipboardFormatAvailable 1
NtUserKillTimer 2
NtUserLoadKeyboardLayoutEx 6
NtUserLockWindowStation 1
NtUserLockWindowUpdate 1
NtUserLockWorkStation 0
NtUserMapVirtualKeyEx 4
NtUserMenuItemFromPoint 4
NtUserMessageCall 7
NtUserMinMaximize 3
NtUserMNDragLeave 1
NtUserMNDragOver 2
NtUserModifyUserStartupInfoFlags 2
NtUserMoveWindow 6
NtUserNotifyIMEStatus 3
NtUserNotifyProcessCreate 4
NtUserNotifyWinEvent 4
NtUserOpenClipboard 2
NtUserOpenDesktop 3
NtUserOpenInputDesktop 3
NtUserOpenWindowStation 2
NtUserPaintDesktop 1
NtUserPeekMessage 5
NtUserPostMessage 4
NtUserPostThreadMessage 4
NtUserProcessConnect 3
NtUserQueryInformationThread 5
NtUserQueryInputContext 2
NtUserQuerySendMessage 1
NtUserQueryUserCounters 5
NtUserQueryWindow 2
NtUserRealChildWindowFromPoint 3
NtUserRedrawWindow 4
NtUserRegisterClassExWOW 6
NtUserRegisterHotKey 4
NtUserRegisterTasklist 1
NtUserRegisterWindowMessage 1
NtUserRemoveMenu 3
NtUserRemoveProp 2
NtUserResolveDesktop 4
NtUserResolveDesktopForWOW 1
NtUserSBGetParms 4
NtUserScrollDC 7
NtUserScrollWindowEx 8
NtUserSelectPalette 3
NtUserSendInput 3
NtUserSendMessageCallback 6
NtUserSendNotifyMessage 4
NtUserSetActiveWindow 1
NtUserSetAppImeLevel 2
NtUserSetCapture 1
NtUserSetClassLong 4
NtUserSetClassWord 3
NtUserSetClipboardData 3
NtUserSetClipboardViewer 1
NtUserSetConsoleReserveKeys 2
NtUserSetCursor 1
NtUserSetCursorContents 2
NtUserSetCursorIconData 4
NtUserSetDbgTag 2
NtUserSetFocus 1
NtUserSetImeHotKey 5
NtUserSetImeInfoEx 1
NtUserSetImeOwnerWindow 2
NtUserSetInformationProcess 4
NtUserSetInformationThread 5
NtUserSetInternalWindowPos 4
NtUserSetKeyboardState 1
NtUserSetLogonNotifyWindow 1
NtUserSetMenu 3
NtUserSetMenuContextHelpId 2
NtUserSetMenuDefaultItem 3
NtUserSetMenuFlagRtoL 1
NtUserSetObjectInformation 4
NtUserSetParent 2
NtUserSetProcessWindowStation 1
NtUserSetProp 3
NtUserSetRipFlags 2
NtUserSetScrollInfo 4
NtUserSetShellWindowEx 2
NtUserSetSysColors 4
NtUserSetSystemCursor 2
NtUserSetSystemMenu 2
NtUserSetSystemTimer 4
NtUserSetThreadDesktop 1
NtUserSetThreadLayoutHandles 2
NtUserSetThreadState 2
NtUserSetTimer 4
NtUserSetWindowFNID 2
NtUserSetWindowLong 4
NtUserSetWindowPlacement 2
NtUserSetWindowPos 7
NtUserSetWindowRgn 3
NtUserSetWindowsHookAW 3
NtUserSetWindowsHookEx 6
NtUserSetWindowStationUser 4
NtUserSetWindowWord 3
NtUserSetWinEventHook 8
NtUserShowCaret 1
NtUserShowScrollBar 3
NtUserShowWindow 2
NtUserShowWindowAsync 2
NtUserSoundSentry 0
NtUserSwitchDesktop 1
NtUserSystemParametersInfo 4
NtUserTestForInteractiveUser 1
NtUserThunkedMenuInfo 2
NtUserThunkedMenuItemInfo 6
NtUserToUnicodeEx 7
NtUserTrackMouseEvent 1
NtUserTrackPopupMenuEx 6
NtUserTranslateAccelerator 3
NtUserTranslateMessage 2
NtUserUnhookWindowsHookEx 1
NtUserUnhookWinEvent 1
NtUserUnloadKeyboardLayout 1
NtUserUnlockWindowStation 1
NtUserUnregisterClass 3
NtUserUnregisterHotKey 2
NtUserUpdateInputContext 3
NtUserUpdateInstance 3
NtUserUpdateLayeredWindow 9
NtUserSetLayeredWindowAttributes 4
NtUserUpdatePerUserSystemParameters 2
NtUserUserHandleGrantAccess 3
NtUserValidateHandleSecure 1
NtUserValidateRect 2
NtUserVkKeyScanEx 3
NtUserWaitForInputIdle 3
NtUserWaitForMsgAndEvent 1
NtUserWaitMessage 0
NtUserWin32PoolAllocationStats 6
NtUserWindowFromPoint 2
NtUserYieldTask 0
NtUserRemoteConnect 3
NtUserRemoteRedrawRectangle 4
NtUserRemoteRedrawScreen 0
NtUserRemoteStopScreenUpdates 0
NtUserCtxDisplayIOCtl 3
NtGdiEngAssociateSurface 3
NtGdiEngCreateBitmap 6
NtGdiEngCreateDeviceSurface 4
NtGdiEngCreateDeviceBitmap 4
NtGdiEngCreatePalette 6
NtGdiEngComputeGlyphSet 3
NtGdiEngCopyBits 6
NtGdiEngDeletePalette 1
NtGdiEngDeleteSurface 1
NtGdiEngEraseSurface 3
NtGdiEngUnlockSurface 1
NtGdiEngLockSurface 1
NtGdiEngBitBlt 11
NtGdiEngStretchBlt 11
NtGdiEngPlgBlt 11
NtGdiEngMarkBandingSurface 1
NtGdiEngStrokePath 8
NtGdiEngFillPath 7
NtGdiEngStrokeAndFillPath 10
NtGdiEngPaint 5
NtGdiEngLineTo 9
NtGdiEngAlphaBlend 7
NtGdiEngGradientFill 10
NtGdiEngTransparentBlt 8
NtGdiEngTextOut 10
NtGdiEngStretchBltROP 13
NtGdiXLATEOBJ_cGetPalette 4
NtGdiXLATEOBJ_iXlate 2
NtGdiXLATEOBJ_hGetColorTransform 1
NtGdiCLIPOBJ_bEnum 3
NtGdiCLIPOBJ_cEnumStart 5
NtGdiCLIPOBJ_ppoGetPath 1
NtGdiEngDeletePath 1
NtGdiEngCreateClip 0
NtGdiEngDeleteClip 1
NtGdiBRUSHOBJ_ulGetBrushColor 1
NtGdiBRUSHOBJ_pvAllocRbrush 2
NtGdiBRUSHOBJ_pvGetRbrush 1
NtGdiBRUSHOBJ_hGetColorTransform 1
NtGdiXFORMOBJ_bApplyXform 5
NtGdiXFORMOBJ_iGetXform 2
NtGdiFONTOBJ_vGetInfo 3
NtGdiFONTOBJ_pxoGetXform 1
NtGdiFONTOBJ_cGetGlyphs 5
NtGdiFONTOBJ_pifi 1
NtGdiFONTOBJ_pfdg 1
NtGdiFONTOBJ_pQueryGlyphAttrs 2
NtGdiFONTOBJ_pvTrueTypeFontFile 2
NtGdiFONTOBJ_cGetAllGlyphHandles 2
NtGdiSTROBJ_bEnum 3
NtGdiSTROBJ_bEnumPositionsOnly 3
NtGdiSTROBJ_bGetAdvanceWidths 4
NtGdiSTROBJ_vEnumStart 1
NtGdiSTROBJ_dwGetCodePage 1
NtGdiPATHOBJ_vGetBounds 2
NtGdiPATHOBJ_bEnum 2
NtGdiPATHOBJ_vEnumStart 1
NtGdiPATHOBJ_vEnumStartClipLines 4
NtGdiPATHOBJ_bEnumClipLines 3
NtGdiGetDhpdev 1
NtGdiEngCheckAbort 1
NtGdiHT_Get8BPPFormatPalette 4
NtGdiHT_Get8BPPMaskPalette 6
NtGdiUpdateTransform 1
NtUserValidateTimerCallback 3

View file

@ -1,11 +0,0 @@
spec2def(w32kdll_ros.dll w32kdll_ros.spec ADD_IMPORTLIB)
add_asm_files(w32kdll_ros_asm sys-stubs.S)
add_library(w32kdll_ros SHARED
main.c
${w32kdll_ros_asm}
${CMAKE_CURRENT_BINARY_DIR}/w32kdll_ros.def)
set_module_type(w32kdll_ros module)
add_dependencies(w32kdll_ros psdk)

View file

@ -1,11 +0,0 @@
spec2def(w32kdll_vista.spec w32kdll_vista.spec ADD_IMPORTLIB)
add_asm_files(w32kdll_vista_asm w32kdll_vista.S)
add_library(w32kdll_vista SHARED
main.c
${w32kdll_vista_asm}
${CMAKE_CURRENT_BINARY_DIR}/w32kdll_vista.def)
set_module_type(w32kdll_vista module)
add_dependencies(w32kdll_vista psdk)

View file

@ -1,775 +0,0 @@
#
# win32k systemcalls taken from Windows Vista SP0 x86
#
NtGdiAbortDoc 1
NtGdiAbortPath 1
NtGdiAddFontResourceW 6
NtGdiAddRemoteFontToDC 4
NtGdiAddFontMemResourceEx 5
NtGdiRemoveMergeFont 2
NtGdiAddRemoteMMInstanceToDC 3
NtGdiAlphaBlend 12
NtGdiAngleArc 6
NtGdiAnyLinkedFonts 0
NtGdiFontIsLinked 1
NtGdiArcInternal 10
NtGdiBeginPath 1
NtGdiBitBlt 11
NtGdiCancelDC 1
NtGdiCheckBitmapBits 8
NtGdiCloseFigure 1
NtGdiClearBitmapAttributes 2
NtGdiClearBrushAttributes 2
NtGdiColorCorrectPalette 6
NtGdiCombineRgn 4
NtGdiCombineTransform 3
NtGdiComputeXformCoefficients 1
NtGdiConfigureOPMProtectedOutput 4
NtGdiConsoleTextOut 4
NtGdiConvertMetafileRect 2
NtGdiCreateBitmap 5
NtGdiCreateClientObj 1
NtGdiCreateColorSpace 1
NtGdiCreateColorTransform 8
NtGdiCreateCompatibleBitmap 3
NtGdiCreateCompatibleDC 1
NtGdiCreateDIBBrush 6
NtGdiCreateDIBitmapInternal 11
NtGdiCreateDIBSection 9
NtGdiCreateEllipticRgn 4
NtGdiCreateHalftonePalette 1
NtGdiCreateHatchBrushInternal 3
NtGdiCreateMetafileDC 1
NtGdiCreateOPMProtectedOutputs 5
NtGdiCreatePaletteInternal 2
NtGdiCreatePatternBrushInternal 3
NtGdiCreatePen 4
NtGdiCreateRectRgn 4
NtGdiCreateRoundRectRgn 6
NtGdiCreateServerMetaFile 6
NtGdiCreateSolidBrush 2
NtGdiD3dContextCreate 4
NtGdiD3dContextDestroy 1
NtGdiD3dContextDestroyAll 1
NtGdiD3dValidateTextureStageState 1
NtGdiD3dDrawPrimitives2 7
NtGdiDdGetDriverState 1
NtGdiDdAddAttachedSurface 3
NtGdiDdAlphaBlt 3
NtGdiDdAttachSurface 2
NtGdiDdBeginMoCompFrame 2
NtGdiDdBlt 3
NtGdiDdCanCreateSurface 2
NtGdiDdCanCreateD3DBuffer 2
NtGdiDdColorControl 2
NtGdiDdCreateDirectDrawObject 1
NtGdiDdCreateSurface 8
NtGdiDdCreateD3DBuffer 8
NtGdiDdCreateMoComp 2
NtGdiDdCreateSurfaceObject 6
NtGdiDdDeleteDirectDrawObject 1
NtGdiDdDeleteSurfaceObject 1
NtGdiDdDestroyMoComp 2
NtGdiDdDestroySurface 2
NtGdiDdDestroyD3DBuffer 1
NtGdiDdEndMoCompFrame 2
NtGdiDdFlip 5
NtGdiDdFlipToGDISurface 2
NtGdiDdGetAvailDriverMemory 2
NtGdiDdGetBltStatus 2
NtGdiDdGetDC 2
NtGdiDdGetDriverInfo 2
NtGdiDdGetDxHandle 3
NtGdiDdGetFlipStatus 2
NtGdiDdGetInternalMoCompInfo 2
NtGdiDdGetMoCompBuffInfo 2
NtGdiDdGetMoCompGuids 2
NtGdiDdGetMoCompFormats 2
NtGdiDdGetScanLine 2
NtGdiDdLock 3
NtGdiDdLockD3D 2
NtGdiDdQueryDirectDrawObject 11
NtGdiDdQueryMoCompStatus 2
NtGdiDdReenableDirectDrawObject 2
NtGdiDdReleaseDC 1
NtGdiDdRenderMoComp 2
NtGdiDdResetVisrgn 2
NtGdiDdSetColorKey 2
NtGdiDdSetExclusiveMode 2
NtGdiDdSetGammaRamp 3
NtGdiDdCreateSurfaceEx 3
NtGdiDdSetOverlayPosition 3
NtGdiDdUnattachSurface 2
NtGdiDdUnlock 2
NtGdiDdUnlockD3D 2
NtGdiDdUpdateOverlay 3
NtGdiDdWaitForVerticalBlank 2
NtGdiDvpCanCreateVideoPort 2
NtGdiDvpColorControl 2
NtGdiDvpCreateVideoPort 2
NtGdiDvpDestroyVideoPort 2
NtGdiDvpFlipVideoPort 4
NtGdiDvpGetVideoPortBandwidth 2
NtGdiDvpGetVideoPortField 2
NtGdiDvpGetVideoPortFlipStatus 2
NtGdiDvpGetVideoPortInputFormats 2
NtGdiDvpGetVideoPortLine 2
NtGdiDvpGetVideoPortOutputFormats 2
NtGdiDvpGetVideoPortConnectInfo 2
NtGdiDvpGetVideoSignalStatus 2
NtGdiDvpUpdateVideoPort 4
NtGdiDvpWaitForVideoPortSync 2
NtGdiDvpAcquireNotification 3
NtGdiDvpReleaseNotification 2
NtGdiDxgGenericThunk 6
NtGdiDeleteClientObj 1
NtGdiDeleteColorSpace 1
NtGdiDeleteColorTransform 2
NtGdiDeleteObjectApp 1
NtGdiDescribePixelFormat 4
NtGdiDestroyOPMProtectedOutput 1
NtGdiGetPerBandInfo 2
NtGdiDoBanding 4
NtGdiDoPalette 6
NtGdiDrawEscape 4
NtGdiEllipse 5
NtGdiEnableEudc 1
NtGdiEndDoc 1
NtGdiEndPage 1
NtGdiEndPath 1
NtGdiEnumFontChunk 5
NtGdiEnumFontClose 1
NtGdiEnumFontOpen 7
NtGdiEnumObjects 4
NtGdiEqualRgn 2
NtGdiEudcLoadUnloadLink 7
NtGdiExcludeClipRect 5
NtGdiExtCreatePen 11
NtGdiExtCreateRegion 3
NtGdiExtEscape 8
NtGdiExtFloodFill 5
NtGdiExtGetObjectW 3
NtGdiExtSelectClipRgn 3
NtGdiExtTextOutW 9
NtGdiFillPath 1
NtGdiFillRgn 3
NtGdiFlattenPath 1
NtGdiFlush 0
NtGdiForceUFIMapping 2
NtGdiFrameRgn 5
NtGdiFullscreenControl 5
NtGdiGetAndSetDCDword 4
NtGdiGetAppClipBox 2
NtGdiGetBitmapBits 3
NtGdiGetBitmapDimension 2
NtGdiGetBoundsRect 3
NtGdiGetCertificate 4
NtGdiGetCertificateSize 3
NtGdiGetCharABCWidthsW 6
NtGdiGetCharacterPlacementW 6
NtGdiGetCharSet 1
NtGdiGetCharWidthW 6
NtGdiGetCharWidthInfo 2
NtGdiGetColorAdjustment 2
NtGdiGetColorSpaceforBitmap 1
NtGdiGetCOPPCompatibleOPMInformation 3
NtGdiGetDCDword 3
NtGdiGetDCforBitmap 1
NtGdiGetDCObject 2
NtGdiGetDCPoint 3
NtGdiGetDeviceCaps 2
NtGdiGetDeviceGammaRamp 2
NtGdiGetDeviceCapsAll 2
NtGdiGetDIBitsInternal 9
NtGdiGetETM 2
NtGdiGetEudcTimeStampEx 3
NtGdiGetFontData 5
NtGdiGetFontResourceInfoInternalW 7
NtGdiGetGlyphIndicesW 5
NtGdiGetGlyphIndicesWInternal 6
NtGdiGetGlyphOutline 8
NtGdiGetOPMInformation 3
NtGdiGetKerningPairs 3
NtGdiGetLinkedUFIs 3
NtGdiGetMiterLimit 2
NtGdiGetMonitorID 3
NtGdiGetNearestColor 2
NtGdiGetNearestPaletteIndex 2
NtGdiGetObjectBitmapHandle 2
NtGdiGetOPMRandomNumber 2
NtGdiGetOutlineTextMetricsInternalW 4
NtGdiGetPath 4
NtGdiGetPixel 3
NtGdiGetRandomRgn 3
NtGdiGetRasterizerCaps 2
NtGdiGetRealizationInfo 3
NtGdiGetRegionData 3
NtGdiGetRgnBox 2
NtGdiGetServerMetaFileBits 7
NtGdiGetSpoolMessage 4
NtGdiGetStats 5
NtGdiGetStockObject 1
NtGdiGetStringBitmapW 5
NtGdiGetSuggestedOPMProtectedOutputArraySize 2
NtGdiGetSystemPaletteUse 1
NtGdiGetTextCharsetInfo 3
NtGdiGetTextExtent 5
NtGdiGetTextExtentExW 8
NtGdiGetTextFaceW 4
NtGdiGetTextMetricsW 3
NtGdiGetTransform 3
NtGdiGetUFI 6
NtGdiGetEmbUFI 7
NtGdiGetUFIPathname 10
NtGdiGetEmbedFonts 0
NtGdiChangeGhostFont 2
NtGdiAddEmbFontToDC 2
NtGdiGetFontUnicodeRanges 2
NtGdiGetWidthTable 7
NtGdiGradientFill 6
NtGdiHfontCreate 5
NtGdiIcmBrushInfo 8
NtGdiInit 0
NtGdiInitSpool 0
NtGdiIntersectClipRect 5
NtGdiInvertRgn 2
NtGdiLineTo 3
NtGdiMakeFontDir 5
NtGdiMakeInfoDC 2
NtGdiMaskBlt 13
NtGdiModifyWorldTransform 3
NtGdiMonoBitmap 1
NtGdiMoveTo 4
NtGdiOffsetClipRgn 3
NtGdiOffsetRgn 3
NtGdiOpenDCW 8
NtGdiPatBlt 6
NtGdiPolyPatBlt 5
NtGdiPathToRegion 1
NtGdiPlgBlt 11
NtGdiPolyDraw 4
NtGdiPolyPolyDraw 5
NtGdiPolyTextOutW 4
NtGdiPtInRegion 3
NtGdiPtVisible 3
NtGdiQueryFonts 3
NtGdiQueryFontAssocInfo 1
NtGdiRectangle 5
NtGdiRectInRegion 2
NtGdiRectVisible 2
NtGdiRemoveFontResourceW 6
NtGdiRemoveFontMemResourceEx 1
NtGdiResetDC 5
NtGdiResizePalette 2
NtGdiRestoreDC 2
NtGdiRoundRect 7
NtGdiSaveDC 1
NtGdiScaleViewportExtEx 6
NtGdiScaleWindowExtEx 6
NtGdiSelectBitmap 2
NtGdiSelectBrush 2
NtGdiSelectClipPath 2
NtGdiSelectFont 2
NtGdiSelectPen 2
NtGdiSetBitmapAttributes 2
NtGdiSetBitmapBits 3
NtGdiSetBitmapDimension 4
NtGdiSetBoundsRect 3
NtGdiSetBrushAttributes 2
NtGdiSetBrushOrg 4
NtGdiSetColorAdjustment 2
NtGdiSetColorSpace 2
NtGdiSetDeviceGammaRamp 2
NtGdiSetDIBitsToDeviceInternal 16
NtGdiSetFontEnumeration 1
NtGdiSetFontXform 3
NtGdiSetIcmMode 3
NtGdiSetLinkedUFIs 3
NtGdiSetMagicColors 3
NtGdiSetMetaRgn 1
NtGdiSetMiterLimit 3
NtGdiGetDeviceWidth 1
NtGdiMirrorWindowOrg 1
NtGdiSetLayout 3
NtGdiSetOPMSigningKeyAndSequenceNumbers 2
NtGdiSetPixel 4
NtGdiSetPixelFormat 2
NtGdiSetRectRgn 5
NtGdiSetSystemPaletteUse 2
NtGdiSetTextJustification 3
NtGdiSetupPublicCFONT 3
NtGdiSetVirtualResolution 5
NtGdiSetSizeDevice 3
NtGdiStartDoc 4
NtGdiStartPage 1
NtGdiStretchBlt 12
NtGdiStretchDIBitsInternal 16
NtGdiStrokeAndFillPath 1
NtGdiStrokePath 1
NtGdiSwapBuffers 1
NtGdiTransformPoints 5
NtGdiTransparentBlt 11
NtGdiUnloadPrinterDriver 2
NtGdiUnmapMemFont 1
NtGdiUnrealizeObject 1
NtGdiUpdateColors 1
NtGdiWidenPath 1
NtUserActivateKeyboardLayout 2
NtUserAddClipboardFormatListener 1
NtUserAlterWindowStyle 3
NtUserAssociateInputContext 3
NtUserAttachThreadInput 3
NtUserBeginPaint 2
NtUserBitBltSysBmp 8
NtUserBlockInput 1
NtUserBuildHimcList 4
NtUserBuildHwndList 7
NtUserBuildNameList 4
NtUserBuildPropList 4
NtUserCallHwnd 2
NtUserCallHwndLock 2
NtUserCallHwndOpt 2
NtUserCallHwndParam 3
NtUserCallHwndParamLock 3
NtUserCallMsgFilter 2
NtUserCallNextHookEx 4
NtUserCallNoParam 1
NtUserCallOneParam 2
NtUserCallTwoParam 3
NtUserChangeClipboardChain 2
NtUserChangeDisplaySettings 4
NtUserCheckAccessForIntegrityLevel 3
NtUserCheckDesktopByThreadId 1
NtUserCheckWindowThreadDesktop 3
NtUserCheckImeHotKey 2
NtUserCheckMenuItem 3
NtUserChildWindowFromPointEx 4
NtUserClipCursor 1
NtUserCloseClipboard 0
NtUserCloseDesktop 1
NtUserCloseWindowStation 1
NtUserConsoleControl 3
NtUserConvertMemHandle 2
NtUserCopyAcceleratorTable 3
NtUserCountClipboardFormats 0
NtUserCreateAcceleratorTable 2
NtUserCreateCaret 4
NtUserCreateDesktopEx 6
NtUserCreateInputContext 1
NtUserCreateLocalMemHandle 4
NtUserCreateWindowEx 15
NtUserCreateWindowStation 7
NtUserDdeInitialize 5
NtUserDeferWindowPos 8
NtUserDefSetText 2
NtUserDeleteMenu 3
NtUserDestroyAcceleratorTable 1
NtUserDestroyCursor 2
NtUserDestroyInputContext 1
NtUserDestroyMenu 1
NtUserDestroyWindow 1
NtUserDisableThreadIme 1
NtUserDispatchMessage 1
NtUserDoSoundConnect 0
NtUserDoSoundDisconnect 0
NtUserDragDetect 3
NtUserDragObject 5
NtUserDrawAnimatedRects 4
NtUserDrawCaption 4
NtUserDrawCaptionTemp 7
NtUserDrawIconEx 11
NtUserDrawMenuBarTemp 5
NtUserEmptyClipboard 0
NtUserEnableMenuItem 3
NtUserEnableScrollBar 3
NtUserEndDeferWindowPosEx 2
NtUserEndMenu 0
NtUserEndPaint 2
NtUserEnumDisplayDevices 4
NtUserEnumDisplayMonitors 4
NtUserEnumDisplaySettings 4
NtUserEvent 1
NtUserExcludeUpdateRgn 2
NtUserFillWindow 4
NtUserFindExistingCursorIcon 3
NtUserFindWindowEx 5
NtUserFlashWindowEx 1
NtUserFrostCrashedWindow 2
NtUserGetAltTabInfo 6
NtUserGetAncestor 2
NtUserGetAppImeLevel 1
NtUserGetAsyncKeyState 1
NtUserGetAtomName 2
NtUserGetCaretBlinkTime 0
NtUserGetCaretPos 1
NtUserGetClassInfoEx 5
NtUserGetClassName 3
NtUserGetClipboardData 2
NtUserGetClipboardFormatName 3
NtUserGetClipboardOwner 0
NtUserGetClipboardSequenceNumber 0
NtUserGetClipboardViewer 0
NtUserGetClipCursor 1
NtUserGetComboBoxInfo 2
NtUserGetControlBrush 3
NtUserGetControlColor 4
NtUserGetCPD 3
NtUserGetCursorFrameInfo 4
NtUserGetCursorInfo 1
NtUserGetDC 1
NtUserGetDCEx 3
NtUserGetDoubleClickTime 0
NtUserGetForegroundWindow 0
NtUserGetGuiResources 2
NtUserGetGUIThreadInfo 2
NtUserGetIconInfo 6
NtUserGetIconSize 4
NtUserGetImeHotKey 4
NtUserGetImeInfoEx 2
NtUserGetInternalWindowPos 3
NtUserGetKeyboardLayoutList 2
NtUserGetKeyboardLayoutName 1
NtUserGetKeyboardState 1
NtUserGetKeyNameText 3
NtUserGetKeyState 1
NtUserGetListBoxInfo 1
NtUserGetMenuBarInfo 4
NtUserGetMenuIndex 2
NtUserGetMenuItemRect 4
NtUserGetMessage 4
NtUserGetMouseMovePointsEx 5
NtUserGetObjectInformation 5
NtUserGetOpenClipboardWindow 0
NtUserGetPriorityClipboardFormat 2
NtUserGetProcessWindowStation 0
NtUserGetRawInputBuffer 3
NtUserGetRawInputData 5
NtUserGetRawInputDeviceInfo 4
NtUserGetRawInputDeviceList 3
NtUserGetRegisteredRawInputDevices 3
NtUserGetScrollBarInfo 3
NtUserGetSystemMenu 2
NtUserGetThreadDesktop 2
NtUserGetThreadState 1
NtUserGetTitleBarInfo 2
NtUserGetUpdatedClipboardFormats 3
NtUserGetUpdateRect 3
NtUserGetUpdateRgn 3
NtUserGetWindowDC 1
NtUserGetWindowPlacement 2
NtUserGetWOWClass 2
NtUserGhostWindowFromHungWindow 1
NtUserHardErrorControl 3
NtUserHideCaret 1
NtUserHiliteMenuItem 4
NtUserHungWindowFromGhostWindow 1
NtUserImpersonateDdeClientWindow 2
NtUserInitialize 2
NtUserInitializeClientPfnArrays 4
NtUserInitTask 12
NtUserInternalGetWindowText 3
NtUserInternalGetWindowIcon 2
NtUserInvalidateRect 3
NtUserInvalidateRgn 3
NtUserIsClipboardFormatAvailable 1
NtUserKillTimer 2
NtUserLoadKeyboardLayoutEx 7
NtUserLockWindowStation 1
NtUserLockWindowUpdate 1
NtUserLockWorkStation 0
NtUserLogicalToPhysicalPoint 2
NtUserMapVirtualKeyEx 4
NtUserMenuItemFromPoint 4
NtUserMessageCall 7
NtUserMinMaximize 3
NtUserMNDragLeave 0
NtUserMNDragOver 2
NtUserModifyUserStartupInfoFlags 2
NtUserMoveWindow 6
NtUserNotifyIMEStatus 3
NtUserNotifyProcessCreate 4
NtUserNotifyWinEvent 4
NtUserOpenClipboard 2
NtUserOpenDesktop 3
NtUserOpenInputDesktop 3
NtUserOpenThreadDesktop 5
NtUserOpenWindowStation 2
NtUserPaintDesktop 1
NtUserPaintMonitor 3
NtUserPeekMessage 5
NtUserPhysicalToLogicalPoint 2
NtUserPostMessage 4
NtUserPostThreadMessage 4
NtUserPrintWindow 3
NtUserProcessConnect 2
NtUserQueryInformationThread 4
NtUserQueryInputContext 2
NtUserQuerySendMessage 1
NtUserQueryWindow 2
NtUserRealChildWindowFromPoint 3
NtUserRealInternalGetMessage 6
NtUserRealWaitMessageEx 2
NtUserRedrawWindow 4
NtUserRegisterClassExWOW 7
NtUserRegisterErrorReportingDialog 2
NtUserRegisterUserApiHook 4
NtUserRegisterHotKey 4
NtUserRegisterRawInputDevices 3
NtUserRegisterTasklist 1
NtUserRegisterWindowMessage 1
NtUserRemoveClipboardFormatListener 1
NtUserRemoveMenu 3
NtUserRemoveProp 2
NtUserResolveDesktop 4
NtUserResolveDesktopForWOW 1
NtUserSBGetParms 4
NtUserScrollDC 7
NtUserScrollWindowEx 8
NtUserSelectPalette 3
NtUserSendInput 3
NtUserSetActiveWindow 1
NtUserSetAppImeLevel 2
NtUserSetCapture 1
NtUserSetClassLong 4
NtUserSetClassWord 3
NtUserSetClipboardData 3
NtUserSetClipboardViewer 1
NtUserSetConsoleReserveKeys 2
NtUserSetCursor 1
NtUserSetCursorContents 2
NtUserSetCursorIconData 4
NtUserSetFocus 1
NtUserSetImeHotKey 5
NtUserSetImeInfoEx 1
NtUserSetImeOwnerWindow 2
NtUserSetInformationProcess 4
NtUserSetInformationThread 4
NtUserSetInternalWindowPos 4
NtUserSetKeyboardState 1
NtUserSetMenu 3
NtUserSetMenuContextHelpId 2
NtUserSetMenuDefaultItem 3
NtUserSetMenuFlagRtoL 1
NtUserSetObjectInformation 4
NtUserSetParent 2
NtUserSetProcessWindowStation 1
NtUserGetProp 2
NtUserSetProp 3
NtUserSetScrollInfo 4
NtUserSetShellWindowEx 2
NtUserSetSysColors 4
NtUserSetSystemCursor 2
NtUserSetSystemMenu 2
NtUserSetSystemTimer 3
NtUserSetThreadDesktop 1
NtUserSetThreadLayoutHandles 2
NtUserSetThreadState 2
NtUserSetTimer 4
NtUserSetProcessDPIAware 0
NtUserSetWindowFNID 2
NtUserSetWindowLong 4
NtUserSetWindowPlacement 2
NtUserSetWindowPos 7
NtUserSetWindowRgn 3
NtUserGetWindowRgnEx 3
NtUserSetWindowRgnEx 3
NtUserSetWindowsHookAW 3
NtUserSetWindowsHookEx 6
NtUserSetWindowStationUser 4
NtUserSetWindowWord 3
NtUserSetWinEventHook 8
NtUserShowCaret 1
NtUserShowScrollBar 3
NtUserShowWindow 2
NtUserShowWindowAsync 2
NtUserSoundSentry 0
NtUserSwitchDesktop 2
NtUserSystemParametersInfo 4
NtUserTestForInteractiveUser 1
NtUserThunkedMenuInfo 2
NtUserThunkedMenuItemInfo 6
NtUserToUnicodeEx 7
NtUserTrackMouseEvent 1
NtUserTrackPopupMenuEx 6
NtUserCalcMenuBar 5
NtUserPaintMenuBar 6
NtUserTranslateAccelerator 3
NtUserTranslateMessage 2
NtUserUnhookWindowsHookEx 1
NtUserUnhookWinEvent 1
NtUserUnloadKeyboardLayout 1
NtUserUnlockWindowStation 1
NtUserUnregisterClass 3
NtUserUnregisterUserApiHook 0
NtUserUnregisterHotKey 2
NtUserUpdateInputContext 3
NtUserUpdateInstance 3
NtUserUpdateLayeredWindow 10
NtUserGetLayeredWindowAttributes 4
NtUserSetLayeredWindowAttributes 4
NtUserUpdatePerUserSystemParameters 1
NtUserUserHandleGrantAccess 3
NtUserValidateHandleSecure 1
NtUserValidateRect 2
NtUserValidateTimerCallback 1
NtUserVkKeyScanEx 3
NtUserWaitForInputIdle 3
NtUserWaitForMsgAndEvent 1
NtUserWaitMessage 0
NtUserWin32PoolAllocationStats 6
NtUserWindowFromPhysicalPoint 2
NtUserWindowFromPoint 2
NtUserYieldTask 0
NtUserRemoteConnect 3
NtUserRemoteRedrawRectangle 4
NtUserRemoteRedrawScreen 0
NtUserRemoteStopScreenUpdates 0
NtUserCtxDisplayIOCtl 3
NtUserRegisterSessionPort 1
NtUserUnregisterSessionPort 0
NtUserUpdateWindowTransform 3
NtUserDwmStartRedirection 1
NtUserDwmStopRedirection 0
NtUserDwmHintDxUpdate 2
NtUserDwmGetDxRgn 3
NtUserGetWindowMinimizeRect 2
NtGdiEngAssociateSurface 3
NtGdiEngCreateBitmap 6
NtGdiEngCreateDeviceSurface 4
NtGdiEngCreateDeviceBitmap 4
NtGdiEngCreatePalette 6
NtGdiEngComputeGlyphSet 3
NtGdiEngCopyBits 6
NtGdiEngDeletePalette 1
NtGdiEngDeleteSurface 1
NtGdiEngEraseSurface 3
NtGdiEngUnlockSurface 1
NtGdiEngLockSurface 1
NtGdiEngBitBlt 11
NtGdiEngStretchBlt 11
NtGdiEngPlgBlt 11
NtGdiEngMarkBandingSurface 1
NtGdiEngStrokePath 8
NtGdiEngFillPath 7
NtGdiEngStrokeAndFillPath 10
NtGdiEngPaint 5
NtGdiEngLineTo 9
NtGdiEngAlphaBlend 7
NtGdiEngGradientFill 10
NtGdiEngTransparentBlt 8
NtGdiEngTextOut 10
NtGdiEngStretchBltROP 13
NtGdiXLATEOBJ_cGetPalette 4
NtGdiXLATEOBJ_iXlate 2
NtGdiXLATEOBJ_hGetColorTransform 1
NtGdiCLIPOBJ_bEnum 3
NtGdiCLIPOBJ_cEnumStart 5
NtGdiCLIPOBJ_ppoGetPath 1
NtGdiEngDeletePath 1
NtGdiEngCreateClip 0
NtGdiEngDeleteClip 1
NtGdiBRUSHOBJ_ulGetBrushColor 1
NtGdiBRUSHOBJ_pvAllocRbrush 2
NtGdiBRUSHOBJ_pvGetRbrush 1
NtGdiBRUSHOBJ_hGetColorTransform 1
NtGdiXFORMOBJ_bApplyXform 5
NtGdiXFORMOBJ_iGetXform 2
NtGdiFONTOBJ_vGetInfo 3
NtGdiFONTOBJ_pxoGetXform 1
NtGdiFONTOBJ_cGetGlyphs 5
NtGdiFONTOBJ_pifi 1
NtGdiFONTOBJ_pfdg 1
NtGdiFONTOBJ_pQueryGlyphAttrs 2
NtGdiFONTOBJ_pvTrueTypeFontFile 2
NtGdiFONTOBJ_cGetAllGlyphHandles 2
NtGdiSTROBJ_bEnum 3
NtGdiSTROBJ_bEnumPositionsOnly 3
NtGdiSTROBJ_bGetAdvanceWidths 4
NtGdiSTROBJ_vEnumStart 1
NtGdiSTROBJ_dwGetCodePage 1
NtGdiPATHOBJ_vGetBounds 2
NtGdiPATHOBJ_bEnum 2
NtGdiPATHOBJ_vEnumStart 1
NtGdiPATHOBJ_vEnumStartClipLines 4
NtGdiPATHOBJ_bEnumClipLines 3
NtGdiGetDhpdev 1
NtGdiEngCheckAbort 1
NtGdiHT_Get8BPPFormatPalette 4
NtGdiHT_Get8BPPMaskPalette 6
NtGdiUpdateTransform 1
NtGdiSetPUMPDOBJ 4
NtGdiBRUSHOBJ_DeleteRbrush 2
NtGdiUMPDEngFreeUserMem 1
NtGdiDrawStream 3
NtGdiDwmGetDirtyRgn 5
NtGdiDwmGetSurfaceData 2
NtGdiDdDDICreateAllocation 1
NtGdiDdDDIQueryResourceInfo 1
NtGdiDdDDIOpenResource 1
NtGdiDdDDIDestroyAllocation 1
NtGdiDdDDISetAllocationPriority 1
NtGdiDdDDIQueryAllocationResidency 1
NtGdiDdDDICreateDevice 1
NtGdiDdDDIDestroyDevice 1
NtGdiDdDDICreateContext 1
NtGdiDdDDIDestroyContext 1
NtGdiDdDDICreateSynchronizationObject 1
NtGdiDdDDIDestroySynchronizationObject 1
NtGdiDdDDIWaitForSynchronizationObject 1
NtGdiDdDDISignalSynchronizationObject 1
NtGdiDdDDIGetRuntimeData 1
NtGdiDdDDIQueryAdapterInfo 1
NtGdiDdDDILock 1
NtGdiDdDDIUnlock 1
NtGdiDdDDIGetDisplayModeList 1
NtGdiDdDDISetDisplayMode 1
NtGdiDdDDIGetMultisampleMethodList 1
NtGdiDdDDIPresent 1
NtGdiDdDDIRender 1
NtGdiDdDDIOpenAdapterFromDeviceName 1
NtGdiDdDDIOpenAdapterFromHdc 1
NtGdiDdDDICloseAdapter 1
NtGdiDdDDIGetSharedPrimaryHandle 1
NtGdiDdDDIEscape 1
NtGdiDdDDIQueryStatistics 1
NtGdiDdDDISetVidPnSourceOwner 1
NtGdiDdDDIGetPresentHistory 1
NtGdiDdDDICreateOverlay 1
NtGdiDdDDIUpdateOverlay 1
NtGdiDdDDIFlipOverlay 1
NtGdiDdDDIDestroyOverlay 1
NtGdiDdDDIWaitForVerticalBlankEvent 1
NtGdiDdDDISetGammaRamp 1
NtGdiDdDDIGetDeviceState 1
NtGdiDdDDICreateDCFromMemory 1
NtGdiDdDDIDestroyDCFromMemory 1
NtGdiDdDDISetContextSchedulingPriority 1
NtGdiDdDDIGetContextSchedulingPriority 1
NtGdiDdDDISetProcessSchedulingPriorityClass 2
NtGdiDdDDIGetProcessSchedulingPriorityClass 2
NtGdiDdDDIReleaseProcessVidPnSourceOwners 1
NtGdiDdDDIGetScanLine 1
NtGdiDdDDISetQueuedLimit 1
NtGdiDdDDIPollDisplayChildren 1
NtGdiDdDDIInvalidateActiveVidPn 1
NtGdiDdDDICheckOcclusion 1
NtGdiDdDDIWaitForIdle 1
NtGdiDdDDICheckMonitorPowerState 1
NtGdiDdDDICheckExclusiveOwnership 0
NtGdiDdDDISetDisplayPrivateDriverFormat 1
NtGdiDdDDISharedPrimaryLockNotification 1
NtGdiDdDDISharedPrimaryUnLockNotification 1
NtGdiMakeObjectXferable 2
NtGdiMakeObjectUnXferable 1
NtGdiGetNumberOfPhysicalMonitors 2
NtGdiGetPhysicalMonitors 4
NtGdiGetPhysicalMonitorDescription 3
NtGdiDestroyPhysicalMonitor 1
NtGdiDDCCIGetVCPFeature 5
NtGdiDDCCISetVCPFeature 3
NtGdiDDCCISaveCurrentSettings 1
NtGdiDDCCIGetCapabilitiesStringLength 2
NtGdiDDCCIGetCapabilitiesString 3
NtGdiDDCCIGetTimingReport 2
NtUserSetMirrorRendering 2
NtUserShowSystemCursor 1

View file

@ -1,11 +0,0 @@
spec2def(w32kdll_xpsp2.dll w32kdll_xpsp2.spec ADD_IMPORTLIB)
add_asm_files(w32kdll_xpsp2_asm sys-stubs.S)
add_library(w32kdll_xpsp2 SHARED
main.c
${w32kdll_xpsp2_asm}
${CMAKE_CURRENT_BINARY_DIR}/w32kdll_xpsp2.def)
set_module_type(w32kdll_xpsp2 module)
add_dependencies(w32kdll_xpsp2 psdk)

View file

@ -1,22 +0,0 @@
add_definitions(-D_DLL -D__USE_CRTIMP)
include_directories(${REACTOS_SOURCE_DIR}/win32ss/include)
list(APPEND SOURCE
osver.c
testlist.c
w32knapi.c
w32knapi.rc)
add_executable(w32knapi ${SOURCE})
target_link_libraries(w32knapi apitest)
set_module_type(w32knapi win32cui)
add_importlibs(w32knapi
w32kdll_ros # w32kdll_2ksp4 w32kdll_xpsp2 w32kdll_2k3sp2 w32kdll_vista
gdi32
user32
shell32
advapi32
msvcrt
kernel32
ntdll)

View file

@ -1,18 +0,0 @@
INT
Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti)
{
HANDLE hDirectDraw;
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
ASSERT(hdc != NULL);
/* Test ReactX */
RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL);
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
/* Cleanup ReactX setup */
DeleteDC(hdc);
NtGdiDdDeleteDirectDrawObject(hDirectDraw);
return APISTATUS_NORMAL;
}

View file

@ -1,20 +0,0 @@
INT
Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti)
{
HANDLE hDirectDraw;
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
ASSERT(hdc != NULL);
/* Test ReactX */
RTEST(NtGdiDdDeleteDirectDrawObject(NULL) == FALSE);
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
ASSERT(hDirectDraw != NULL);
RTEST(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE);
/* Cleanup ReactX setup */
DeleteDC(hdc);
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +0,0 @@
INT
Test_NtGdiCreateCompatibleBitmap(PTESTINFO pti)
{
return APISTATUS_NORMAL;
}

View file

@ -1,20 +0,0 @@
INT
Test_NtGdiEngCreatePalette(PTESTINFO pti)
{
HPALETTE hPal;
ULONG Colors[3] = {1,2,3};
PGDI_TABLE_ENTRY pEntry;
hPal = NtGdiEngCreatePalette(PAL_RGB, 3, Colors, 0xff000000, 0x00ff0000, 0x0000ff00);
TEST(hPal != 0);
TEST(GDI_HANDLE_GET_TYPE(hPal) == GDI_OBJECT_TYPE_PALETTE);
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(hPal)];
TEST(pEntry->KernelData != NULL);
TEST(pEntry->ProcessId == GetCurrentProcessId());
TEST(pEntry->UserData == 0);
TEST(pEntry->Type == (((UINT)hPal >> 16) | GDI_OBJECT_TYPE_PALETTE));
return APISTATUS_NORMAL;
}

View file

@ -1,25 +0,0 @@
INT
Test_HwndOptRoutine_SetProgmanWindow(PTESTINFO pti) /* 0x4a */
{
// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
return APISTATUS_NORMAL;
}
INT
Test_HwndOptRoutine_SetTaskmanWindow (PTESTINFO pti) /* 0x4b */
{
// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
return APISTATUS_NORMAL;
}
INT
Test_NtUserCallHwndOpt(PTESTINFO pti)
{
Test_HwndOptRoutine_SetProgmanWindow(pti); /* 0x4a */
Test_HwndOptRoutine_SetTaskmanWindow (pti); /* 0x4b */
return APISTATUS_NORMAL;
}

View file

@ -1,7 +0,0 @@
INT
Test_NtUserCallHwndParamLock(PTESTINFO pti)
{
return APISTATUS_NORMAL;
}

View file

@ -1,69 +0,0 @@
INT
Test_NoParamRoutine_CreateMenu(PTESTINFO pti) /* 0 */
{
HMENU hMenu;
hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENU);
TEST(IsMenu(hMenu) == TRUE);
DestroyMenu(hMenu);
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_CreatePopupMenu(PTESTINFO pti) /* 1 */
{
HMENU hMenu;
hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENUPOPUP);
TEST(IsMenu(hMenu) == TRUE);
DestroyMenu(hMenu);
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_DisableProcessWindowsGhosting(PTESTINFO pti) /* 2 */
{
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_ClearWakeMask(PTESTINFO pti) /* 3 */
{
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_AllowForegroundActivation(PTESTINFO pti) /* 4 */
{
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_DestroyCaret(PTESTINFO pti) /* 5 */
{
return APISTATUS_NORMAL;
}
INT
Test_NoParamRoutine_LoadUserApiHook(PTESTINFO pti) /* 0x1d */
{
//DWORD dwRet;
/* dwRet = */NtUserCallNoParam(_NOPARAM_ROUTINE_LOADUSERAPIHOOK);
// TEST(dwRet != 0);
return APISTATUS_NORMAL;
}
INT
Test_NtUserCallNoParam(PTESTINFO pti)
{
Test_NoParamRoutine_CreateMenu(pti);
Test_NoParamRoutine_CreatePopupMenu(pti);
Test_NoParamRoutine_LoadUserApiHook(pti); /* 0x1d */
return APISTATUS_NORMAL;
}

View file

@ -1,15 +0,0 @@
/* First the call stub */
DWORD WINAPI
NtUserCountClipboardFormats(VOID)
{
DWORD p;
return Syscall(L"NtUserCountClipboardFormats", 0, &p);
}
INT
Test_NtUserCountClipboardFormats(PTESTINFO pti)
{
RTEST(NtUserCountClipboardFormats() < 1000);
return APISTATUS_NORMAL;
}

View file

@ -1,7 +0,0 @@
INT
Test_NtUserFindExistingCursoricon(PTESTINFO pti)
{
return APISTATUS_NORMAL;
}

View file

@ -1,40 +0,0 @@
INT
Test_NtUserGetTitleBarInfo(PTESTINFO pti)
{
HWND hWnd;
TITLEBARINFO tbi;
hWnd = CreateWindowA("BUTTON",
"Test",
BS_PUSHBUTTON | WS_VISIBLE,
0,
0,
50,
30,
NULL,
NULL,
g_hInstance,
0);
ASSERT(hWnd);
/* FALSE case */
/* no windows handle */
TEST(NtUserGetTitleBarInfo(NULL, &tbi) == FALSE);
/* no TITLEBARINFO struct */
TEST(NtUserGetTitleBarInfo(hWnd, NULL) == FALSE);
/* nothing */
TEST(NtUserGetTitleBarInfo(NULL, NULL) == FALSE);
/* wrong size */
tbi.cbSize = 0;
TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == FALSE);
/* TRUE case */
tbi.cbSize = sizeof(TITLEBARINFO);
TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == TRUE);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -1,15 +0,0 @@
INT
Test_NtUserSetTimer(PTESTINFO pti)
{
// check valid argument
// check for replacement / new timers
// check when expiries are handled (msgs and calls)
return APISTATUS_NORMAL;
}

View file

@ -1,136 +0,0 @@
#include "w32knapi.h"
/* include the tests */
#include "ntdd/NtGdiDdCreateDirectDrawObject.c"
#include "ntdd/NtGdiDdDeleteDirectDrawObject.c"
#include "ntdd/NtGdiDdQueryDirectDrawObject.c"
#include "ntgdi/NtGdiArcInternal.c"
#include "ntgdi/NtGdiBitBlt.c"
#include "ntgdi/NtGdiCombineRgn.c"
#include "ntgdi/NtGdiCreateBitmap.c"
#include "ntgdi/NtGdiCreateCompatibleBitmap.c"
#include "ntgdi/NtGdiCreateCompatibleDC.c"
#include "ntgdi/NtGdiCreateDIBSection.c"
#include "ntgdi/NtGdiDeleteObjectApp.c"
#include "ntgdi/NtGdiDoPalette.c"
#include "ntgdi/NtGdiEngCreatePalette.c"
//#include "ntgdi/NtGdiEnumFontChunk.c"
#include "ntgdi/NtGdiEnumFontOpen.c"
//#include "ntgdi/NtGdiExtCreatePen.c"
#include "ntgdi/NtGdiExtTextOutW.c"
#include "ntgdi/NtGdiFlushUserBatch.c"
#include "ntgdi/NtGdiGetBitmapBits.c"
#include "ntgdi/NtGdiGetFontResourceInfoInternalW.c"
#include "ntgdi/NtGdiGetRandomRgn.c"
#include "ntgdi/NtGdiPolyPolyDraw.c"
#include "ntgdi/NtGdiRestoreDC.c"
#include "ntgdi/NtGdiSaveDC.c"
#include "ntgdi/NtGdiSelectBitmap.c"
#include "ntgdi/NtGdiSelectBrush.c"
#include "ntgdi/NtGdiSelectFont.c"
#include "ntgdi/NtGdiSelectPen.c"
#include "ntgdi/NtGdiSetBitmapBits.c"
#include "ntgdi/NtGdiSetDIBitsToDeviceInternal.c"
//#include "ntgdi/NtGdiSTROBJ_vEnumStart.c"
#include "ntgdi/NtGdiGetDIBits.c"
#include "ntgdi/NtGdiGetStockObject.c"
#include "ntuser/NtUserCallHwnd.c"
#include "ntuser/NtUserCallHwndLock.c"
#include "ntuser/NtUserCallHwndOpt.c"
#include "ntuser/NtUserCallHwndParam.c"
#include "ntuser/NtUserCallHwndParamLock.c"
#include "ntuser/NtUserCallNoParam.c"
#include "ntuser/NtUserCallOneParam.c"
#include "ntuser/NtUserCountClipboardFormats.c"
//#include "ntuser/NtUserCreateWindowEx.c"
#include "ntuser/NtUserEnumDisplayMonitors.c"
#include "ntuser/NtUserEnumDisplaySettings.c"
#include "ntuser/NtUserFindExistingCursorIcon.c"
#include "ntuser/NtUserGetClassInfo.c"
#include "ntuser/NtUserGetIconInfo.c"
#include "ntuser/NtUserGetTitleBarInfo.c"
#include "ntuser/NtUserProcessConnect.c"
#include "ntuser/NtUserRedrawWindow.c"
#include "ntuser/NtUserScrollDC.c"
#include "ntuser/NtUserSelectPalette.c"
#include "ntuser/NtUserSetTimer.c"
#include "ntuser/NtUserSystemParametersInfo.c"
#include "ntuser/NtUserToUnicodeEx.c"
#include "ntuser/NtUserUpdatePerUserSystemParameters.c"
/* The List of tests */
TESTENTRY TestList[] =
{
/* DirectDraw */
{ L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject },
{ L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject },
{ L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject },
/* ntgdi */
{ L"NtGdiArcInternal", Test_NtGdiArcInternal },
{ L"NtGdiBitBlt", Test_NtGdiBitBlt },
{ L"NtGdiCombineRgn", Test_NtGdiCombineRgn },
{ L"NtGdiCreateBitmap", Test_NtGdiCreateBitmap },
{ L"NtGdiCreateCompatibleBitmap", Test_NtGdiCreateCompatibleBitmap },
{ L"NtGdiCreateCompatibleDC", Test_NtGdiCreateCompatibleDC },
{ L"NtGdiCreateDIBSection", Test_NtGdiCreateDIBSection },
{ L"NtGdiDeleteObjectApp", Test_NtGdiDeleteObjectApp },
{ L"NtGdiDoPalette", Test_NtGdiDoPalette },
{ L"NtGdiEngCreatePalette", Test_NtGdiEngCreatePalette },
// { L"NtGdiEnumFontChunk", Test_NtGdiEnumFontChunk },
{ L"NtGdiEnumFontOpen", Test_NtGdiEnumFontOpen },
// { L"NtGdiExtCreatePen", Test_NtGdiExtCreatePen },
{ L"NtGdiExtTextOutW", Test_NtGdiExtTextOutW },
{ L"NtGdiFlushUserBatch", Test_NtGdiFlushUserBatch },
{ L"NtGdiGetBitmapBits", Test_NtGdiGetBitmapBits },
{ L"NtGdiGetFontResourceInfoInternalW", Test_NtGdiGetFontResourceInfoInternalW },
{ L"NtGdiGetRandomRgn", Test_NtGdiGetRandomRgn },
{ L"NtGdiPolyPolyDraw", Test_NtGdiPolyPolyDraw },
{ L"NtGdiRestoreDC", Test_NtGdiRestoreDC },
{ L"NtGdiSaveDC", Test_NtGdiSaveDC },
{ L"NtGdiSetBitmapBits", Test_NtGdiSetBitmapBits },
{ L"NtGdiSetDIBitsToDeviceInternal", Test_NtGdiSetDIBitsToDeviceInternal },
{ L"NtGdiSelectBitmap", Test_NtGdiSelectBitmap },
{ L"NtGdiSelectBrush", Test_NtGdiSelectBrush },
{ L"NtGdiSelectFont", Test_NtGdiSelectFont },
{ L"NtGdiSelectPen", Test_NtGdiSelectPen },
// { L"NtGdiSTROBJ_vEnumStart", Test_NtGdiSTROBJ_vEnumStart },
{ L"NtGdiGetDIBitsInternal", Test_NtGdiGetDIBitsInternal },
{ L"NtGdiGetStockObject", Test_NtGdiGetStockObject },
/* ntuser */
{ L"NtUserCallHwnd", Test_NtUserCallHwnd },
{ L"NtUserCallHwndLock", Test_NtUserCallHwndLock },
{ L"NtUserCallHwndOpt", Test_NtUserCallHwndOpt },
{ L"NtUserCallHwndParam", Test_NtUserCallHwndParam },
{ L"NtUserCallHwndParamLock", Test_NtUserCallHwndParamLock },
{ L"NtUserCallNoParam", Test_NtUserCallNoParam },
{ L"NtUserCallOneParam", Test_NtUserCallOneParam },
{ L"NtUserCountClipboardFormats", Test_NtUserCountClipboardFormats },
// { L"NtUserCreateWindowEx", Test_NtUserCreateWindowEx },
{ L"NtUserEnumDisplayMonitors", Test_NtUserEnumDisplayMonitors },
{ L"NtUserEnumDisplaySettings", TEST_NtUserEnumDisplaySettings },
{ L"NtUserFindExistingCursorIcon", Test_NtUserFindExistingCursoricon },
{ L"NtUserGetClassInfo", Test_NtUserGetClassInfo },
{ L"NtUserGetIconInfo", Test_NtUserGetIconInfo },
{ L"NtUserGetTitleBarInfo", Test_NtUserGetTitleBarInfo },
{ L"NtUserProcessConnect", Test_NtUserProcessConnect },
{ L"NtUserRedrawWindow", Test_NtUserRedrawWindow },
{ L"NtUserScrollDC", Test_NtUserScrollDC },
{ L"NtUserSelectPalette", Test_NtUserSelectPalette },
{ L"NtUserSetTimer", Test_NtUserSetTimer },
{ L"NtUserSystemParametersInfo", Test_NtUserSystemParametersInfo },
{ L"NtUserToUnicodeEx", Test_NtUserToUnicodeEx },
{ L"NtUserUpdatePerUserSystemParameters", Test_NtUserUpdatePerUserSystemParameters },
};
/* The function that gives us the number of tests */
INT NumTests(void)
{
return sizeof(TestList) / sizeof(TESTENTRY);
}

View file

@ -0,0 +1,6 @@
add_subdirectory(win32kdll_ros)
add_subdirectory(win32kdll_xpsp2)
#add_subdirectory(win32kdll_2ksp4)
add_subdirectory(win32kdll_2k3sp2)
#add_subdirectory(win32kdll_vista)

View file

@ -0,0 +1,11 @@
spec2def(win32kdll_2k3sp2.dll win32kdll_2k3sp2.spec ADD_IMPORTLIB)
add_asm_files(win32kdll_2k3sp2_asm sys-stubs.S)
add_library(win32kdll_2k3sp2 SHARED
main.c
${win32kdll_2k3sp2_asm}
${CMAKE_CURRENT_BINARY_DIR}/win32kdll_2k3sp2.def)
set_module_type(win32kdll_2k3sp2 module)
add_dependencies(win32kdll_2k3sp2 psdk)

View file

@ -7,6 +7,6 @@
SyscallId = HEX(1000)
#define SVC_(name, argcount) STUB_U name, argcount
#include "w32ksvc-2k3sp2.h"
#include "win32ksvc-2k3sp2.h"
END

View file

@ -0,0 +1,11 @@
spec2def(win32kdll_2ksp4.dll win32kdll_2ksp4.spec)
add_asm_files(win32kdll_2ksp4_asm win32kdll_2ksp4.S)
add_library(win32kdll_2ksp4 SHARED
main.c
${win32kdll_2ksp4_asm}
${CMAKE_CURRENT_BINARY_DIR}/win32kdll_2ksp4.def)
set_module_type(win32kdll_2ksp4 module)
add_dependencies(win32kdll_2ksp4 psdk)

View file

@ -0,0 +1,14 @@
include_directories(${REACTOS_SOURCE_DIR}/win32ss)
spec2def(win32kdll.dll win32kdll_ros.spec ADD_IMPORTLIB)
add_asm_files(win32kdll_ros_asm sys-stubs.S)
add_library(win32kdll SHARED
main.c
${win32kdll_ros_asm}
${CMAKE_CURRENT_BINARY_DIR}/win32kdll.def)
set_module_type(win32kdll module)
add_dependencies(win32kdll psdk)
add_cd_file(TARGET win32kdll DESTINATION reactos/bin FOR all)

View file

@ -7,6 +7,6 @@
SyscallId = HEX(1000)
#define SVC_(name, argcount) STUB_U name, argcount
#include "win32ksvc-ros.h"
#include "w32ksvc.h"
END

View file

@ -155,7 +155,7 @@
@ stdcall NtGdiFillPath(ptr)
@ stdcall NtGdiFillRgn(ptr ptr ptr)
@ stdcall NtGdiFlattenPath(ptr)
@ stdcall NtGdiFlushUserBatch()
# @ stdcall NtGdiFlushUserBatch()
@ stdcall NtGdiFlush()
@ stdcall NtGdiForceUFIMapping(ptr ptr)
@ stdcall NtGdiFrameRgn(ptr ptr ptr long long)
@ -238,7 +238,7 @@
@ stdcall NtGdiMoveTo(ptr long long ptr)
@ stdcall NtGdiOffsetClipRgn(ptr long long)
@ stdcall NtGdiOffsetRgn(ptr long long)
@ stdcall NtGdiOpenDCW(ptr ptr ptr long ptr long ptr ptr) # FIXME: 7 params on XP
@ stdcall NtGdiOpenDCW(ptr ptr ptr long ptr long ptr)
@ stdcall NtGdiPatBlt(ptr long long long long long)
@ stdcall NtGdiPolyPatBlt(ptr long ptr long long)
@ stdcall NtGdiPathToRegion(ptr)
@ -331,7 +331,7 @@
@ stdcall NtUserCallOneParam(ptr long)
@ stdcall NtUserCallTwoParam(ptr ptr long)
@ stdcall NtUserChangeClipboardChain(ptr ptr)
@ stdcall NtUserChangeDisplaySettings(ptr ptr ptr long ptr)
# @ stdcall NtUserChangeDisplaySettings(ptr ptr ptr long ptr)
@ stdcall NtUserCheckImeHotKey(long long)
@ stdcall NtUserCheckMenuItem(ptr long long)
@ stdcall NtUserChildWindowFromPointEx(ptr long long long)
@ -487,7 +487,7 @@
@ stdcall NtUserQueryInformationThread(ptr long ptr long)
@ stdcall NtUserQueryInputContext(long long)
@ stdcall NtUserQuerySendMessage(long)
@ stdcall NtUserQueryUserCounters(long long long long long)
#@ stdcall NtUserQueryUserCounters(long long long long long)
@ stdcall NtUserQueryWindow(ptr long)
@ stdcall NtUserRealChildWindowFromPoint(ptr long long)
@ stdcall NtUserRealInternalGetMessage(ptr ptr long long long long)
@ -537,7 +537,7 @@
@ stdcall NtUserSetParent(ptr ptr)
@ stdcall NtUserSetProcessWindowStation(ptr)
@ stdcall NtUserSetProp(ptr long ptr)
@ stdcall NtUserSetRipFlags(long long)
#@ stdcall NtUserSetRipFlags(long long)
@ stdcall NtUserSetScrollInfo(ptr long ptr long)
@ stdcall NtUserSetShellWindowEx(ptr ptr)
@ stdcall NtUserSetSysColors(long ptr ptr long)
@ -589,9 +589,9 @@
@ stdcall NtUserSetLayeredWindowAttributes(ptr long long long)
@ stdcall NtUserUpdatePerUserSystemParameters(long long)
@ stdcall NtUserUserHandleGrantAccess(ptr ptr long)
@ stdcall NtUserValidateHandleSecure(ptr long)
#@ stdcall NtUserValidateHandleSecure(ptr long)
@ stdcall NtUserValidateRect(ptr ptr)
@ stdcall NtUserValidateTimerCallback(ptr ptr ptr)
#@ stdcall NtUserValidateTimerCallback(ptr ptr ptr)
@ stdcall NtUserVkKeyScanEx(long ptr long)
@ stdcall NtUserWaitForInputIdle(ptr long long)
@ stdcall NtUserWaitForMsgAndEvent(long)

View file

@ -0,0 +1,11 @@
spec2def(win32kdll_vista.spec win32kdll_vista.spec ADD_IMPORTLIB)
add_asm_files(win32kdll_vista_asm win32kdll_vista.S)
add_library(win32kdll_vista SHARED
main.c
${win32kdll_vista_asm}
${CMAKE_CURRENT_BINARY_DIR}/win32kdll_vista.def)
set_module_type(win32kdll_vista module)
add_dependencies(win32kdll_vista psdk)

View file

@ -0,0 +1,11 @@
spec2def(win32kdll_xpsp2.dll win32kdll_xpsp2.spec ADD_IMPORTLIB)
add_asm_files(win32kdll_xpsp2_asm sys-stubs.S)
add_library(win32kdll_xpsp2 SHARED
main.c
${win32kdll_xpsp2_asm}
${CMAKE_CURRENT_BINARY_DIR}/win32kdll_xpsp2.def)
set_module_type(win32kdll_xpsp2 module)
add_dependencies(win32kdll_xpsp2 psdk)

View file

@ -0,0 +1,79 @@
add_definitions(-D_DLL -D__USE_CRTIMP)
include_directories(${REACTOS_SOURCE_DIR}/win32ss/include ../gditools)
list(APPEND SOURCE
ntdd/NtGdiDdCreateDirectDrawObject.c
ntdd/NtGdiDdDeleteDirectDrawObject.c
ntdd/NtGdiDdQueryDirectDrawObject.c
ntgdi/NtGdiArcInternal.c
ntgdi/NtGdiBitBlt.c
ntgdi/NtGdiCombineRgn.c
ntgdi/NtGdiCreateBitmap.c
ntgdi/NtGdiCreateCompatibleBitmap.c
ntgdi/NtGdiCreateCompatibleDC.c
ntgdi/NtGdiCreateDIBSection.c
ntgdi/NtGdiDeleteObjectApp.c
ntgdi/NtGdiDoPalette.c
ntgdi/NtGdiEngCreatePalette.c
ntgdi/NtGdiEnumFontOpen.c
#ntgdi/NtGdiExtSelectClipRgn.c
ntgdi/NtGdiExtTextOutW.c
#ntgdi/NtGdiFlushUserBatch.c
ntgdi/NtGdiGetBitmapBits.c
ntgdi/NtGdiGetDIBits.c
ntgdi/NtGdiGetFontResourceInfoInternalW.c
ntgdi/NtGdiGetRandomRgn.c
ntgdi/NtGdiGetStockObject.c
ntgdi/NtGdiPolyPolyDraw.c
ntgdi/NtGdiRestoreDC.c
ntgdi/NtGdiSaveDC.c
ntgdi/NtGdiSelectBitmap.c
ntgdi/NtGdiSelectBrush.c
ntgdi/NtGdiSelectFont.c
ntgdi/NtGdiSelectPen.c
ntgdi/NtGdiSetBitmapBits.c
ntgdi/NtGdiSetDIBitsToDeviceInternal.c
# ntuser/NtUserCallHwnd.c
# ntuser/NtUserCallHwndLock.c
# ntuser/NtUserCallHwndOpt.c
# ntuser/NtUserCallHwndParam.c
# ntuser/NtUserCallHwndParamLock.c
# ntuser/NtUserCallNoParam.c
# ntuser/NtUserCallOneParam.c
ntuser/NtUserCountClipboardFormats.c
# ntuser/NtUserEnumDisplayMonitors.c
ntuser/NtUserEnumDisplaySettings.c
ntuser/NtUserFindExistingCursorIcon.c
ntuser/NtUserGetClassInfo.c
# ntuser/NtUserGetIconInfo.c
ntuser/NtUserGetTitleBarInfo.c
ntuser/NtUserProcessConnect.c
ntuser/NtUserRedrawWindow.c
ntuser/NtUserScrollDC.c
ntuser/NtUserSelectPalette.c
ntuser/NtUserSetTimer.c
ntuser/NtUserSystemParametersInfo.c
ntuser/NtUserToUnicodeEx.c
ntuser/NtUserUpdatePerUserSystemParameters.c
#osver.c
testlist.c
w32knapi.rc)
add_executable(win32knt_apitest ${SOURCE})
target_link_libraries(win32knt_apitest ${PSEH_LIB} gditools)
set_module_type(win32knt_apitest win32cui)
add_importlibs(win32knt_apitest
win32kdll # win32kdll_2ksp4 win32kdll_xpsp2 win32kdll_2k3sp2 win32kdll_vista
gdi32
user32
shell32
advapi32
msvcrt
kernel32
ntdll)
add_cd_file(TARGET win32knt_apitest DESTINATION reactos/bin FOR all)

View file

@ -0,0 +1,23 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiDdCreateDirectDrawObject
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiDdCreateDirectDrawObject)
{
HANDLE hDirectDraw;
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
ok(hdc != NULL, "\n");
/* Test ReactX */
ok(NtGdiDdCreateDirectDrawObject(NULL) == NULL, "\n");
ok((hDirectDraw = NtGdiDdCreateDirectDrawObject(hdc)) != NULL, "\n");
/* Cleanup ReactX setup */
DeleteDC(hdc);
NtGdiDdDeleteDirectDrawObject(hDirectDraw);
}

View file

@ -0,0 +1,24 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiDdDeleteDirectDrawObject
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiDdDeleteDirectDrawObject)
{
HANDLE hDirectDraw;
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
ok(hdc != NULL, "\n");
/* Test ReactX */
ok(NtGdiDdDeleteDirectDrawObject(NULL) == FALSE, "\n");
ok((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL, "\n");
ok(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE, "\n");
/* Cleanup ReactX setup */
DeleteDC(hdc);
NtGdiDdDeleteDirectDrawObject(hDirectDraw);
}

View file

@ -1,10 +1,17 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiDdCreateDirectDrawObject
* PROGRAMMERS:
*/
#include <win32nt.h>
/* Note : OsThunkDdQueryDirectDrawObject is the usermode name of NtGdiDdQueryDirectDrawObject
* it lives in d3d8thk.dll and in windows 2000 it doing syscall direcly to win32k.sus
* in windows xp and higher it call to gdi32.dll to DdEntry41 and it doing the syscall
*/
INT
Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
START_TEST(NtGdiDdQueryDirectDrawObject)
{
HANDLE hDirectDraw = NULL;
DD_HALINFO *pHalInfo = NULL;
@ -51,8 +58,8 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
memset(&HalInfo,0,sizeof(DD_HALINFO));
memset(CallBackFlags,0,sizeof(DWORD)*3);
/* Get currenet display mode */
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode);
/* Get current display mode */
EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &devmode);
/* Create hdc that we can use */
hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
@ -121,7 +128,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puD3dBufferCallbacks == NULL);
RTEST(puD3dTextureFormats == NULL);
RTEST(puNumFourCC == NULL);
RTEST(puFourCC == NULL);
RTEST(puFourCC == NULL);
RTEST(puNumHeaps == NULL);
RTEST(puvmList == NULL);
@ -151,10 +158,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT) );
ASSERT(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT));
/* We can not check if it DDPF_RGB flags been set for primary surface
/* We can not check if it DDPF_RGB flags been set for primary surface
* for it can be DDPF_PALETTEINDEXED1,DDPF_PALETTEINDEXED2,DDPF_PALETTEINDEXED4,DDPF_PALETTEINDEXED8, DDPF_PALETTEINDEXEDTO8, DDPF_RGB, DDPF_YUV
*/
RTEST( (pHalInfo->vmiData.ddpfDisplay.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4 |
RTEST( (pHalInfo->vmiData.ddpfDisplay.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4 |
DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8 | DDPF_RGB | DDPF_YUV)) != 0);
@ -164,8 +171,8 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
/* Count RGB Bits 8/16/24/32 */
RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount == devmode.dmBitsPerPel );
/* The rgb mask can not be detected in user mode, for it can be 15Bpp convert to 16Bpp mode, so we have no way detect correct mask
* But the mask can never be Zero
/* The rgb mask can not be detected in user mode, for it can be 15Bpp convert to 16Bpp mode, so we have no way detect correct mask
* But the mask can never be Zero
*/
RTEST(pHalInfo->vmiData.ddpfDisplay.dwRBitMask != 0 );
RTEST(pHalInfo->vmiData.ddpfDisplay.dwGBitMask != 0 );
@ -174,27 +181,27 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
/* primary never set the alpha blend mask */
RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBAlphaBitMask == 0 );
/* This can not be test at usermode it is each hardware drv that fill in it,
/* This can not be test at usermode it is each hardware drv that fill in it,
* only way to found them is to use this call */
// pHalInfo->vmiData->dwOffscreenAlign
// pHalInfo->vmiData->dwOverlayAlign
// pHalInfo->vmiData->dwTextureAlign
// pHalInfo->vmiData->dwZBufferAlign
// pHalInfo->vmiData->dwAlphaAlign
// pHalInfo->vmiData->dwAlphaAlign
/* the primary display address */
RTEST( ( (DWORD)pHalInfo->vmiData.pvPrimary & (~0x80000000)) != 0 );
/* test see if we got back the pvmList here
/* test see if we got back the pvmList here
* acording msdn vmiData.dwNumHeaps and vmiData.pvmList
* exists for _VIDEOMEMORYINFO but they do not, it reviews
* in ddk and wdk and own testcase
*/
* exists for _VIDEOMEMORYINFO but they do not, it reviews
* in ddk and wdk and own testcase
*/
// RTEST(pHalInfo->vmiData.dwNumHeaps != 0 );
// RTEST(pHalInfo->vmiData.pvmList != 0 );
/* Test see if we got any hardware acclartions for 2d or 3d, this always fill in
* that mean we found a bugi drv and dx does not work on this drv
/* Test see if we got any hardware acclartions for 2d or 3d, this always fill in
* that mean we found a bugi drv and dx does not work on this drv
*/
/* the SIS 760 GX will never fill it in, it is a bugi drv */
@ -206,14 +213,14 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST( pHalInfo->ddCaps.dwCaps != 0);
RTEST( pHalInfo->ddCaps.ddsCaps.dwCaps != 0);
/* This flags is obsolete and should not be used by the driver */
/* This flags is obsolete and should not be used by the driver */
RTEST( pHalInfo->ddCaps.dwFXAlphaCaps == 0);
/* basic dx 2 is found if this flags not set
* if this fail we do not have a dx driver install acodring ms, some version of windows it
* is okay this fail and drv does then only support basic dx
*
*
*/
if (pHalInfo->dwFlags != 0)
{
@ -223,10 +230,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
}
/* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/
/* the pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE will be ignore, only way detect it proper follow code,
* this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns
* this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns
* if it windows 2000 or windows xp/2003
*
* point to kmode direcly to the win32k.sys, win32k.sys is kmode and it is kmode address we getting back
@ -269,7 +276,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0);
/* Rember on some nivida drv the pCallBackFlags will not be set even they api exists in the drv
* known workaround is to check if the drv really return a kmode pointer for the drv functions
* known workaround is to check if the drv really return a kmode pointer for the drv functions
* we want to use.
*/
RTEST(pCallBackFlags[0] != 0);
@ -301,17 +308,17 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
ASSERT(puD3dCallbacks != NULL);
/* the pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE will be ignore, only way detect it proper follow code,
* this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns
* this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns
* if it windows 2000 or windows xp/2003
*/
RTEST(puD3dCallbacks->dwSize == sizeof(D3DNTHAL_CALLBACKS));
/* Nivda like GF7900GS will not follow ms design rule here,
/* Nivda like GF7900GS will not follow ms design rule here,
* ContextDestroyAll must alwyas be NULL for it is not longer inuse in windows 2000 and higher
*/
RTEST(puD3dCallbacks->ContextDestroyAll == NULL);
/* Nivda like GF7900GS will not follow ms design rule here,
/* Nivda like GF7900GS will not follow ms design rule here,
* SceneCapture must alwyas be NULL for it is not longer inuse in windows 2000 and higher
*/
RTEST(puD3dCallbacks->SceneCapture == NULL);
@ -404,7 +411,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puNumHeaps == NULL);
RTEST(puvmList == NULL);
/* We retesting pCallBackFlags */
/* We retesting pCallBackFlags */
RTEST(pCallBackFlags[0] != 0);
RTEST(pCallBackFlags[1] != 0);
RTEST(pCallBackFlags[2] == 0);
@ -414,15 +421,15 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0);
/* start test of puD3dDriverData */
RTEST(puD3dDriverData->dwSize == sizeof(D3DNTHAL_GLOBALDRIVERDATA));
RTEST(puD3dDriverData->hwCaps.dwSize == sizeof(D3DNTHALDEVICEDESC_V1));
RTEST(puD3dDriverData->hwCaps.dtcTransformCaps.dwSize == sizeof(D3DTRANSFORMCAPS));
RTEST(puD3dDriverData->hwCaps.dlcLightingCaps.dwSize == sizeof(D3DLIGHTINGCAPS));
RTEST(puD3dDriverData->hwCaps.dlcLightingCaps.dwSize == sizeof(D3DLIGHTINGCAPS));
RTEST(puD3dDriverData->hwCaps.dpcLineCaps.dwSize == sizeof(D3DPRIMCAPS));
RTEST(puD3dDriverData->hwCaps.dpcTriCaps.dwSize == sizeof(D3DPRIMCAPS));
RTEST(puD3dDriverData->hwCaps.dwMaxBufferSize == 0);
RTEST(puD3dDriverData->hwCaps.dwMaxVertexCount == 0);
RTEST(puD3dDriverData->hwCaps.dwMaxVertexCount == 0);
/* Backup D3DHAL_GLOBALDRIVERDATA so we do not need resting it */
RtlCopyMemory(&oldD3dDriverData, &D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
@ -476,7 +483,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puNumHeaps == NULL);
RTEST(puvmList == NULL);
/* We retesting the flags */
/* We retesting the flags */
RTEST(pCallBackFlags[0] != 0);
RTEST(pCallBackFlags[1] != 0);
RTEST(pCallBackFlags[2] == 0);
@ -542,7 +549,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RtlCopyMemory(&oldD3dBufferCallbacks, &D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, */
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, */
pHalInfo = &HalInfo;
pCallBackFlags = CallBackFlags;
puD3dCallbacks = &D3dCallbacks;
@ -589,13 +596,13 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puD3dTextureFormats != NULL);
ASSERT(puD3dTextureFormats != NULL);
RTEST(puNumFourCC == NULL);
RTEST(puFourCC == NULL);
RTEST(puNumHeaps == NULL);
RTEST(puvmList == NULL);
/* We retesting the flags */
/* We retesting the flags */
RTEST(pCallBackFlags[0] != 0);
RTEST(pCallBackFlags[1] != 0);
RTEST(pCallBackFlags[2] == 0);
@ -606,13 +613,13 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(memcmp(&oldD3dDriverData, puD3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)) == 0);
RTEST(memcmp(&oldD3dBufferCallbacks, puD3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS)) == 0);
/* start test of dwNumTextureFormats */
/* start test of dwNumTextureFormats */
if (puD3dDriverData->dwNumTextureFormats != 0)
{
myDesc = puD3dTextureFormats;
for (dwTextureCounter=0;dwTextureCounter<puD3dDriverData->dwNumTextureFormats;dwTextureCounter++)
{
RTEST(myDesc->dwSize == sizeof(DDSURFACEDESC))
RTEST(myDesc->dwSize == sizeof(DDSURFACEDESC));
ASSERT(myDesc->dwSize == sizeof(DDSURFACEDESC));
RTEST( (myDesc->dwFlags & (~(DDSD_CAPS|DDSD_PIXELFORMAT))) == 0);
@ -631,7 +638,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(myDesc->ddckCKSrcOverlay.dwColorSpaceLowValue == 0);
RTEST(myDesc->ddckCKSrcOverlay.dwColorSpaceHighValue == 0);
RTEST(myDesc->ddckCKSrcBlt.dwColorSpaceLowValue == 0);
RTEST(myDesc->ddckCKSrcBlt.dwColorSpaceHighValue == 0);
RTEST(myDesc->ddckCKSrcBlt.dwColorSpaceHighValue == 0);
RTEST(myDesc->ddpfPixelFormat.dwSize == sizeof(DDPIXELFORMAT));
RTEST(myDesc->ddpfPixelFormat.dwFlags != 0);
if (myDesc->ddpfPixelFormat.dwFlags & DDPF_FOURCC)
@ -643,20 +650,20 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
myDesc = (DDSURFACEDESC *) (((DWORD) myDesc) + sizeof(DDSURFACEDESC));
}
}
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, NULL, */
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, NULL, */
pHalInfo = &HalInfo;
pCallBackFlags = CallBackFlags;
puD3dCallbacks = &D3dCallbacks;
puD3dDriverData = &D3dDriverData;
puD3dBufferCallbacks = &D3dBufferCallbacks;
puNumHeaps = &NumHeaps;
if (puD3dDriverData->dwNumTextureFormats != 0)
{
RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2));
}
}
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
@ -687,17 +694,17 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puD3dTextureFormats != NULL);
ASSERT(puD3dTextureFormats != NULL);
RTEST(puNumHeaps != NULL);
ASSERT(puNumHeaps != NULL);
RTEST(NumHeaps == 0);
RTEST(puNumFourCC == NULL);
RTEST(puFourCC == NULL);
RTEST(puvmList == NULL);
/* We retesting the flags */
/* We retesting the flags */
RTEST(pCallBackFlags[0] != 0);
RTEST(pCallBackFlags[1] != 0);
RTEST(pCallBackFlags[2] == 0);
@ -710,7 +717,7 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
/* we skip resting texture */
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, puvmList, NULL, */
/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, puvmList, NULL, */
pHalInfo = &HalInfo;
pCallBackFlags = CallBackFlags;
puD3dCallbacks = &D3dCallbacks;
@ -718,11 +725,11 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
puD3dBufferCallbacks = &D3dBufferCallbacks;
puNumHeaps = &NumHeaps;
puvmList = &vmList;
if (puD3dDriverData->dwNumTextureFormats != 0)
{
RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2));
}
}
RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
@ -753,19 +760,19 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
RTEST(puD3dTextureFormats != NULL);
ASSERT(puD3dTextureFormats != NULL);
RTEST(puNumHeaps != NULL);
ASSERT(puNumHeaps != NULL);
RTEST(NumHeaps == 0);
RTEST(puvmList != NULL);
RTEST(puvmList != NULL);
RTEST(puNumFourCC == NULL);
RTEST(puFourCC == NULL);
/* We retesting the flags */
/* We retesting the flags */
RTEST(pCallBackFlags[0] != 0);
RTEST(pCallBackFlags[1] != 0);
RTEST(pCallBackFlags[2] == 0);
@ -778,14 +785,12 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
/* we skip resting texture */
/* Todo
* adding test for
* adding test for
* puNumFourCC
* puFourCC
*/
/* Cleanup ReactX setup */
DeleteDC(hdc);
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
return APISTATUS_NORMAL;
NtGdiDdDeleteDirectDrawObject(hDirectDraw);
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiArcInternal(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiArcInternal
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiArcInternal)
{
HDC hDC = CreateDCW(L"Display",NULL,NULL,NULL);
@ -29,8 +37,5 @@ Test_NtGdiArcInternal(PTESTINFO pti)
// was passiert, wenn left > right ? einfach tauschen?
DeleteDC(hDC);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiBitBlt
* PROGRAMMERS:
*/
INT
Test_NtGdiBitBlt(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiBitBlt)
{
BOOL bRet;
HDC hdc1, hdc2;
@ -19,26 +26,26 @@ Test_NtGdiBitBlt(PTESTINFO pti)
bRet = NtGdiBitBlt((HDC)0x123456, 0, 0, 10, 10, (HDC)0x123456, 10, 10, SRCCOPY, 0, 0);
TEST(bRet == FALSE);
TEST(GetLastError() == ERROR_SUCCESS);
hdc1 = NtGdiCreateCompatibleDC(0);
TEST(hdc1 != NULL);
hdc2 = NtGdiCreateCompatibleDC(0);
TEST(hdc2 != NULL);
hbmp1 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes1 );
TEST(hbmp1 != NULL);
hOldBmp1 = SelectObject(hdc1, hbmp1);
TESTX(NtGdiGetPixel(hdc1, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0));
TESTX(NtGdiGetPixel(hdc1, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc1, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc1, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
hbmp2 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes2 );
TEST(hbmp2 != NULL);
hOldBmp2 = SelectObject(hdc2, hbmp2);
bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 0, 0, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -46,7 +53,7 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 1, 1, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -54,9 +61,9 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
NtGdiSetPixel(hdc2, 0, 0, 0x00000000);
bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 0, 0, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -64,7 +71,7 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 2, 2, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -72,9 +79,9 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
NtGdiSetPixel(hdc2, 0, 0, 0x00000000);
bRet = NtGdiBitBlt(hdc2, 2, 2, -2, -2, hdc1, 2, 2, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -82,12 +89,12 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
NtGdiSetPixel(hdc2, 0, 0, 0x00000000);
NtGdiSetPixel(hdc2, 1, 0, 0x00000000);
NtGdiSetPixel(hdc2, 0, 1, 0x00000000);
NtGdiSetPixel(hdc2, 1, 1, 0x00000000);
bRet = NtGdiBitBlt(hdc2, 0, 0, 2, 2, hdc1, 0, 0, SRCCOPY, 0, 0);
TEST(bRet == TRUE);
TEST(GetLastError() == ERROR_SUCCESS);
@ -95,15 +102,13 @@ Test_NtGdiBitBlt(PTESTINFO pti)
TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1));
TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0));
TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1));
SelectObject(hdc2, hOldBmp2);
SelectObject(hdc1, hOldBmp1);
DeleteObject(hbmp2);
DeleteObject(hbmp1);
DeleteDC(hdc1);
DeleteDC(hdc2);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiCombineRgn
* PROGRAMMERS:
*/
INT
Test_NtGdiCombineRgn(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiCombineRgn)
{
HRGN hRgnDest, hRgn1, hRgn2;
// test what params are accepted for what operations
@ -41,9 +48,6 @@ Test_NtGdiCombineRgn(PTESTINFO pti)
SetRectRgn(hRgn1, 2, 2, 4, 3);
TEST(NtGdiCombineRgn(hRgnDest, hRgnDest, hRgn1, RGN_XOR) == NULLREGION);
/* What if 2 regions are the same */
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiCreateBitmap_Params(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiCreateBitmap
* PROGRAMMERS:
*/
#include <win32nt.h>
void Test_NtGdiCreateBitmap_Params(void)
{
HBITMAP hBmp;
BITMAP bitmap;
@ -188,24 +196,12 @@ Test_NtGdiCreateBitmap_Params(PTESTINFO pti)
SetLastError(ERROR_SUCCESS);
TEST(NtGdiCreateBitmap(0, 0, 1, 1, NULL) == NULL);
TEST(GetLastError() == ERROR_INVALID_PARAMETER);
return APISTATUS_NORMAL;
}
INT
Test_NtGdiCreateBitmap(PTESTINFO pti)
START_TEST(NtGdiCreateBitmap)
{
INT ret;
ret = Test_NtGdiCreateBitmap_Params(pti);
if (ret != APISTATUS_NORMAL)
return ret;
// ret = Test_NtGdiCreateBitmap_Pixel(pti);
// if (ret != APISTATUS_NORMAL)
// return ret;
return APISTATUS_NORMAL;
Test_NtGdiCreateBitmap_Params();
// Test_NtGdiCreateBitmap_Pixel();
}

View file

@ -0,0 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiCreateCompatibleBitmap
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiCreateCompatibleBitmap)
{
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiCreateCompatibleDC
* PROGRAMMERS:
*/
INT
Test_NtGdiCreateCompatibleDC(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiCreateCompatibleDC)
{
HDC hDC;
HGDIOBJ hObj;
@ -21,9 +28,7 @@ Test_NtGdiCreateCompatibleDC(PTESTINFO pti)
/* The default pen should be GetStockObject(BLACK_PEN) */
hObj = SelectObject(hDC, GetStockObject(WHITE_PEN));
TEST(hObj == GetStockObject(BLACK_PEN));
TEST(NtGdiDeleteObjectApp(hDC) != 0);
return APISTATUS_NORMAL;
TEST(NtGdiDeleteObjectApp(hDC) != 0);
}

View file

@ -1,5 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiCreateDIBSection
* PROGRAMMERS:
*/
/*
#include <win32nt.h>
/*
HBITMAP
APIENTRY
NtGdiCreateDIBSection(
@ -22,12 +30,11 @@ GetBitmapSize(BITMAPINFOHEADER *pbih)
WidthBits = pbih->biWidth * pbih->biBitCount * pbih->biPlanes;
WidthBytes = ((WidthBits + 31) & ~ 31) >> 3;
return pbih->biHeight * WidthBytes;
return pbih->biHeight * WidthBytes;
}
INT
Test_NtGdiCreateDIBSection(PTESTINFO pti)
START_TEST(NtGdiCreateDIBSection)
{
HBITMAP hbmp;
HDC hDC;
@ -39,7 +46,7 @@ Test_NtGdiCreateDIBSection(PTESTINFO pti)
struct
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[100];
RGBQUAD bmiColors[100];
} bmi;
PBITMAPINFO pbmi = (PBITMAPINFO)&bmi;
PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER)&bmi.bmiHeader;
@ -451,7 +458,7 @@ printf("dib with bitfileds: %p\n", hbmp);
/* Test section */
MaximumSize.QuadPart = 4096;
Status = ZwCreateSection(&hSection,
Status = NtCreateSection(&hSection,
SECTION_ALL_ACCESS,
NULL,
&MaximumSize,
@ -469,7 +476,4 @@ printf("dib with bitfileds: %p\n", hbmp);
printf("hbmp = %p, pvBits = %p, hSection = %p\n", hbmp, pvBits, hSection);
//system("PAUSE");
if (hbmp) DeleteObject(hbmp);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiDeleteObjectApp
* PROGRAMMERS:
*/
INT
Test_NtGdiDeleteObjectApp(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiDeleteObjectApp)
{
HDC hdc;
HBITMAP hbmp;
@ -20,58 +27,58 @@ Test_NtGdiDeleteObjectApp(PTESTINFO pti)
/* Delete a compatible DC */
SetLastError(0);
hdc = CreateCompatibleDC(NULL);
ASSERT(IsHandleValid(hdc) == 1);
ASSERT(GdiIsHandleValid(hdc) == 1);
TEST(NtGdiDeleteObjectApp(hdc) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hdc) == 0);
TEST(GdiIsHandleValid(hdc) == 0);
/* Delete a display DC */
SetLastError(0);
hdc = CreateDC("DISPLAY", NULL, NULL, NULL);
ASSERT(IsHandleValid(hdc) == 1);
ASSERT(GdiIsHandleValid(hdc) == 1);
TEST((hpen=SelectObject(hdc, GetStockObject(WHITE_PEN))) != NULL);
SelectObject(hdc, hpen);
TEST(NtGdiDeleteObjectApp(hdc) != 0);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hdc) == 1);
TEST(GdiIsHandleValid(hdc) == 1);
TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL);
TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError());
/* Once more */
SetLastError(0);
hdc = GetDC(0);
ASSERT(IsHandleValid(hdc) == 1);
ASSERT(GdiIsHandleValid(hdc) == 1);
TEST(NtGdiDeleteObjectApp(hdc) != 0);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hdc) == 1);
TEST(GdiIsHandleValid(hdc) == 1);
TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL);
TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError());
/* Make sure */
TEST(NtUserCallOneParam((DWORD_PTR)hdc, ONEPARAM_ROUTINE_RELEASEDC) == 0);
/* Delete a brush */
SetLastError(0);
hbrush = CreateSolidBrush(0x123456);
ASSERT(IsHandleValid(hbrush) == 1);
ASSERT(GdiIsHandleValid(hbrush) == 1);
TEST(NtGdiDeleteObjectApp(hbrush) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbrush) == 0);
TEST(GdiIsHandleValid(hbrush) == 0);
/* Try to delete a stock brush */
SetLastError(0);
hbrush = GetStockObject(BLACK_BRUSH);
ASSERT(IsHandleValid(hbrush) == 1);
ASSERT(GdiIsHandleValid(hbrush) == 1);
TEST(NtGdiDeleteObjectApp(hbrush) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbrush) == 1);
TEST(GdiIsHandleValid(hbrush) == 1);
/* Delete a bitmap */
SetLastError(0);
hbmp = CreateBitmap(10, 10, 1, 1, NULL);
ASSERT(IsHandleValid(hbmp) == 1);
ASSERT(GdiIsHandleValid(hbmp) == 1);
TEST(NtGdiDeleteObjectApp(hbmp) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbmp) == 0);
TEST(GdiIsHandleValid(hbmp) == 0);
/* Create a DC for further use */
hdc = CreateCompatibleDC(NULL);
@ -80,39 +87,37 @@ Test_NtGdiDeleteObjectApp(PTESTINFO pti)
/* Try to delete a brush that is selected into a DC */
SetLastError(0);
hbrush = CreateSolidBrush(0x123456);
ASSERT(IsHandleValid(hbrush) == 1);
TEST(NtGdiSelectBrush(hdc, hbrush));
ASSERT(GdiIsHandleValid(hbrush) == 1);
TEST(NtGdiSelectBrush(hdc, hbrush) != NULL);
TEST(NtGdiDeleteObjectApp(hbrush) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbrush) == 1);
TEST(GdiIsHandleValid(hbrush) == 1);
/* Try to delete a bitmap that is selected into a DC */
SetLastError(0);
hbmp = CreateBitmap(10, 10, 1, 1, NULL);
ASSERT(IsHandleValid(hbmp) == 1);
TEST(NtGdiSelectBitmap(hdc, hbmp));
ASSERT(GdiIsHandleValid(hbmp) == 1);
TEST(NtGdiSelectBitmap(hdc, hbmp) != NULL);
TEST(NtGdiDeleteObjectApp(hbmp) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbmp) == 1);
TEST(GdiIsHandleValid(hbmp) == 1);
/* Bitmap get's deleted as soon as we dereference it */
NtGdiSelectBitmap(hdc, GetStockObject(DEFAULT_BITMAP));
TEST(IsHandleValid(hbmp) == 0);
TEST(GdiIsHandleValid(hbmp) == 0);
TEST(NtGdiDeleteObjectApp(hbmp) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbmp) == 0);
TEST(GdiIsHandleValid(hbmp) == 0);
/* Try to delete a brush that is selected into a DC */
SetLastError(0);
hbrush = CreateSolidBrush(123);
ASSERT(IsHandleValid(hbrush) == 1);
TEST(NtGdiSelectBrush(hdc, hbrush));
ASSERT(GdiIsHandleValid(hbrush) == 1);
TEST(NtGdiSelectBrush(hdc, hbrush) != NULL);
TEST(NtGdiDeleteObjectApp(hbrush) == 1);
TEST(GetLastError() == 0);
TEST(IsHandleValid(hbrush) == 1);
return APISTATUS_NORMAL;
TEST(GdiIsHandleValid(hbrush) == 1);
}

View file

@ -1,3 +1,12 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiDoPalette
* PROGRAMMERS:
*/
#include <win32nt.h>
HPALETTE
CreateTestPalette()
{
@ -16,8 +25,8 @@ CreateTestPalette()
return CreatePalette((LOGPALETTE*)&palstruct);
}
INT
Test_NtGdiDoPalette_GdiPalAnimate(PTESTINFO pti)
void
Test_NtGdiDoPalette_GdiPalAnimate(void)
{
HPALETTE hPal;
PALETTEENTRY palEntries[5] = {
@ -95,12 +104,10 @@ Test_NtGdiDoPalette_GdiPalAnimate(PTESTINFO pti)
RTEST(palEntries2[3].peFlags == palEntries[3].peFlags);
DeleteObject(hPal);
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette_GdiPalSetEntries(PTESTINFO pti)
void
Test_NtGdiDoPalette_GdiPalSetEntries(void)
{
HDC hDC;
HPALETTE hPal, hOldPal;
@ -167,11 +174,10 @@ Test_NtGdiDoPalette_GdiPalSetEntries(PTESTINFO pti)
/* Test pEntries = NULL */
RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalGetEntries, TRUE) == 0);
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette_GdiPalGetEntries(PTESTINFO pti)
void
Test_NtGdiDoPalette_GdiPalGetEntries(void)
{
HPALETTE hPal;
@ -188,23 +194,22 @@ Test_NtGdiDoPalette_GdiPalGetEntries(PTESTINFO pti)
// Test flags 0xf0
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette_GetSystemPalette(PTESTINFO pti)
void
Test_NtGdiDoPalette_GetSystemPalette(void)
{
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette_GetBIBColorTable(PTESTINFO pti)
void
Test_NtGdiDoPalette_GetBIBColorTable(void)
{
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette_SetDIBColorTable(PTESTINFO pti)
void
Test_NtGdiDoPalette_SetDIBColorTable(void)
{
HDC hdc;
HBITMAP hbmp;
@ -217,7 +222,7 @@ Test_NtGdiDoPalette_SetDIBColorTable(PTESTINFO pti)
} bmi;
hdc = CreateCompatibleDC(0);
ASSERT(hdc);
ASSERT(hdc != NULL);
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = 10;
@ -268,51 +273,16 @@ Test_NtGdiDoPalette_SetDIBColorTable(PTESTINFO pti)
DeleteDC(hdc);
DeleteObject(hbmp);
return APISTATUS_NORMAL;
}
INT
Test_NtGdiDoPalette(PTESTINFO pti)
START_TEST(NtGdiDoPalette)
{
INT ret;
Test_NtGdiDoPalette_GdiPalAnimate();
Test_NtGdiDoPalette_GdiPalSetEntries();
Test_NtGdiDoPalette_GdiPalGetEntries();
Test_NtGdiDoPalette_GetSystemPalette();
Test_NtGdiDoPalette_GetBIBColorTable();
Test_NtGdiDoPalette_SetDIBColorTable();
ret = Test_NtGdiDoPalette_GdiPalAnimate(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
ret = Test_NtGdiDoPalette_GdiPalSetEntries(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
ret = Test_NtGdiDoPalette_GdiPalGetEntries(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
ret = Test_NtGdiDoPalette_GetSystemPalette(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
ret = Test_NtGdiDoPalette_GetBIBColorTable(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
ret = Test_NtGdiDoPalette_SetDIBColorTable(pti);
if (ret != APISTATUS_NORMAL)
{
return ret;
}
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,26 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiEngCreatePalette
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiEngCreatePalette)
{
HPALETTE hPal;
ULONG Colors[3] = {1,2,3};
PENTRY pEntry;
hPal = NtGdiEngCreatePalette(PAL_RGB, 3, Colors, 0xff000000, 0x00ff0000, 0x0000ff00);
TEST(hPal != 0);
TEST(GDI_HANDLE_GET_TYPE(hPal) == GDI_OBJECT_TYPE_PALETTE);
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(hPal)];
TEST(pEntry->einfo.pobj != NULL);
TEST(pEntry->ObjectOwner.ulObj == GetCurrentProcessId());
TEST(pEntry->pUser == 0);
//TEST(pEntry->Type == (((UINT)hPal >> 16) | GDI_OBJECT_TYPE_PALETTE));
}

View file

@ -1,11 +1,18 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiEnumFontOpen
* PROGRAMMERS:
*/
INT
Test_NtGdiEnumFontOpen(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiEnumFontOpen)
{
HDC hDC;
ULONG_PTR idEnum;
ULONG ulCount;
PGDI_TABLE_ENTRY pEntry;
PENTRY pEntry;
hDC = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
@ -17,10 +24,12 @@ Test_NtGdiEnumFontOpen(PTESTINFO pti)
/* we should have a gdi handle here */
TEST(GDI_HANDLE_GET_TYPE(idEnum) == GDI_OBJECT_TYPE_ENUMFONT);
pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(idEnum)];
TEST(pEntry->KernelData != NULL);
TEST(pEntry->ProcessId == GetCurrentProcessId());
TEST(pEntry->UserData == 0);
TEST(pEntry->Type == ((idEnum >> 16) | GDI_OBJECT_TYPE_ENUMFONT));
TEST(pEntry->einfo.pobj != NULL);
TEST(pEntry->ObjectOwner.ulObj == GetCurrentProcessId());
TEST(pEntry->pUser == NULL);
TEST(pEntry->FullUnique == (idEnum >> 16));
TEST(pEntry->Objt == GDI_OBJECT_TYPE_ENUMFONT >> 16);
TEST(pEntry->Flags == 0);
/* We should not be able to use DeleteObject() on the handle */
TEST(DeleteObject((HGDIOBJ)idEnum) == FALSE);
@ -30,7 +39,5 @@ Test_NtGdiEnumFontOpen(PTESTINFO pti)
// Test no logfont (NULL): should word
// Test empty lfFaceName string: should not work
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiExtTextOutW
* PROGRAMMERS:
*/
/*
#include <win32nt.h>
/*
BOOL
APIENTRY
NtGdiExtTextOutW(
@ -14,9 +22,9 @@ NtGdiExtTextOutW(
IN DWORD dwCodePage)
*/
INT
Test_NtGdiExtTextOutW(PTESTINFO pti)
START_TEST(NtGdiExtTextOutW)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HWND hWnd;
HDC hDC;
RECT rect;
@ -28,7 +36,7 @@ Test_NtGdiExtTextOutW(PTESTINFO pti)
/* Create a window */
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
NULL, NULL, g_hInstance, 0);
NULL, NULL, hinst, 0);
hDC = GetDC(hWnd);
lpstr = L"Hallo";
@ -48,6 +56,5 @@ Test_NtGdiExtTextOutW(PTESTINFO pti)
ret = NtGdiExtTextOutW(hDC, 0, 0, 0, 0, lpstr, len, (INT*)((ULONG_PTR)Dx + 1), 0);
TEST(ret == 1);
return APISTATUS_NORMAL;
}

View file

@ -1,11 +1,17 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiFlushUserBatch
* PROGRAMMERS:
*/
#include <win32nt.h>
NTSTATUS
(NTAPI
*pNtGdiFlushUserBatch)(VOID);
INT
Test_NtGdiFlushUserBatch(PTESTINFO pti)
START_TEST(NtGdiFlushUserBatch)
{
PVOID pRet;
PTEB pTeb;
@ -40,5 +46,4 @@ Test_NtGdiFlushUserBatch(PTESTINFO pti)
TEST(pTeb->GdiTebBatch.Offset == 0);
TEST(pTeb->GdiTebBatch.HDC == 0);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiGetBitmapBits(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiGetBitmapBits
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiGetBitmapBits)
{
BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9};
HBITMAP hBitmap;
@ -57,6 +65,4 @@ Test_NtGdiGetBitmapBits(PTESTINFO pti)
RTEST(GetLastError() == ERROR_SUCCESS);
DeleteObject(hBitmap);
return APISTATUS_NORMAL;
}

View file

@ -1,3 +1,12 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiGetDIBitsInternal
* PROGRAMMERS:
*/
#include <win32nt.h>
/* taken from gdi32, bitmap.c */
UINT
FASTCALL
@ -22,8 +31,7 @@ DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )
}
INT
Test_NtGdiGetDIBitsInternal(PTESTINFO pti)
START_TEST(NtGdiGetDIBitsInternal)
{
HBITMAP hBitmap;
struct
@ -127,5 +135,4 @@ Test_NtGdiGetDIBitsInternal(PTESTINFO pti)
ReleaseDC(NULL, hDCScreen);
DeleteObject(hBitmap);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiGetFontResourceInfoInternalW
* PROGRAMMERS:
*/
INT
Test_NtGdiGetFontResourceInfoInternalW(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiGetFontResourceInfoInternalW)
{
BOOL bRet;
DWORD dwBufSize;
@ -32,6 +39,5 @@ Test_NtGdiGetFontResourceInfoInternalW(PTESTINFO pti)
// RemoveFontResourceW(szFullFileName);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,15 @@
INT
Test_NtGdiGetRandomRgn(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiGetRandomRgn
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiGetRandomRgn)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HWND hWnd;
HDC hDC;
HRGN hrgn, hrgn2;
@ -8,7 +17,7 @@ Test_NtGdiGetRandomRgn(PTESTINFO pti)
/* Create a window */
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
NULL, NULL, g_hInstance, 0);
NULL, NULL, hinst, 0);
// UpdateWindow(hWnd);
hDC = GetDC(hWnd);
@ -76,5 +85,4 @@ Test_NtGdiGetRandomRgn(PTESTINFO pti)
ReleaseDC(hWnd, hDC);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiGetStockObject
* PROGRAMMERS:
*/
INT
Test_NtGdiGetStockObject(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiGetStockObject)
{
HANDLE handle = NULL;
BITMAP bitmap;
@ -133,5 +140,5 @@ Test_NtGdiGetStockObject(PTESTINFO pti)
RTEST(NtGdiGetStockObject(22) == 0);
RTEST(NtGdiGetStockObject(23) == 0);
return APISTATUS_NORMAL;
}

View file

@ -1,8 +1,16 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiPolyPolyDraw
* PROGRAMMERS:
*/
#include <win32nt.h>
static
INT
Test_Params(PTESTINFO pti)
void
Test_Params(void)
{
ULONG_PTR ret;
ULONG Count1[4] = {3, 2, 4, 3};
@ -192,17 +200,13 @@ Test_Params(PTESTINFO pti)
TEST(ret == 0);
TEST(GetLastError() == 87);
return APISTATUS_NORMAL;
}
INT
Test_NtGdiPolyPolyDraw(PTESTINFO pti)
START_TEST(NtGdiPolyPolyDraw)
{
Test_Params(pti);
Test_Params();
return APISTATUS_NORMAL;
}

View file

@ -1,4 +1,11 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiRestoreDC
* PROGRAMMERS:
*/
#include <win32nt.h>
static HBRUSH hbrush;
static HBITMAP hbitmap;
@ -61,7 +68,7 @@ SetSpecialDCState2(HDC hdc)
static
void
Test_IsSpecialState(PTESTINFO pti, HDC hdc, BOOL bMemDC)
Test_IsSpecialState(HDC hdc, BOOL bMemDC)
{
POINT pt;
SIZE sz;
@ -107,7 +114,7 @@ Test_IsSpecialState(PTESTINFO pti, HDC hdc, BOOL bMemDC)
static
void
Test_SaveRestore(PTESTINFO pti, HDC hdc, BOOL bMemDC)
Test_SaveRestore(HDC hdc, BOOL bMemDC)
{
SetSpecialDCState(hdc);
NtGdiSaveDC(hdc);
@ -129,17 +136,16 @@ Test_SaveRestore(PTESTINFO pti, HDC hdc, BOOL bMemDC)
TEST(NtGdiRestoreDC(hdc, 1) == 1);
TEST(GetLastError() == 0);
Test_IsSpecialState(pti, hdc, bMemDC);
Test_IsSpecialState(hdc, bMemDC);
}
INT
Test_NtGdiRestoreDC(PTESTINFO pti)
START_TEST(NtGdiRestoreDC)
{
HDC hdc;
hdc = CreateCompatibleDC(0);
ASSERT(IsHandleValid(hdc));
ASSERT(GdiIsHandleValid(hdc));
SetLastError(0);
TEST(NtGdiRestoreDC(0, -10) == 0);
@ -155,38 +161,35 @@ Test_NtGdiRestoreDC(PTESTINFO pti)
/* Initialize objects */
hbrush = CreateSolidBrush(12345);
ASSERT(IsHandleValid(hbrush));
ASSERT(GdiIsHandleValid(hbrush));
hpen = CreatePen(PS_SOLID, 4, RGB(10,12,32));
ASSERT(IsHandleValid(hpen));
ASSERT(GdiIsHandleValid(hpen));
hbitmap = CreateBitmap(10, 10, 1, 1, NULL);
ASSERT(IsHandleValid(hbitmap));
hfont = CreateFont(10, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET,
ASSERT(GdiIsHandleValid(hbitmap));
hfont = CreateFont(10, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET,
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH, "Arial");
ASSERT(IsHandleValid(hfont));
ASSERT(GdiIsHandleValid(hfont));
hrgn = CreateRectRgn(12, 14, 14, 17);
ASSERT(IsHandleValid(hrgn));
ASSERT(GdiIsHandleValid(hrgn));
hrgn2 = CreateRectRgn(1, 1, 2, 2);
ASSERT(IsHandleValid(hrgn2));
ASSERT(GdiIsHandleValid(hrgn2));
/* Test mem dc */
Test_SaveRestore(pti, hdc, TRUE);
Test_SaveRestore(hdc, TRUE);
DeleteDC(hdc);
/* Test screen DC */
hdc = GetDC(0);
ASSERT(IsHandleValid(hdc));
Test_SaveRestore(pti, hdc, FALSE);
ASSERT(GdiIsHandleValid(hdc));
Test_SaveRestore(hdc, FALSE);
ReleaseDC(0, hdc);
/* Test info dc */
hdc = CreateICW(L"DISPLAY", NULL, NULL, NULL);
ASSERT(IsHandleValid(hdc));
Test_SaveRestore(pti, hdc, FALSE);
ASSERT(GdiIsHandleValid(hdc));
Test_SaveRestore(hdc, FALSE);
DeleteDC(hdc);
return APISTATUS_NORMAL;
}

View file

@ -1,7 +1,15 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSaveDC
* PROGRAMMERS:
*/
INT
Test_NtGdiSaveDC(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtGdiSaveDC)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HDC hdc, hdc2;
HWND hwnd;
HBITMAP hbmp1, hbmp2, hOldBmp;
@ -11,21 +19,21 @@ Test_NtGdiSaveDC(PTESTINFO pti)
/* Test info dc */
hdc = CreateICW(L"DISPLAY",NULL,NULL,NULL);
TEST(hdc);
TEST(hdc != NULL);
TEST(NtGdiSaveDC(hdc) == 1);
TEST(NtGdiSaveDC(hdc) == 2);
DeleteDC(hdc);
/* Test display dc */
hdc = GetDC(0);
TEST(hdc);
TEST(hdc != NULL);
TEST(NtGdiSaveDC(hdc) == 1);
TEST(NtGdiSaveDC(hdc) == 2);
ReleaseDC(0, hdc);
/* Test a mem DC */
hdc = CreateCompatibleDC(0);
TEST(hdc);
TEST(hdc != NULL);
TEST(NtGdiSaveDC(hdc) == 1);
TEST(NtGdiSaveDC(hdc) == 2);
DeleteDC(hdc);
@ -33,25 +41,25 @@ Test_NtGdiSaveDC(PTESTINFO pti)
/* Create a window */
hwnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
10, 10, 100, 100,
NULL, NULL, g_hInstance, 0);
NULL, NULL, hinst, 0);
hdc = GetDC(hwnd);
TEST(hdc);
TEST(hdc != NULL);
TEST(NtGdiSaveDC(hdc) == 1);
NtGdiRestoreDC(hdc, 1);
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
/* test behaviour when a bitmap is selected */
hbmp1 = CreateBitmap(2, 2, 1, 1, NULL);
TEST(hbmp1);
TEST(hbmp1 != NULL);
hbmp2 = CreateBitmap(2, 2, 1, 1, NULL);
TEST(hbmp2);
TEST(hbmp2 != NULL);
hdc = CreateCompatibleDC(0);
TEST(hdc);
TEST(hdc != NULL);
hdc2 = CreateCompatibleDC(0);
TEST(hdc2);
TEST(hdc2 != NULL);
hOldBmp = SelectObject(hdc, hbmp1);
TEST(hOldBmp);
TEST(hOldBmp != NULL);
TEST(NtGdiSaveDC(hdc) == 1);
TEST(SelectObject(hdc, hbmp2) == hbmp1);
TEST(SelectObject(hdc2, hbmp1) == NULL);
@ -73,6 +81,5 @@ Test_NtGdiSaveDC(PTESTINFO pti)
DeleteObject(hbmp1);
DeleteObject(hbmp2);
return APISTATUS_NORMAL;
}

View file

@ -1,13 +1,21 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSelectBitmap
* PROGRAMMERS:
*/
INT
Test_SelectDIBSection(PTESTINFO pti)
#include <win32nt.h>
void
Test_SelectDIBSection(void)
{
HDC hdc;
HBITMAP hbmp;
struct
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[100];
RGBQUAD bmiColors[100];
} bmi;
PBITMAPINFO pbmi = (PBITMAPINFO)&bmi;
PVOID pvBits;
@ -32,12 +40,10 @@ Test_SelectDIBSection(PTESTINFO pti)
TEST(NtGdiSelectBitmap(hdc, hbmp) != 0);
return 0;
}
INT
Test_NtGdiSelectBitmap(PTESTINFO pti)
START_TEST(NtGdiSelectBitmap)
{
HDC hDC;
HBITMAP hBmp, hOldBmp;
@ -106,8 +112,7 @@ Test_NtGdiSelectBitmap(PTESTINFO pti)
DeleteObject(hBmp);
DeleteDC(hDC);
Test_SelectDIBSection(pti);
Test_SelectDIBSection();
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiSelectBrush(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSelectBrush
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiSelectBrush)
{
HDC hDC;
HBRUSH hBrush, hOldBrush;
@ -52,7 +60,7 @@ Test_NtGdiSelectBrush(PTESTINFO pti)
/* Begin with a white brush */
NtGdiSelectBrush(hDC, GetStockObject(WHITE_BRUSH));
pdcattr = GetHandleUserData(hDC);
pdcattr = GdiGetHandleUserData(hDC);
/* Change the brush in user mode, without setting flags */
pdcattr->hbrush = (HBRUSH)12345;
@ -61,7 +69,5 @@ Test_NtGdiSelectBrush(PTESTINFO pti)
DeleteDC(hDC);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiSelectFont(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSelectFont
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiSelectFont)
{
HDC hDC;
HFONT hFont, hOldFont;
@ -41,7 +49,5 @@ Test_NtGdiSelectFont(PTESTINFO pti)
DeleteDC(hDC);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiSelectPen(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSelectPen
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiSelectPen)
{
HDC hDC;
HPEN hPen, hOldPen;
@ -66,6 +74,4 @@ Test_NtGdiSelectPen(PTESTINFO pti)
/* Test that fallback pen is BLACK_PEN */
DeleteDC(hDC);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtGdiSetBitmapBits(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSetBitmapBits
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtGdiSetBitmapBits)
{
BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9};
HBITMAP hBitmap;
@ -57,6 +65,4 @@ Test_NtGdiSetBitmapBits(PTESTINFO pti)
RTEST(GetLastError() == ERROR_SUCCESS);
DeleteObject(hBitmap);
return APISTATUS_NORMAL;
}

View file

@ -1,3 +1,11 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtGdiSetDIBitsToDeviceInternal
* PROGRAMMERS:
*/
#include <win32nt.h>
void
ReadBits(HDC hDC, PDWORD OutBits)
@ -14,8 +22,7 @@ ReadBits(HDC hDC, PDWORD OutBits)
}
INT
Test_NtGdiSetDIBitsToDeviceInternal(PTESTINFO pti)
START_TEST(NtGdiSetDIBitsToDeviceInternal)
{
static const DWORD InBits[8] = { 0x81, 0x7E, 0x5A, 0x7E, 0x7E, 0x42, 0x7E, 0x81 };
DWORD OutBits[8];
@ -88,5 +95,4 @@ Test_NtGdiSetDIBitsToDeviceInternal(PTESTINFO pti)
ReleaseDC(hWnd, hDC);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -1,30 +1,36 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallHwnd
* PROGRAMMERS:
*/
INT
Test_HwndRoutine_DeregisterShellHookWindow(PTESTINFO pti, HWND hWnd)
#include <win32nt.h>
void
Test_HwndRoutine_DeregisterShellHookWindow(HWND hWnd)
{
TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW) == TRUE);
return APISTATUS_NORMAL;
}
INT
Test_HwndRoutine_GetWindowContextHelpId (PTESTINFO pti, HWND hWnd)
void
Test_HwndRoutine_GetWindowContextHelpId (HWND hWnd)
{
TEST(NtUserCallHwndParam(hWnd, 0xbadb00b, _HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID) == TRUE);
TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_GETWNDCONTEXTHLPID) == 0xbadb00b);
return APISTATUS_NORMAL;
}
INT
Test_HwndRoutine_SetMsgBox(PTESTINFO pti, HWND hWnd)
void
Test_HwndRoutine_SetMsgBox(HWND hWnd)
{
TEST(NtUserCallHwnd(hWnd, 0x49) != FALSE);
return APISTATUS_NORMAL;
}
INT
Test_NtUserCallHwnd(PTESTINFO pti)
START_TEST(NtUserCallHwnd)
{
HWND hWnd;
@ -43,14 +49,12 @@ Test_NtUserCallHwnd(PTESTINFO pti)
SetLastError(ERROR_SUCCESS);
TEST(NtUserCallHwnd(hWnd, 0x44) == FALSE);
Test_HwndRoutine_DeregisterShellHookWindow(pti, hWnd); /* 0x45 */
Test_HwndRoutine_DeregisterShellHookWindow(hWnd); /* 0x45 */
TEST(NtUserCallHwnd(hWnd, 0x46) == FALSE); // DWP_GetEnabledPopup
Test_HwndRoutine_GetWindowContextHelpId (pti, hWnd); /* 0x47 */
Test_HwndRoutine_GetWindowContextHelpId (hWnd); /* 0x47 */
TEST(NtUserCallHwnd(hWnd, 0x48) == TRUE);
Test_HwndRoutine_SetMsgBox(pti, hWnd); /* 0x49 */
Test_HwndRoutine_SetMsgBox(hWnd); /* 0x49 */
TEST(GetLastError() == ERROR_SUCCESS);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -1,61 +1,70 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallHwndLock
* PROGRAMMERS:
*/
#include <win32nt.h>
HMENU g_hMenu;
INT
Test_HwndLockRoutine_WindowHasShadow (PTESTINFO pti, HWND hWnd) /* 0x53 */
void
Test_HwndLockRoutine_WindowHasShadow(HWND hWnd) /* 0x53 */
{
// TEST(NtUserCallHwndLock(hWnd, 0x53) == 0);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_ArrangeIconicWindows(PTESTINFO pti, HWND hWnd) /* 0x54 */
void
Test_HwndLockRoutine_ArrangeIconicWindows(HWND hWnd) /* 0x54 */
{
// TEST(NtUserCallHwndLock(hWnd, _HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS) == 0);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_DrawMenuBar(PTESTINFO pti, HWND hWnd) /* 0x55 */
void
Test_HwndLockRoutine_DrawMenuBar(HWND hWnd) /* 0x55 */
{
TEST(NtUserCallHwndLock(hWnd, 0x55) == 1);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_CheckImeShowStatusInThread(PTESTINFO pti, HWND hWnd) /* 0x56 */
void
Test_HwndLockRoutine_CheckImeShowStatusInThread(HWND hWnd) /* 0x56 */
{
TEST(NtUserCallHwndLock(hWnd, 0x56) != 0);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_GetSysMenuHandle(PTESTINFO pti, HWND hWnd) /* 0x57 */
void
Test_HwndLockRoutine_GetSysMenuHandle(HWND hWnd) /* 0x57 */
{
NtUserCallHwndLock(hWnd, 0x5c);
// HMENU hMenu = (HMENU)NtUserCallHwndLock(hWnd, 0x57);
// TEST(hMenu != 0);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_RedrawFrame(PTESTINFO pti, HWND hWnd) /* 0x58 */
void
Test_HwndLockRoutine_RedrawFrame(HWND hWnd) /* 0x58 */
{
// TEST(NtUserCallHwndLock(hWnd, 0x68) != 0);
return APISTATUS_NORMAL;
}
INT
Test_HwndLockRoutine_UpdateWindow(PTESTINFO pti, HWND hWnd) /* 0x5e */
void
Test_HwndLockRoutine_UpdateWindow(HWND hWnd) /* 0x5e */
{
TEST(NtUserCallHwndLock(hWnd, 0x5e) == 1);
return APISTATUS_NORMAL;
}
INT
Test_NtUserCallHwndLock(PTESTINFO pti)
START_TEST(NtUserCallHwndLock)
{
HWND hWnd;
g_hMenu = CreateMenu();
@ -85,16 +94,15 @@ Test_NtUserCallHwndLock(PTESTINFO pti)
TEST(NtUserCallHwndLock(hWnd, 999) == 0);
TEST(GetLastError() == ERROR_SUCCESS);
Test_HwndLockRoutine_WindowHasShadow (pti, hWnd); /* 0x53 */
Test_HwndLockRoutine_ArrangeIconicWindows(pti, hWnd);
Test_HwndLockRoutine_DrawMenuBar(pti, hWnd);
Test_HwndLockRoutine_CheckImeShowStatusInThread(pti, hWnd);
Test_HwndLockRoutine_GetSysMenuHandle(pti, hWnd);
Test_HwndLockRoutine_RedrawFrame(pti, hWnd);
Test_HwndLockRoutine_WindowHasShadow (hWnd); /* 0x53 */
Test_HwndLockRoutine_ArrangeIconicWindows(hWnd);
Test_HwndLockRoutine_DrawMenuBar(hWnd);
Test_HwndLockRoutine_CheckImeShowStatusInThread(hWnd);
Test_HwndLockRoutine_GetSysMenuHandle(hWnd);
Test_HwndLockRoutine_RedrawFrame(hWnd);
Test_HwndLockRoutine_UpdateWindow(pti, hWnd);
Test_HwndLockRoutine_UpdateWindow(hWnd);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,27 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallHwndOpt
* PROGRAMMERS:
*/
#include <win32nt.h>
void
Test_HwndOptRoutine_SetProgmanWindow(void) /* 0x4a */
{
// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW);
}
void
Test_HwndOptRoutine_SetTaskmanWindow (void) /* 0x4b */
{
// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW);
}
START_TEST(NtUserCallHwndOpt)
{
Test_HwndOptRoutine_SetProgmanWindow(pti); /* 0x4a */
Test_HwndOptRoutine_SetTaskmanWindow (pti); /* 0x4b */
}

View file

@ -1,15 +1,20 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallHwndParam
* PROGRAMMERS:
*/
INT
Test_HwndParamRoutine_SetWindowContextHelpId (PTESTINFO pti, HWND hWnd)
#include <win32nt.h>
void
Test_HwndParamRoutine_SetWindowContextHelpId(HWND hWnd)
{
TEST(NtUserCallHwndParam(hWnd, 12345, _HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID) == TRUE);
TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_GETWNDCONTEXTHLPID) == 12345);
return APISTATUS_NORMAL;
TEST(NtUserCallHwnd(hWnd, HWND_ROUTINE_GETWNDCONTEXTHLPID) == 12345);
}
INT
Test_NtUserCallHwndParam(PTESTINFO pti)
START_TEST(NtUserCallHwndParam)
{
HWND hWnd;
@ -26,9 +31,7 @@ Test_NtUserCallHwndParam(PTESTINFO pti)
0);
ASSERT(hWnd);
Test_HwndParamRoutine_SetWindowContextHelpId (pti, hWnd);
Test_HwndParamRoutine_SetWindowContextHelpId(hWnd);
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallHwndParamLock
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserCallHwndParamLock)
{
}

View file

@ -0,0 +1,74 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallNoParam
* PROGRAMMERS:
*/
#include <win32nt.h>
void
Test_NoParamRoutine_CreateMenu(void) /* 0 */
{
HMENU hMenu;
hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENU);
TEST(IsMenu(hMenu) == TRUE);
DestroyMenu(hMenu);
}
void
Test_NoParamRoutine_CreatePopupMenu(void) /* 1 */
{
HMENU hMenu;
hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENUPOPUP);
TEST(IsMenu(hMenu) == TRUE);
DestroyMenu(hMenu);
}
void
Test_NoParamRoutine_DisableProcessWindowsGhosting(void) /* 2 */
{
}
void
Test_NoParamRoutine_ClearWakeMask(void) /* 3 */
{
}
void
Test_NoParamRoutine_AllowForegroundActivation(void) /* 4 */
{
}
void
Test_NoParamRoutine_DestroyCaret(void) /* 5 */
{
}
void
Test_NoParamRoutine_LoadUserApiHook(void) /* 0x1d */
{
//DWORD dwRet;
/* dwRet = */NtUserCallNoParam(_NOPARAM_ROUTINE_LOADUSERAPIHOOK);
// TEST(dwRet != 0);
}
START_TEST(NtUserCallNoParam)
{
Test_NoParamRoutine_CreateMenu();
Test_NoParamRoutine_CreatePopupMenu();
Test_NoParamRoutine_LoadUserApiHook(); /* 0x1d */
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,16 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCallOneParam
* PROGRAMMERS:
*/
INT
Test_OneParamRoutine_BeginDeferWindowPos(PTESTINFO pti) /* 0x1e */
#include <win32nt.h>
void
Test_OneParamRoutine_BeginDeferWindowPos(void) /* 0x1e */
{
HDWP hWinPosInfo;
@ -8,11 +18,10 @@ Test_OneParamRoutine_BeginDeferWindowPos(PTESTINFO pti) /* 0x1e */
TEST(hWinPosInfo != 0);
TEST(EndDeferWindowPos(hWinPosInfo) != 0);
return APISTATUS_NORMAL;
}
INT
Test_OneParamRoutine_WindowFromDC(PTESTINFO pti) /* 0x1f */
void
Test_OneParamRoutine_WindowFromDC(void) /* 0x1f */
{
HDC hDC = GetDC(NULL);
HWND hWnd;
@ -22,11 +31,10 @@ Test_OneParamRoutine_WindowFromDC(PTESTINFO pti) /* 0x1f */
TEST(IsWindow(hWnd));
TEST(hWnd == GetDesktopWindow());
return APISTATUS_NORMAL;
}
INT
Test_OneParamRoutine_CreateEmptyCurObject(PTESTINFO pti) /* XP/2k3 : 0x21, vista 0x25 */
void
Test_OneParamRoutine_CreateEmptyCurObject(void) /* XP/2k3 : 0x21, vista 0x25 */
{
HICON hIcon ;
@ -42,11 +50,10 @@ Test_OneParamRoutine_CreateEmptyCurObject(PTESTINFO pti) /* XP/2k3 : 0x21, vista
TEST(NtUserDestroyCursor(hIcon, 0xbaadf00d) == TRUE);
return APISTATUS_NORMAL;
}
INT
Test_OneParamRoutine_MapDesktopObject(PTESTINFO pti) /* 0x30 */
void
Test_OneParamRoutine_MapDesktopObject(void) /* 0x30 */
{
DWORD pObject;
HWND hWnd;
@ -59,15 +66,14 @@ Test_OneParamRoutine_MapDesktopObject(PTESTINFO pti) /* 0x30 */
hMenu = CreateMenu();
pObject = NtUserCallOneParam((DWORD)hMenu, _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT);
DestroyMenu(hMenu);
DestroyMenu(hMenu);
TEST(pObject > 0);
TEST(pObject < 0x80000000);
return APISTATUS_NORMAL;
}
INT
Test_OneParamRoutine_SwapMouseButtons(PTESTINFO pti) /* 0x42 */
void
Test_OneParamRoutine_SwapMouseButtons(void) /* 0x42 */
{
BOOL bInverse;
@ -78,18 +84,13 @@ Test_OneParamRoutine_SwapMouseButtons(PTESTINFO pti) /* 0x42 */
TEST(bInverse == FALSE);
// TODO: test other values
return APISTATUS_NORMAL;
}
INT
Test_NtUserCallOneParam(PTESTINFO pti)
START_TEST(NtUserCallOneParam)
{
Test_OneParamRoutine_BeginDeferWindowPos(pti); /* 0x1e */
Test_OneParamRoutine_WindowFromDC(pti); /* 0x1f */
Test_OneParamRoutine_CreateEmptyCurObject(pti); /* XP/2k3 : 0x21, vista 0x25 */
Test_OneParamRoutine_MapDesktopObject(pti); /* 0x30 */
Test_OneParamRoutine_SwapMouseButtons(pti); /* 0x42 */
return APISTATUS_NORMAL;
Test_OneParamRoutine_BeginDeferWindowPos(); /* 0x1e */
Test_OneParamRoutine_WindowFromDC(); /* 0x1f */
Test_OneParamRoutine_CreateEmptyCurObject(); /* XP/2k3 : 0x21, vista 0x25 */
Test_OneParamRoutine_MapDesktopObject(); /* 0x30 */
Test_OneParamRoutine_SwapMouseButtons(); /* 0x42 */
}

View file

@ -0,0 +1,15 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserCountClipboardFormats
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserCountClipboardFormats)
{
RTEST(NtUserCountClipboardFormats() < 1000);
}

View file

@ -1,3 +1,11 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserEnumDisplayMonitors
* PROGRAMMERS:
*/
#include <win32nt.h>
ULONG gMonitorCount = 0;
HDC ghdcMonitor = 0;
@ -30,15 +38,14 @@ MonitorEnumProc(
return TRUE;
}
INT
Test_NtUserEnumDisplayMonitors(PTESTINFO pti)
START_TEST(NtUserEnumDisplayMonitors)
{
BOOL ret;
// WILL crash!
// TEST(NtUserEnumDisplayMonitors1(NULL, NULL, NULL, 0) == 0);
ret = NtUserEnumDisplayMonitors1(0, NULL, MonitorEnumProc, 0);
ret = NtUserEnumDisplayMonitors(0, NULL, MonitorEnumProc, 0);
TEST(ret == TRUE);
TEST(gMonitorCount > 0);
TEST(ghdcMonitor == 0);
@ -47,6 +54,4 @@ Test_NtUserEnumDisplayMonitors(PTESTINFO pti)
TEST(grcMonitor.top == 0);
TEST(grcMonitor.bottom > 0);
return APISTATUS_NORMAL;
}

View file

@ -1,3 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserEnumDisplaySettings
* PROGRAMMERS:
*/
#include <win32nt.h>
static struct
{
@ -5,8 +15,7 @@ static struct
CHAR buffer[0xffff];
} data;
INT
TEST_NtUserEnumDisplaySettings(PTESTINFO pti)
START_TEST(NtUserEnumDisplaySettings)
{
UNICODE_STRING usDeviceName;
WCHAR szName[] = L"DISPLAY";
@ -85,7 +94,7 @@ TEST_NtUserEnumDisplaySettings(PTESTINFO pti)
TEST(Status == STATUS_INVALID_PARAMETER_1);
usDeviceName.Buffer = szName;
usDeviceName.Length = wcslen(szName);
usDeviceName.Length = (USHORT)wcslen(szName);
usDeviceName.MaximumLength = usDeviceName.Length;
Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0);
TEST(Status == STATUS_INVALID_PARAMETER_1);
@ -95,5 +104,4 @@ TEST_NtUserEnumDisplaySettings(PTESTINFO pti)
TEST(GetLastError() == ERROR_SUCCESS);
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,15 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserFindExistingCursoricon
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserFindExistingCursoricon)
{
}

View file

@ -1,18 +1,15 @@
BOOL
NTAPI
NtUserGetClassInfo2(
HINSTANCE hInstance,
PUNICODE_STRING ClassName,
LPWNDCLASSEXW wcex,
LPWSTR *ppwstr,
BOOL Ansi)
{
return (BOOL)Syscall(L"NtUserGetClassInfo", 5, &hInstance);
}
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserGetClassInfo
* PROGRAMMERS:
*/
INT
Test_NtUserGetClassInfo(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtUserGetClassInfo)
{
HINSTANCE hinst = GetModuleHandle(NULL);
WNDCLASSEXW wclex, wclex2 = {0};
UNICODE_STRING us;
PWSTR pwstr = NULL;
@ -26,7 +23,7 @@ Test_NtUserGetClassInfo(PTESTINFO pti)
wclex.lpfnWndProc = NULL;
wclex.cbClsExtra = 2;
wclex.cbWndExtra = 4;
wclex.hInstance = g_hInstance;
wclex.hInstance = hinst;
wclex.hIcon = NULL;
wclex.hCursor = NULL;
wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5));
@ -36,9 +33,9 @@ Test_NtUserGetClassInfo(PTESTINFO pti)
ASSERT(RegisterClassExW(&wclex) != 0);
TEST(GetClassInfoExW(g_hInstance, us.Buffer, &wclex) != 0);
TEST(GetClassInfoExW(hinst, us.Buffer, &wclex) != 0);
wclex2.cbSize = sizeof(WNDCLASSEXW);
TEST(NtUserGetClassInfo2(g_hInstance, &us, &wclex2, &pwstr, 0) != 0);
TEST(NtUserGetClassInfo(hinst, &us, &wclex2, &pwstr, 0) != 0);
TEST(pwstr == wclex.lpszMenuName);
TEST(wclex2.cbSize == wclex.cbSize);
@ -54,5 +51,4 @@ Test_NtUserGetClassInfo(PTESTINFO pti)
TEST(wclex2.lpszClassName == 0);
TEST(wclex2.hIconSm == wclex.hIconSm);
return APISTATUS_NORMAL;
}

View file

@ -1,5 +1,13 @@
INT
Test_NtUserGetIconInfo(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserGetIconInfo
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserGetIconInfo)
{
HICON hIcon;
ICONINFO iinfo;
@ -80,7 +88,7 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
&ResourceStr,
&bpp,
FALSE) == TRUE);
TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer);
TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(IDI_ICON));
TEST(bpp == 32);
@ -120,7 +128,7 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
&ResourceStr,
&bpp,
FALSE) == TRUE);
TEST(hInstStr.Length != 0);
hInstStr.Buffer[hInstStr.Length] = 0;
printf("%s,%i: hInstStr.buffer : %S\n", __FUNCTION__, __LINE__, hInstStr.Buffer);
@ -139,7 +147,7 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
&ResourceStr,
&bpp,
TRUE) == TRUE);
TEST(hInstStr.Length != 0);
hInstStr.Buffer[hInstStr.Length] = 0;
printf("%s,%i: hInstStr.buffer : %S\n", __FUNCTION__, __LINE__, hInstStr.Buffer);
@ -148,5 +156,4 @@ Test_NtUserGetIconInfo(PTESTINFO pti)
DestroyIcon(hIcon);
return APISTATUS_NORMAL;
}
}

View file

@ -0,0 +1,48 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserGetTitleBarInfo
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserGetTitleBarInfo)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HWND hWnd;
TITLEBARINFO tbi;
hWnd = CreateWindowA("BUTTON",
"Test",
BS_PUSHBUTTON | WS_VISIBLE,
0,
0,
50,
30,
NULL,
NULL,
hinst,
0);
ASSERT(hWnd);
/* FALSE case */
/* no windows handle */
TEST(NtUserGetTitleBarInfo(NULL, &tbi) == FALSE);
/* no TITLEBARINFO struct */
TEST(NtUserGetTitleBarInfo(hWnd, NULL) == FALSE);
/* nothing */
TEST(NtUserGetTitleBarInfo(NULL, NULL) == FALSE);
/* wrong size */
tbi.cbSize = 0;
TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == FALSE);
/* TRUE case */
tbi.cbSize = sizeof(TITLEBARINFO);
TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == TRUE);
DestroyWindow(hWnd);
}

View file

@ -1,6 +1,13 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserProcessConnect
* PROGRAMMERS:
*/
INT
Test_NtUserProcessConnect(PTESTINFO pti)
#include <win32nt.h>
START_TEST(NtUserProcessConnect)
{
HANDLE hProcess;
NTSTATUS Status;
@ -11,7 +18,7 @@ Test_NtUserProcessConnect(PTESTINFO pti)
UserConnect.ulVersion = MAKELONG(0, 5);
Status = NtUserProcessConnect(hProcess, (USERCONNECT*)&UserConnect, sizeof(USERCONNECT));
TEST(NT_SUCCESS(Status));
printf("UserConnect.ulVersion = 0x%lx\n", UserConnect.ulVersion);
printf("UserConnect.ulCurrentVersion = 0x%lx\n", UserConnect.ulCurrentVersion);
printf("UserConnect.dwDispatchCount = 0x%lx\n", UserConnect.dwDispatchCount);
@ -20,5 +27,4 @@ Test_NtUserProcessConnect(PTESTINFO pti)
printf("UserConnect.siClient.pDispInfo = 0x%p\n", UserConnect.siClient.pDispInfo);
printf("UserConnect.siClient.ulSharedDelta = 0x%lx\n", UserConnect.siClient.ulSharedDelta);
return APISTATUS_NORMAL;
}

View file

@ -1,6 +1,15 @@
INT
Test_NtUserRedrawWindow(PTESTINFO pti)
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserRedrawWindow
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserRedrawWindow)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HWND hWnd;
RECT rect;
@ -13,7 +22,7 @@ Test_NtUserRedrawWindow(PTESTINFO pti)
30,
NULL,
NULL,
g_hInstance,
hinst,
0);
ASSERT(hWnd);
@ -26,5 +35,4 @@ Test_NtUserRedrawWindow(PTESTINFO pti)
DestroyWindow(hWnd);
return APISTATUS_NORMAL;
}

View file

@ -1,8 +1,15 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserScrollDC
* PROGRAMMERS:
*/
#include <win32nt.h>
INT
Test_NtUserScrollDC(PTESTINFO pti)
START_TEST(NtUserScrollDC)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HWND hWnd;
HDC hDC;
HRGN hRgn, hTmpRgn;
@ -19,7 +26,7 @@ Test_NtUserScrollDC(PTESTINFO pti)
100,
NULL,
NULL,
g_hInstance,
hinst,
0);
ASSERT(hWnd);
RedrawWindow(hWnd, &rect, NULL, RDW_UPDATENOW);
@ -106,6 +113,5 @@ Test_NtUserScrollDC(PTESTINFO pti)
DestroyWindow(hWnd);
DeleteObject(hRgn);
return APISTATUS_NORMAL;
}

View file

@ -1,4 +1,11 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserSelectPalette
* PROGRAMMERS:
*/
#include <win32nt.h>
FORCEINLINE
PALETTEENTRY
@ -13,9 +20,9 @@ PALENTRY(BYTE r, BYTE g, BYTE b)
return ret;
}
INT
Test_NtUserSelectPalette(PTESTINFO pti)
START_TEST(NtUserSelectPalette)
{
HINSTANCE hinst = GetModuleHandle(NULL);
HPALETTE hPal, hOldPal;
HWND hWnd;
HDC hDC, hCompDC;
@ -38,14 +45,14 @@ Test_NtUserSelectPalette(PTESTINFO pti)
hPal = CreatePalette(&pal.logpal);
ASSERT(hPal);
TEST(DeletePalette(hPal) == 1);
TEST(DeleteObject(hPal) == 1);
hPal = CreatePalette(&pal.logpal);
ASSERT(hPal);
/* Create a window */
hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
NULL, NULL, g_hInstance, 0);
NULL, NULL, hinst, 0);
hDC = GetDC(hWnd);
ASSERT(hDC);
hCompDC = CreateCompatibleDC(hDC);
@ -81,7 +88,7 @@ Test_NtUserSelectPalette(PTESTINFO pti)
TEST(hOldPal == GetStockObject(DEFAULT_PALETTE));
/* We cannot Delete the palette */
TEST(DeletePalette(hPal) == 0);
TEST(DeleteObject(hPal) == 0);
/* We can still select the Palette into a compatible DC */
hOldPal = NtUserSelectPalette(hCompDC, hPal, 0);
@ -143,6 +150,4 @@ Test_NtUserSelectPalette(PTESTINFO pti)
printf("nearest = 0x%x\n", GetNearestColor(hCompDC, RGB(120,100,110)));
#endif
return APISTATUS_NORMAL;
}

View file

@ -0,0 +1,18 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: GPL - See COPYING in the top level directory
* PURPOSE: Test for NtUserSetTimer
* PROGRAMMERS:
*/
#include <win32nt.h>
START_TEST(NtUserSetTimer)
{
// check valid argument
// check for replacement / new timers
// check when expiries are handled (msgs and calls)
}

Some files were not shown because too many files have changed in this diff Show more