ReactOS  0.4.15-dev-3456-g4a17d4b
NtGdiEnumFontOpen.c File Reference
#include <win32nt.h>
Include dependency graph for NtGdiEnumFontOpen.c:

Go to the source code of this file.

Functions

 START_TEST (NtGdiEnumFontOpen)
 

Function Documentation

◆ START_TEST()

START_TEST ( NtGdiEnumFontOpen  )

Definition at line 10 of file NtGdiEnumFontOpen.c.

11 {
12  HDC hDC;
13  ULONG_PTR idEnum;
14  ULONG ulCount;
15  PENTRY pEntry;
16 
17  hDC = CreateDCW(L"DISPLAY",NULL,NULL,NULL);
18 
19  // FIXME: We should load the font first
20 
21  idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount);
22  ok(idEnum != 0, "idEnum was 0.\n");
23  if (idEnum == 0)
24  {
25  skip("idEnum == 0\n");
26  return;
27  }
28 
29  /* we should have a gdi handle here */
32  ok(pEntry->einfo.pobj != NULL, "pEntry->einfo.pobj was NULL.\n");
33  ok_long(pEntry->ObjectOwner.ulObj, GetCurrentProcessId());
34  ok_ptr(pEntry->pUser, NULL);
35  ok_int(pEntry->FullUnique, (idEnum >> 16));
37  ok_int(pEntry->Flags, 0);
38 
39  /* We should not be able to use DeleteObject() on the handle */
40  ok_int(DeleteObject((HGDIOBJ)idEnum), FALSE);
41 
42  NtGdiEnumFontClose(idEnum);
43 
44  // Test no logfont (NULL): should word
45  // Test empty lfFaceName string: should not work
46 }
#define GDI_HANDLE_GET_INDEX(h)
Definition: gdi.h:28
static HDC
Definition: imagelist.c:92
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define GDI_OBJECT_TYPE_ENUMFONT
Definition: ntgdihdl.h:62
#define ok_long(expression, result)
Definition: atltest.h:133
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
__kernel_entry W32KAPI ULONG_PTR APIENTRY NtGdiEnumFontOpen(_In_ HDC hdc, _In_ ULONG iEnumType, _In_ FLONG flWin31Compat, _In_ ULONG cwchMax, _In_opt_ LPWSTR pwszFaceName, _In_ ULONG lfCharSet, _Out_ ULONG *pulCount)
#define ok_int(expression, result)
Definition: atltest.h:134
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
#define GdiHandleTable
Definition: win32nt.h:35
__kernel_entry W32KAPI BOOL APIENTRY NtGdiEnumFontClose(_In_ ULONG_PTR idEnum)
static HDC hDC
Definition: 3dtext.c:33
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
#define skip(...)
Definition: atltest.h:64
unsigned int ULONG
Definition: retypes.h:1
Definition: ntgdihdl.h:239
#define ANSI_CHARSET
Definition: wingdi.h:383
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158