26{
29
33
35 return;
36
37 pGetPrintProcessorDirectoryW =
GetSpoolssFunc(
"GetPrintProcessorDirectoryW");
38 if (!pGetPrintProcessorDirectoryW)
39 return;
40
41
43 ok(!pp.fpGetPrintProcessorDirectory(
NULL,
NULL, 0,
NULL, 0,
NULL),
"fpGetPrintProcessorDirectory returns TRUE!\n");
45
46
48 ok(!pp.fpGetPrintProcessorDirectory(
NULL,
L"invalid", 0,
NULL, 0,
NULL),
"fpGetPrintProcessorDirectory returns TRUE!\n");
50
51
52#if 0
53
54
55
57 {
58 dwReturned = 0;
59 pp.fpGetPrintProcessorDirectory(
NULL,
L"wIndows nt x86", 0,
NULL, 0,
NULL);
60 }
62 {
64 }
66
68#endif
69
70
71
73 cbNeeded = 0;
74 ok(!pp.fpGetPrintProcessorDirectory(
NULL,
L"wIndows nt x86", 1337,
NULL, 0, &cbNeeded),
"fpGetPrintProcessorDirectory returns TRUE!\n");
76 ok(cbNeeded > 0,
"cbNeeded is %lu!\n", cbNeeded);
77
78
79#if 0
80
81
83 {
84 dwReturned = 0;
85 pp.fpGetPrintProcessorDirectory(
NULL,
L"wIndows nt x86", 1,
NULL, cbNeeded, &cbTemp);
86 }
88 {
90 }
92
94#endif
95
96
97
99 cbTemp = 0xDEADBEEF;
100 ok(!pGetPrintProcessorDirectoryW(
NULL,
L"wIndows nt x86", 1,
NULL, cbNeeded, &cbTemp),
"pGetPrintProcessorDirectoryW returns TRUE!\n");
102 ok(cbTemp == 0xDEADBEEF,
"cbTemp is %lu!\n", cbTemp);
103
104
105
108 ok(pp.fpGetPrintProcessorDirectory(
NULL,
L"wIndows nt x86", 1, (
PBYTE)pwszBuffer, cbNeeded, &cbTemp),
"fpGetPrintProcessorDirectory returns FALSE!\n");
109 ok(
wcslen(pwszBuffer) == cbNeeded /
sizeof(
WCHAR) - 1,
"fpGetPrintProcessorDirectory string is %Iu characters long, but %lu characters expected!\n",
wcslen(pwszBuffer), cbNeeded /
sizeof(
WCHAR) - 1);
111}
#define ERROR_INSUFFICIENT_BUFFER
BOOL(WINAPI * PGetPrintProcessorDirectoryW)(LPWSTR, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD)
PVOID GetSpoolssFunc(const char *FunctionName)
BOOL GetLocalsplFuncs(LPPRINTPROVIDOR pp)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define EXCEPTION_EXECUTE_HANDLER
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
BOOL WINAPI DllFreeSplMem(PVOID pMem)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
#define EXCEPTION_ACCESS_VIOLATION
#define ERROR_INVALID_USER_BUFFER
#define ERROR_INVALID_ENVIRONMENT