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 LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
VOID WINAPI ExitProcess(IN UINT uExitCode)
static const WCHAR Cleanup[]
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
#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)
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)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#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_QUERY_STATUS
#define SERVICE_ALL_ACCESS
#define SC_MANAGER_ALL_ACCESS
#define SERVICE_DEMAND_START
#define SERVICE_WIN32_OWN_PROCESS
#define SERVICE_ERROR_IGNORE