1 #define STAMP_DESIGNVECTOR (0x8000000 + 'd' + ('v' << 8))
4 Test_AddFontResourceEx(PTESTINFO pti
)
6 WCHAR szFileName
[MAX_PATH
];
8 /* Test NULL filename */
9 SetLastError(ERROR_SUCCESS
);
10 /* Windows crashes, would need SEH here */
11 // TEST(AddFontResourceExW(NULL, 0, 0) != 0);
12 // TEST(GetLastError() == ERROR_SUCCESS);
14 /* Test "" filename */
15 SetLastError(ERROR_SUCCESS
);
16 TEST(AddFontResourceExW(L
"", 0, 0) == 0);
17 TEST(GetLastError() == ERROR_INVALID_PARAMETER
);
19 GetEnvironmentVariableW(L
"systemroot", szFileName
, MAX_PATH
);
20 wcscat(szFileName
, L
"\\Fonts\\cour.ttf");
23 SetLastError(ERROR_SUCCESS
);
24 TEST(AddFontResourceExW(szFileName
, 0, 0) != 0);
25 TEST(GetLastError() == ERROR_SUCCESS
);
27 SetLastError(ERROR_SUCCESS
);
28 TEST(AddFontResourceExW(szFileName
, 256, 0) == 0);
29 TEST(GetLastError() == ERROR_INVALID_PARAMETER
);
31 /* Test invalid pointer as last parameter */
32 TEST(AddFontResourceExW(szFileName
, 0, (void*)-1) != 0);
35 return APISTATUS_NORMAL
;