26#define WIN32_NO_STATUS
52 SC_HANDLE hService =
NULL;
72 skip(
"File path has no file extension: %S\n", wszFilePath);
82 skip(
"My DLL file \"%S\" does not exist!\n", wszFilePath);
101 skip(
"OpenServiceW failed for the spooler service with error %lu!\n",
GetLastError());
107 skip(
"QueryServiceStatus failed for the spooler service with error %lu!\n",
GetLastError());
113 skip(
"Spooler Service is not running!\n");
126 hService =
CreateServiceW(hSC,
SERVICE_NAME,
NULL,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START,
SERVICE_ERROR_IGNORE, wszFilePath,
NULL,
NULL,
NULL,
NULL,
NULL);
144 skip(
"CreateNamedPipeW failed for the command pipe with error %lu!\n",
GetLastError());
151 skip(
"CreateNamedPipeW failed for the output pipe with error %lu!\n",
GetLastError());
165 skip(
"ConnectNamedPipe failed for the command pipe with error %lu!\n",
GetLastError());
179 skip(
"ConnectNamedPipe failed for the output pipe with error %lu!\n",
GetLastError());
184 while (
ReadFile(hOutputPipe, szBuffer,
sizeof(szBuffer), &cbRead,
NULL) && cbRead)
216 skip(
"ROSTESTS-366: Skipping localspl_apitest:fpEnumPrinters because it hangs on Windows Server 2003 x64-Testbot. Set winetest_interactive to run it anyway.\n");
229 skip(
"ROSTESTS-366: Skipping localspl_apitest:fpGetPrintProcessorDirectory because it hangs on Windows Server 2003 x64-Testbot. Set winetest_interactive to run it anyway.\n");
242 skip(
"ROSTESTS-366: Skipping localspl_apitest:fpSetJob because it hangs on Windows Server 2003 x64-Testbot. Set winetest_interactive to run it anyway.\n");
static void _RunRemoteTest(const char *szTestName)
static SERVICE_STATUS ServiceStatus
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
VOID WINAPI ExitProcess(IN UINT uExitCode)
size_t CDECL fwrite(const void *ptr, size_t size, size_t nmemb, FILE *file)
static const WCHAR Cleanup[]
#define COMMAND_PIPE_NAME
int WINAPI lstrlenA(LPCSTR lpString)
BOOL WINAPI ConnectNamedPipe(IN HANDLE hNamedPipe, IN LPOVERLAPPED lpOverlapped)
HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
#define SERVICE_QUERY_STATUS
#define SERVICE_ALL_ACCESS
#define SC_MANAGER_ALL_ACCESS
BOOL WINAPI QueryServiceStatus(SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI CreateServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, LPCWSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword)
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
#define PIPE_ACCESS_INBOUND
#define PIPE_READMODE_BYTE
DWORD WINAPI GetLastError(void)
#define PIPE_READMODE_MESSAGE
#define PIPE_ACCESS_OUTBOUND
#define PIPE_TYPE_MESSAGE
#define ERROR_SERVICE_DOES_NOT_EXIST
#define ERROR_PIPE_CONNECTED
#define PRINTER_ENUM_LOCAL
WINBOOL WINAPI EnumPrintersW(DWORD Flags, LPWSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
#define PRINTER_ENUM_NAME
#define SERVICE_DEMAND_START
#define SERVICE_WIN32_OWN_PROCESS
#define SERVICE_ERROR_IGNORE