diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c index 6a0be8f626c..928a6399121 100644 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c +++ b/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c @@ -1,4 +1,3 @@ -#include "../w32knapi.h" INT Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti) diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c index f6dd63c492e..fb26f79ba8e 100644 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c +++ b/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c @@ -1,14 +1,3 @@ -#include "../w32knapi.h" - -W32KAPI -BOOL -APIENTRY -NtGdiDdDeleteDirectDrawObject( - HANDLE hDirectDrawLocal -) -{ - return (BOOL)Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDrawLocal); -} INT Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti) diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c index 5c880472c1e..b7873108651 100644 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c +++ b/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c @@ -1,23 +1,3 @@ -#include "../w32knapi.h" - -W32KAPI -BOOL STDCALL -NtGdiDdQueryDirectDrawObject( - HANDLE hDirectDrawLocal, - DD_HALINFO *pHalInfo, - DWORD *pCallBackFlags, - LPD3DNTHAL_CALLBACKS puD3dCallbacks, - LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, - PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, - LPDDSURFACEDESC puD3dTextureFormats, - DWORD *puNumHeaps, - VIDEOMEMORY *puvmList, - DWORD *puNumFourCC, - DWORD *puFourCC -) -{ - return (BOOL)Syscall(L"NtGdiDdQueryDirectDrawObject", 11, &hDirectDrawLocal); -} INT Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti) diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c b/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c index 015367f8d80..52ebe973820 100644 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c +++ b/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c @@ -1,17 +1,4 @@ -HPALETTE -APIENTRY -NtGdiEngCreatePalette( - IN ULONG iMode, - IN ULONG cColors, - IN ULONG *pulColors, - IN FLONG flRed, - IN FLONG flGreen, - IN FLONG flBlue) -{ - return (HPALETTE)Syscall(L"NtGdiEngCreatePalette", 6, &iMode); -} - INT Test_NtGdiEngCreatePalette(PTESTINFO pti) { diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c b/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c index 659d293a787..3ef0d01134e 100644 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c +++ b/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c @@ -25,7 +25,11 @@ Test_NtGdiEnumFontOpen(PTESTINFO pti) /* We should not be able to use DeleteObject() on the handle */ TEST(DeleteObject((HGDIOBJ)idEnum) == FALSE); - // FIXME: Close the enum handle + NtGdiEnumFontClose(idEnum); + + // Test no logfont (NULL): should word + // Test empty lfFaceName string: should not work + return APISTATUS_NORMAL; } diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c index 1da1e2a8a85..153e21bc740 100644 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c +++ b/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c @@ -1,5 +1,3 @@ -#include "../w32knapi.h" - INT Test_NtGdiSetBitmapBits(PTESTINFO pti) { diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c b/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c index 55375b2428f..10600a315c8 100644 --- a/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c +++ b/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c @@ -1,5 +1,3 @@ -#include "../w32knapi.h" - /* First the call stub */ DWORD STDCALL NtUserCountClipboardFormats(VOID) diff --git a/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c b/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c new file mode 100644 index 00000000000..aa0ac166f19 --- /dev/null +++ b/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c @@ -0,0 +1,7 @@ +INT +Test_NtUserFindExistingCursoricon(PTESTINFO pti) +{ + + return APISTATUS_NORMAL; +} + diff --git a/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c b/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c new file mode 100644 index 00000000000..6b288d277c3 --- /dev/null +++ b/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c @@ -0,0 +1,30 @@ +INT +Test_NtUserRedrawWindow(PTESTINFO pti) +{ + HWND hWnd; + RECT rect; + + hWnd = CreateWindowA("BUTTON", + "Test", + BS_PUSHBUTTON | WS_VISIBLE, + 0, + 0, + 50, + 30, + NULL, + NULL, + g_hInstance, + 0); + ASSERT(hWnd); + + rect.left = 0; + rect.top = 0; + rect.right = 10; + rect.bottom = 10; + + TEST(NtUserRedrawWindow(hWnd, &rect, NULL, RDW_VALIDATE) == TRUE); + + DestroyWindow(hWnd); + + return APISTATUS_NORMAL; +} diff --git a/rostests/apitests/w32knapi/resource.h b/rostests/apitests/w32knapi/resource.h new file mode 100644 index 00000000000..112444db17d --- /dev/null +++ b/rostests/apitests/w32knapi/resource.h @@ -0,0 +1,2 @@ + +#define IDI_ICON 1000 diff --git a/rostests/apitests/w32knapi/resource/system.ico b/rostests/apitests/w32knapi/resource/system.ico new file mode 100644 index 00000000000..2d8f3223187 Binary files /dev/null and b/rostests/apitests/w32knapi/resource/system.ico differ diff --git a/rostests/apitests/w32knapi/testlist.c b/rostests/apitests/w32knapi/testlist.c index b0ab9b7a81e..6df97ca8512 100644 --- a/rostests/apitests/w32knapi/testlist.c +++ b/rostests/apitests/w32knapi/testlist.c @@ -20,6 +20,8 @@ #include "ntgdi/NtGdiGetDIBits.c" #include "ntuser/NtUserCountClipboardFormats.c" +#include "ntuser/NtUserFindExistingCursorIcon.c" +#include "ntuser/NtUserRedrawWindow.c" /* The List of tests */ TESTENTRY TestList[] = @@ -44,7 +46,9 @@ TESTENTRY TestList[] = { L"NtGdiGetDIBitsInternal", Test_NtGdiGetDIBitsInternal }, /* ntuser */ - { L"NtUserCountClipboardFormats", Test_NtUserCountClipboardFormats } + { L"NtUserCountClipboardFormats", Test_NtUserCountClipboardFormats }, + { L"NtUserFindExistingCursorIcon", Test_NtUserFindExistingCursoricon }, + { L"NtUserRedrawWindow", Test_NtUserRedrawWindow } }; /* The function that gives us the number of tests */ diff --git a/rostests/apitests/w32knapi/w32knapi.h b/rostests/apitests/w32knapi/w32knapi.h index 2404b3d0312..cf29efc94a5 100644 --- a/rostests/apitests/w32knapi/w32knapi.h +++ b/rostests/apitests/w32knapi/w32knapi.h @@ -1,26 +1,29 @@ #ifndef _W32KNAPI_H #define _W32KNAPI_H -#define WIN32_NO_STATUS +/* SDK/NDK Headers */ #define NTOS_MODE_USER -#define WINVER 0x501 - +#define WIN32_NO_STATUS #include +#include +#include +#include +#include #include #include -#include #include #include /* Public Win32K Headers */ -#include #include +#include +#include #include +#include #include -#include - #include "../apitest.h" +#include "resource.h" typedef struct { diff --git a/rostests/apitests/w32knapi/w32knapi.rbuild b/rostests/apitests/w32knapi/w32knapi.rbuild index c6f2c34a126..de8058e0c3d 100644 --- a/rostests/apitests/w32knapi/w32knapi.rbuild +++ b/rostests/apitests/w32knapi/w32knapi.rbuild @@ -2,6 +2,7 @@ . 0x0501 + 0x501 apitest kernel32 user32 @@ -10,4 +11,5 @@ w32kdll w32knapi.c testlist.c + w32knapi.rc diff --git a/rostests/apitests/w32knapi/w32knapi.rc b/rostests/apitests/w32knapi/w32knapi.rc new file mode 100644 index 00000000000..d3cc13e3410 --- /dev/null +++ b/rostests/apitests/w32knapi/w32knapi.rc @@ -0,0 +1,5 @@ +#include +#include "resource.h" + +IDI_ICON ICON "resource/system.ico" +