ReactOS  0.4.14-dev-614-gbfd8a84
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 
14 void send_msg(const char *type, const char *msg);
15 void service_trace(const char *msg, ...);
16 void service_ok(int cnd, const char *msg, ...);
17 void 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 
22 SC_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 
37 SC_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 
52 SC_HANDLE register_serviceA(
53  SC_HANDLE scm_handle,
56  PCSTR extra_args OPTIONAL);
57 
58 SC_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 
72 void test_runner(void (*run_test)(PCSTR, PCWSTR, void*), void *param);
static int argc
Definition: ServiceArgs.c:12
const uint16_t * PCWSTR
Definition: typedefs.h:55
void service_trace(const char *msg,...)
Definition: svchlp.c:36
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static SC_HANDLE scm_handle
Definition: ServiceArgs.c:20
SC_HANDLE register_serviceW(SC_HANDLE scm_handle, PCWSTR test_name, PCWSTR service_name, PCWSTR extra_args OPTIONAL)
Definition: svchlp.c:212
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define argv
Definition: mplay32.c:18
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
unsigned int BOOL
Definition: ntddk_ex.h:94
#define run_test(info, expect_button, expect_radio_button, verification_checked, seq, context)
Definition: taskdialog.c:395
static HRESULT start_service(const WCHAR *name, VARIANT *retval)
Definition: service.c:169
const char * LPCSTR
Definition: xmlstorage.h:183
void send_msg(const char *type, const char *msg)
Definition: svchlp.c:27
GLfloat param
Definition: glext.h:5796
static char service_name[100]
unsigned long DWORD
Definition: ntddk_ex.h:95
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
void test_runner(void(*run_test)(PCSTR, PCWSTR, void *), void *param)
Definition: svchlp.c:280
static const char * test_name
Definition: run.c:177
#define msg(x)
Definition: auth_time.c:54
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
uint32_t * LPDWORD
Definition: typedefs.h:57
void service_process(BOOL(*start_service)(PCSTR, PCWSTR), int argc, char **argv)
Definition: svchlp.c:60
const char * PCSTR
Definition: typedefs.h:51
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68