ReactOS 0.4.15-dev-7670-g69b08be
svchlp.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4 * PURPOSE: Support helpers for embedded services inside api tests.
5 * PROGRAMMERS: Jacek Caban for CodeWeavers
6 * Thomas Faber <thomas.faber@reactos.org>
7 * Hermes Belusca-Maito
8 */
9
10#pragma once
11
12/********** S E R V I C E ( C L I E N T ) M O D U L E S I D E *********/
13
14void send_msg(const char *type, const char *msg);
15void service_trace(const char *msg, ...);
16void service_ok(int cnd, const char *msg, ...);
17void service_process(BOOL (*start_service)(PCSTR, PCWSTR), int argc, char** argv);
18
19
20/*********** T E S T E R ( S E R V E R ) M O D U L E S I D E **********/
21
22SC_HANDLE register_service_exA(
23 SC_HANDLE scm_handle,
25 PCSTR service_name, // LPCSTR lpServiceName,
26 PCSTR extra_args OPTIONAL,
27 DWORD dwDesiredAccess,
28 DWORD dwServiceType,
29 DWORD dwStartType,
30 DWORD dwErrorControl,
31 LPCSTR lpLoadOrderGroup OPTIONAL,
32 LPDWORD lpdwTagId OPTIONAL,
33 LPCSTR lpDependencies OPTIONAL,
34 LPCSTR lpServiceStartName OPTIONAL,
35 LPCSTR lpPassword OPTIONAL);
36
37SC_HANDLE register_service_exW(
38 SC_HANDLE scm_handle,
40 PCWSTR service_name, // LPCWSTR lpServiceName,
41 PCWSTR extra_args OPTIONAL,
42 DWORD dwDesiredAccess,
43 DWORD dwServiceType,
44 DWORD dwStartType,
45 DWORD dwErrorControl,
46 LPCWSTR lpLoadOrderGroup OPTIONAL,
47 LPDWORD lpdwTagId OPTIONAL,
48 LPCWSTR lpDependencies OPTIONAL,
49 LPCWSTR lpServiceStartName OPTIONAL,
50 LPCWSTR lpPassword OPTIONAL);
51
52SC_HANDLE register_serviceA(
53 SC_HANDLE scm_handle,
56 PCSTR extra_args OPTIONAL);
57
58SC_HANDLE register_serviceW(
59 SC_HANDLE scm_handle,
62 PCWSTR extra_args OPTIONAL);
63
64#ifdef UNICODE
65#define register_service_ex register_service_exW
66#define register_service register_serviceW
67#else
68#define register_service_ex register_service_exA
69#define register_service register_serviceA
70#endif
71
72void test_runner(void (*run_test)(PCSTR, PCWSTR, void*), void *param);
static char service_name[100]
static SC_HANDLE scm_handle
Definition: ServiceArgs.c:20
static int argc
Definition: ServiceArgs.c:12
#define msg(x)
Definition: auth_time.c:54
static HRESULT start_service(const WCHAR *name, VARIANT *retval)
Definition: service.c:169
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLfloat param
Definition: glext.h:5796
static const char * test_name
Definition: run.c:177
#define argv
Definition: mplay32.c:18
#define run_test(test)
Definition: ms_seh.c:71
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
void send_msg(const char *type, const char *msg)
Definition: svchlp.c:27
void service_trace(const char *msg,...)
Definition: svchlp.c:36
SC_HANDLE register_serviceW(SC_HANDLE scm_handle, PCWSTR test_name, PCWSTR service_name, PCWSTR extra_args OPTIONAL)
Definition: svchlp.c:212
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)
Definition: svchlp.c:86
void test_runner(void(*run_test)(PCSTR, PCWSTR, void *), void *param)
Definition: svchlp.c:280
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)
Definition: svchlp.c:142
void service_process(BOOL(*start_service)(PCSTR, PCWSTR), int argc, char **argv)
Definition: svchlp.c:60
void service_ok(int cnd, const char *msg,...)
Definition: svchlp.c:48
SC_HANDLE register_serviceA(SC_HANDLE scm_handle, PCSTR test_name, PCSTR service_name, PCSTR extra_args OPTIONAL)
Definition: svchlp.c:198
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint32_t * LPDWORD
Definition: typedefs.h:59
const char * PCSTR
Definition: typedefs.h:52
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185