reactos/rostests/apitests/w32knapi/ntgdi/NtGdiGetFontResourceInfoInternalW.c
Timo Kreuzer e7657c026b - a bunch of tests for NtUserEnumDisplaySettings
- one test for NtGdiGetFontResourceInfoInternalW

svn path=/trunk/; revision=33452
2008-05-11 21:49:56 +00:00

44 lines
963 B
C

INT
Test_NtGdiGetFontResourceInfoInternalW(PTESTINFO pti)
{
WCHAR szFullFileName[MAX_PATH+1];
BOOL bRet;
DWORD dwBufSize;
LOGFONTW logfont;
UNICODE_STRING NtFileName;
GetCurrentDirectoryW(MAX_PATH, szFullFileName);
wcscat(szFullFileName, L"\\test.otf");
ASSERT(AddFontResourceW(szFullFileName) != 0);
ASSERT(RtlDosPathNameToNtPathName_U(szFullFileName,
&NtFileName,
NULL,
NULL));
dwBufSize = sizeof(logfont);
memset(&logfont, 0x0, dwBufSize);
bRet = NtGdiGetFontResourceInfoInternalW(
NtFileName.Buffer,
(NtFileName.Length / sizeof(WCHAR)) +1,
1,
dwBufSize,
&dwBufSize,
&logfont,
2);
TEST(bRet != FALSE);
printf("lfHeight = %ld\n", logfont.lfHeight);
printf("lfWidth = %ld\n", logfont.lfWidth);
printf("lfFaceName = %ls\n", logfont.lfFaceName);
RemoveFontResourceW(szFullFileName);
return APISTATUS_NORMAL;
}