reactos/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c
Magnus Olsen 58272e652f Adding dx test from my win32kdxtest to win32knapi test.
win32kdxtest are more like a analysis tools to examine some struct and dumping it, 
win32knapi is true test tools 

svn path=/trunk/; revision=28279
2007-08-11 08:52:38 +00:00

31 lines
626 B
C

#include "../w32knapi.h"
W32KAPI
HANDLE
APIENTRY
NtGdiDdCreateDirectDrawObject(
IN HDC hdc
)
{
return (HANDLE)Syscall(L"NtGdiDdCreateDirectDrawObject", 1, &hdc);
}
INT
Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti)
{
HANDLE hDirectDraw;
HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
ASSERT1(hdc != NULL);
/* Test ReactX */
RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL);
RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL);
/* Cleanup ReactX setup */
DeleteDC(hdc);
Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
return APISTATUS_NORMAL;
}