ReactOS  0.4.12-dev-102-g4b7f1e0
sc.h
Go to the documentation of this file.
1 #ifndef _SC_PCH_
2 #define _SC_PCH_
3 
4 #include <stdarg.h>
5 
6 #define WIN32_NO_STATUS
7 #include <windef.h>
8 #include <winbase.h>
9 #include <winsvc.h>
10 #include <sddl.h>
11 #include <tchar.h>
12 
13 #include <ndk/rtlfuncs.h>
14 #include <ndk/setypes.h>
15 
16 
17 // Uncomment to enable debug messages on user interface.
18 // #define SCDBG
19 
20 typedef struct
21 {
33 
36 
37 
38 /* control functions */
39 BOOL Start(LPCTSTR ServiceName, LPCTSTR *ServiceArgs, INT ArgCount);
40 BOOL Create(LPCTSTR *ServiceArgs, INT ArgCount);
43 BOOL Query(LPCTSTR *ServiceArgs, DWORD ArgCount, BOOL bExtended);
44 
49 BOOL SetConfig(LPCTSTR *ServiceArgs, INT ArgCount);
53 BOOL SetFailure(LPCTSTR *ServiceArgs, INT ArgCount);
57 
58 /* print and error functions */
59 VOID PrintService(LPCTSTR ServiceName, LPCTSTR DisplayName, LPSERVICE_STATUS_PROCESS pStatus, BOOL bExtended);
62 
63 /* misc.c */
64 BOOL
66  LPCTSTR *ServiceArgs,
67  INT ArgCount,
68  BOOL bChangeService,
69  OUT LPSERVICE_CREATE_INFO lpServiceInfo);
70 
71 BOOL
73  LPCTSTR *ServiceArgs,
74  INT ArgCount,
75  OUT LPCTSTR *ppServiceName,
76  OUT LPSERVICE_FAILURE_ACTIONS pFailureActions);
77 
78 /* usage functions */
99 
100 #endif /* _SC_PCH_ */
LPCTSTR lpBinaryPathName
Definition: sc.h:27
VOID EnumDependUsage(VOID)
Definition: usage.c:285
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
BOOL QueryFailure(LPCTSTR ServiceName)
Definition: failure.c:11
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
VOID GetDisplayNameUsage(VOID)
Definition: usage.c:268
VOID InterrogateUsage(VOID)
Definition: usage.c:110
BOOL ParseFailureArguments(LPCTSTR *ServiceArgs, INT ArgCount, OUT LPCTSTR *ppServiceName, OUT LPSERVICE_FAILURE_ACTIONS pFailureActions)
BOOL QueryConfig(LPCTSTR ServiceName)
Definition: config.c:12
BOOL SetDescription(LPCTSTR ServiceName, LPCTSTR Description)
Definition: description.c:99
BOOL EnumDepend(LPCTSTR ServiceName)
Definition: depend.c:12
DWORD dwServiceType
Definition: sc.h:24
VOID StartUsage(VOID)
Definition: usage.c:93
VOID SdShowUsage(VOID)
Definition: usage.c:181
static const WCHAR Description[]
Definition: oid.c:1103
DWORD dwTagId
Definition: sc.h:29
VOID StopUsage(VOID)
Definition: usage.c:119
LPCTSTR lpServiceName
Definition: sc.h:22
int32_t INT
Definition: typedefs.h:56
BOOL SetConfig(LPCTSTR *ServiceArgs, INT ArgCount)
Definition: config.c:199
VOID CreateUsage(VOID)
Definition: usage.c:146
VOID ControlUsage(VOID)
Definition: usage.c:169
VOID ReportLastError(VOID)
Definition: sc.c:15
BOOL GetKeyName(LPCTSTR ServiceName)
Definition: name.c:77
BOOL Create(LPCTSTR *ServiceArgs, INT ArgCount)
Definition: create.c:13
BOOL SdShow(LPCTSTR ServiceName)
Definition: sdshow.c:12
struct SERVICE_CREATE_INFO * LPSERVICE_CREATE_INFO
BOOL Control(DWORD Control, LPCTSTR ServiceName, LPCTSTR *Args, INT ArgCount)
Definition: control.c:13
VOID DeleteUsage(VOID)
Definition: usage.c:135
VOID SetDescriptionUsage(VOID)
Definition: usage.c:221
BOOL QueryDescription(LPCTSTR ServiceName)
Definition: description.c:12
BOOL Query(LPCTSTR *ServiceArgs, DWORD ArgCount, BOOL bExtended)
Definition: query.c:292
VOID SetFailureUsage(VOID)
Definition: usage.c:249
char ** Args
Definition: acdebug.h:342
LPSERVICE_STATUS_PROCESS QueryService(LPCTSTR ServiceName)
Definition: query.c:13
VOID SdSetUsage(VOID)
Definition: usage.c:189
unsigned int BOOL
Definition: ntddk_ex.h:94
LPTSTR ServiceName
Definition: ServiceMain.c:15
DWORD dwErrorControl
Definition: sc.h:26
BOOL SdSet(LPCTSTR ServiceName, LPCTSTR SecurityDescriptor)
Definition: sdset.c:12
BOOL Delete(LPCTSTR ServiceName)
Definition: delete.c:12
VOID QueryDescriptionUsage(VOID)
Definition: usage.c:205
LPCTSTR lpLoadOrderGroup
Definition: sc.h:28
BOOL bTagId
Definition: sc.h:34
VOID PauseUsage(VOID)
Definition: usage.c:102
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL SetFailure(LPCTSTR *ServiceArgs, INT ArgCount)
Definition: failure.c:120
VOID QueryConfigUsage(VOID)
Definition: usage.c:197
LPCTSTR lpPassword
Definition: sc.h:32
BOOL Start(LPCTSTR ServiceName, LPCTSTR *ServiceArgs, INT ArgCount)
Definition: start.c:12
DWORD dwStartType
Definition: sc.h:25
VOID PrintService(LPCTSTR ServiceName, LPCTSTR DisplayName, LPSERVICE_STATUS_PROCESS pStatus, BOOL bExtended)
Definition: print.c:13
VOID ContinueUsage(VOID)
Definition: usage.c:127
VOID SetConfigUsage(VOID)
Definition: usage.c:229
VOID QueryFailureUsage(VOID)
Definition: usage.c:213
LPCTSTR lpDependencies
Definition: sc.h:30
#define OUT
Definition: typedefs.h:39
VOID MainUsage(VOID)
Definition: usage.c:14
BOOL ParseCreateConfigArguments(LPCTSTR *ServiceArgs, INT ArgCount, BOOL bChangeService, OUT LPSERVICE_CREATE_INFO lpServiceInfo)
Definition: misc.c:53
LPCTSTR lpDisplayName
Definition: sc.h:23
BOOL GetDisplayName(LPCTSTR ServiceName)
Definition: name.c:12
VOID PrintServiceStatus(LPSERVICE_STATUS pStatus)
Definition: print.c:39
VOID GetKeyNameUsage(VOID)
Definition: usage.c:276
LPCTSTR lpServiceStartName
Definition: sc.h:31