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)
213 #if defined(_M_AMD64) 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");
226 #if defined(_M_AMD64) 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");
239 #if defined(_M_AMD64) 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");
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define SERVICE_ERROR_IGNORE
#define PIPE_TYPE_MESSAGE
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)
#define INVALID_HANDLE_VALUE
VOID WINAPI ExitProcess(IN UINT uExitCode)
DWORD WINAPI GetLastError(VOID)
START_TEST(fpEnumPrinters)
#define SERVICE_ALL_ACCESS
_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)
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
#define SERVICE_QUERY_STATUS
#define SERVICE_WIN32_OWN_PROCESS
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
#define PRINTER_ENUM_NAME
static SERVICE_STATUS ServiceStatus
#define PRINTER_ENUM_LOCAL
BOOL WINAPI QueryServiceStatus(SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus)
WINBOOL WINAPI EnumPrintersW(DWORD Flags, LPWSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
#define PIPE_ACCESS_OUTBOUND
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define ERROR_PIPE_CONNECTED
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
static const WCHAR Cleanup[]
#define PIPE_READMODE_MESSAGE
int WINAPI lstrlenA(LPCSTR lpString)
#define PIPE_ACCESS_INBOUND
#define ReadFile(a, b, c, d, e)
static void _RunRemoteTest(const char *szTestName)
#define SC_MANAGER_ALL_ACCESS
#define ERROR_SERVICE_DOES_NOT_EXIST
#define COMMAND_PIPE_NAME
HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
#define SERVICE_DEMAND_START
BOOL WINAPI ConnectNamedPipe(IN HANDLE hNamedPipe, IN LPOVERLAPPED lpOverlapped)
#define PIPE_READMODE_BYTE
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)