91 DWORD dwDesiredAccess,
123 StringCbCatA(service_cmd,
sizeof(service_cmd), extra_args);
126 trace(
"service_cmd \"%s\"\n", service_cmd);
129 dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
130 service_cmd, lpLoadOrderGroup, lpdwTagId, lpDependencies,
131 lpServiceStartName, lpPassword);
134 skip(
"Not enough access right to create service.\n");
147 DWORD dwDesiredAccess,
150 DWORD dwErrorControl,
179 StringCbCatW(service_cmd,
sizeof(service_cmd), extra_args);
182 trace(
"service_cmd \"%ls\"\n", service_cmd);
185 dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl,
186 service_cmd, lpLoadOrderGroup, lpdwTagId, lpDependencies,
187 lpServiceStartName, lpPassword);
190 skip(
"Not enough access right to create service.\n");
255 ok(1,
"service: %s",
buf+3);
259 ok(0,
"service: %s",
buf+5);
263 ok(0,
"malformed service message: %s\n",
buf);
276 trace(
"pipe disconnected\n");
static char service_name[100]
static SC_HANDLE scm_handle
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
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)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
DWORD WINAPI GetTickCount(VOID)
static HRESULT start_service(const WCHAR *name, VARIANT *retval)
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
int WINAPI lstrlenA(LPCSTR lpString)
static const char * test_name
static __ms_va_list valist
BOOL WINAPI ConnectNamedPipe(IN HANDLE hNamedPipe, IN LPOVERLAPPED lpOverlapped)
BOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe)
HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI WaitNamedPipeW(LPCWSTR lpNamedPipeName, DWORD nTimeOut)
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)
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPCSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword)
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCbVPrintfA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszFormat, va_list argList)
STRSAFEAPI StringCbCatA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszSrc)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbPrintfA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszFormat,...)
STRSAFEAPI StringCbCopyA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszSrc)
static CHAR service_nameA[100]
void send_msg(const char *type, const char *msg)
void service_trace(const char *msg,...)
SC_HANDLE register_serviceW(SC_HANDLE scm_handle, PCWSTR test_name, PCWSTR service_name, PCWSTR extra_args OPTIONAL)
SC_HANDLE register_service_exA(SC_HANDLE scm_handle, PCSTR test_name, PCSTR service_name, PCSTR extra_args OPTIONAL, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpLoadOrderGroup OPTIONAL, LPDWORD lpdwTagId OPTIONAL, LPCSTR lpDependencies OPTIONAL, LPCSTR lpServiceStartName OPTIONAL, LPCSTR lpPassword OPTIONAL)
void test_runner(void(*run_test)(PCSTR, PCWSTR, void *), void *param)
static HANDLE hClientPipe
static WCHAR service_nameW[100]
SC_HANDLE register_service_exW(SC_HANDLE scm_handle, PCWSTR test_name, PCWSTR service_name, PCWSTR extra_args OPTIONAL, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpLoadOrderGroup OPTIONAL, LPDWORD lpdwTagId OPTIONAL, LPCWSTR lpDependencies OPTIONAL, LPCWSTR lpServiceStartName OPTIONAL, LPCWSTR lpPassword OPTIONAL)
void service_process(BOOL(*start_service)(PCSTR, PCWSTR), int argc, char **argv)
void service_ok(int cnd, const char *msg,...)
static WCHAR named_pipe_name[100]
static DWORD WINAPI pipe_thread(void *param)
SC_HANDLE register_serviceA(SC_HANDLE scm_handle, PCSTR test_name, PCSTR service_name, PCSTR extra_args OPTIONAL)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define PIPE_ACCESS_INBOUND
DWORD WINAPI GetLastError(void)
#define NMPWAIT_USE_DEFAULT_WAIT
#define PIPE_READMODE_MESSAGE
#define PIPE_TYPE_MESSAGE
#define ERROR_BROKEN_PIPE
#define ERROR_PIPE_CONNECTED
#define SERVICE_ALL_ACCESS
#define SERVICE_DEMAND_START
#define SERVICE_WIN32_OWN_PROCESS
#define SERVICE_ERROR_IGNORE