X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=rostests%2Fapitests%2Flocalspl%2Fdll%2Fmain.c;h=fc63db4d83b53be09a4a0a2b8edd57ab2d4ab0ce;hp=0a0e1b1c62d1d9307a6dd08c6c931656511dc879;hb=a4d50f82ff60558596ed8976b62140283f8c01c3;hpb=1793014ec3313fd1cd202d34fd95564fac641e66 diff --git a/rostests/apitests/localspl/dll/main.c b/rostests/apitests/localspl/dll/main.c index 0a0e1b1c62d..fc63db4d83b 100644 --- a/rostests/apitests/localspl/dll/main.c +++ b/rostests/apitests/localspl/dll/main.c @@ -34,6 +34,38 @@ const struct test winetest_testlist[] = { 0, 0 } }; +BOOL +GetLocalsplFuncs(LPPRINTPROVIDOR pp) +{ + HMODULE hLocalspl; + PInitializePrintProvidor pfnInitializePrintProvidor; + + // Get us a handle to the loaded localspl.dll. + hLocalspl = GetModuleHandleW(L"localspl"); + if (!hLocalspl) + { + skip("GetModuleHandleW failed with error %u!\n", GetLastError()); + return FALSE; + } + + // Get a pointer to its InitializePrintProvidor function. + pfnInitializePrintProvidor = (PInitializePrintProvidor)GetProcAddress(hLocalspl, "InitializePrintProvidor"); + if (!pfnInitializePrintProvidor) + { + skip("GetProcAddress failed with error %u!\n", GetLastError()); + return FALSE; + } + + // Get localspl's function pointers. + if (!pfnInitializePrintProvidor(pp, sizeof(PRINTPROVIDOR), NULL)) + { + skip("pfnInitializePrintProvidor failed with error %u!\n", GetLastError()); + return FALSE; + } + + return TRUE; +} + // Running the tests from the injected DLL and redirecting their output to the pipe. BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)