reactos/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c
Timo Kreuzer b91657fe81 - rename ASSERT1 to ASSERT
- link to w32kdll instead of implementing all syscalls as stubs. I will remove the rest of the syscall code as soon as our syscall db is more complete
- more TEST -> RTEST
- update w32kdll_ros.def
- add tests for NtGdiEngCreatePalette, NtGdiEnumFontOpen
- Add some gdi handle table code to w32knapi
- header cleanup

svn path=/trunk/; revision=28619
2007-08-28 15:06:36 +00:00

32 lines
868 B
C

INT
Test_NtGdiEnumFontOpen(PTESTINFO pti)
{
HDC hDC;
ULONG_PTR idEnum;
ULONG ulCount;
PGDI_TABLE_ENTRY pEntry;
hDC = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
// FIXME: We should load the font first
idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount);
ASSERT(idEnum != 0);
/* 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 == (HANDLE)GetCurrentProcessId());
TEST(pEntry->UserData == 0);
TEST(pEntry->Type == ((idEnum >> 16) | GDI_OBJECT_TYPE_ENUMFONT));
/* We should not be able to use DeleteObject() on the handle */
TEST(DeleteObject((HGDIOBJ)idEnum) == FALSE);
// FIXME: Close the enum handle
return APISTATUS_NORMAL;
}