2 * PROJECT: ReactOS Standard Print Processor API Tests
3 * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
4 * PURPOSE: Main functions
5 * COPYRIGHT: Copyright 2016 Colin Finck <colin@reactos.org>
10 #define WIN32_NO_STATUS
17 GetWinprintFunc(const char* FunctionName
)
22 WCHAR wszWinprintPath
[MAX_PATH
];
24 // Build the path to the default Print Processor winprint.dll in the Print Processor directory.
25 if (!GetPrintProcessorDirectoryW(NULL
, NULL
, 1, (LPBYTE
)wszWinprintPath
, sizeof(wszWinprintPath
), &cbNeeded
))
27 skip("Could not determine the path to the Print Processor directory, last error is %lu!\n", GetLastError());
31 wcscat(wszWinprintPath
, L
"\\winprint.dll");
34 hWinprint
= LoadLibraryW(wszWinprintPath
);
37 if (GetLastError() != ERROR_MOD_NOT_FOUND
)
39 skip("LoadLibraryW failed for %S with error %lu!\n", wszWinprintPath
, GetLastError());
43 // winprint.dll does not exist prior to NT6.
44 // The default Print Processor is implemented in localspl.dll instead.
45 hWinprint
= LoadLibraryW(L
"localspl.dll");
48 skip("LoadLibraryW failed for localspl.dll with error %lu!\n", GetLastError());
53 // Get the function we are looking for.
54 pFunc
= GetProcAddress(hWinprint
, FunctionName
);
57 skip("GetProcAddress failed for %s with error %lu!\n", FunctionName
, GetLastError());