ReactOS  0.4.15-dev-4594-g505ac65
svc.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Service Host
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * PURPOSE: Global Header for Service Host
5  * PROGRAMMERS: ReactOS Portable Systems Group
6  *
7  * REFERENCES:
8  * https://www.geoffchappell.com/studies/windows/win32/services/svchost/process/globaldata.htm
9  */
10 
11 #ifndef __SVC_H
12 #define __SVC_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #ifndef __RPC_H__ // For RPC_IF_HANDLE
19 /* Don't include windows.h if we just need rpc.h */
20 #ifndef RPC_NO_WINDOWS_H
21 #define RPC_NO_WINDOWS_H
22 #endif
23 #include <rpc.h>
24 #endif // __RPC_H__
25 
26 #ifndef WINAPI
27 #define WINAPI __stdcall
28 #endif
29 
30 /* Ensure NTSTATUS is defined */
31 #ifndef _NTDEF_
33 #endif
34 
35 
36 /*
37  * Entrypoints for starting and stopping an RPC server.
38  */
39 typedef NTSTATUS
41  _In_ PCWSTR IfName,
42  _In_ RPC_IF_HANDLE IfSpec);
43 
44 typedef NTSTATUS
46  _In_ RPC_IF_HANDLE IfSpec);
47 
48 typedef NTSTATUS
50  _In_ RPC_IF_HANDLE IfSpec);
51 
52 /*
53  * Entrypoints for NetBIOS service support.
54  */
55 typedef VOID
57 
58 typedef VOID
60 
61 typedef DWORD
63  _In_ UCHAR LanaNum);
64 
65 /*
66  * Callback that a hosted service can register for stop notification.
67  * Alias to (RTL_)WAITORTIMERCALLBACK(FUNC).
68  */
69 /*
70 typedef VOID
71 (CALLBACK *PSVCHOST_STOP_CALLBACK)(
72  _In_ PVOID lpParameter,
73  _In_ BOOLEAN TimerOrWaitFired);
74 */
76 
77 #if (_WIN32_WINNT == _WIN32_WINNT_WINXP && NTDDI_VERSION >= NTDDI_WINXPSP2) || \
78  (NTDDI_VERSION >= NTDDI_WS03SP1)
79 typedef DWORD
81  _Out_ PHANDLE phNewWaitObject,
82  _In_ PCWSTR pszServiceName,
83  _In_ HANDLE hObject,
87 #endif
88 
89 /*
90  * Hosted Services and SvcHost use this shared global data structure.
91  */
92 typedef struct _SVCHOST_GLOBAL_DATA
93 {
112 
113  /* SvcHost callbacks for RPC server and NetBIOS service support */
120 
121 #if (_WIN32_WINNT == _WIN32_WINNT_WINXP && NTDDI_VERSION >= NTDDI_WINXPSP2) || \
122  (NTDDI_VERSION >= NTDDI_WS03SP1)
124 #endif
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif /* __SVC_H */
* PNTSTATUS
Definition: strlen.c:14
DWORD(WINAPI * PNET_BIOS_RESET)(_In_ UCHAR LanaNum)
Definition: svc.h:62
VOID(WINAPI * PNET_BIOS_CLOSE)(VOID)
Definition: svc.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
PSID AliasPowerUsersSid
Definition: svc.h:107
#define _Out_
Definition: ms_sal.h:345
VOID(WINAPI * PNET_BIOS_OPEN)(VOID)
Definition: svc.h:56
LONG NTSTATUS
Definition: precomp.h:26
PNET_BIOS_RESET NetBiosReset
Definition: svc.h:119
PSID AnonymousLogonSid
Definition: svc.h:103
PSID LocalSystemSid
Definition: svc.h:98
#define DWORD
Definition: nt_native.h:44
PSID NetworkSid
Definition: svc.h:97
#define WINAPI
Definition: svc.h:27
PSTOP_RPC_SERVER_EX StopRpcServerEx
Definition: svc.h:116
PSID AliasBackupOpsSid
Definition: svc.h:111
typedef _Return_type_success_(return >=0) LONG NTSTATUS
long LONG
Definition: pedump.c:60
PREGISTER_STOP_CALLBACK RegisterStopCallback
Definition: svc.h:123
NTSTATUS(WINAPI * PSTOP_RPC_SERVER_EX)(_In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:49
#define _In_
Definition: ms_sal.h:308
struct _SVCHOST_GLOBAL_DATA * PSVCHOST_GLOBAL_DATA
PNET_BIOS_CLOSE NetBiosClose
Definition: svc.h:118
PSID AliasAccountOpsSid
Definition: svc.h:108
struct _SVCHOST_GLOBAL_DATA SVCHOST_GLOBAL_DATA
DWORD(WINAPI * PREGISTER_STOP_CALLBACK)(_Out_ PHANDLE phNewWaitObject, _In_ PCWSTR pszServiceName, _In_ HANDLE hObject, _In_ PSVCHOST_STOP_CALLBACK Callback, _In_ PVOID Context, _In_ ULONG dwFlags)
Definition: svc.h:80
PSID AliasPrintOpsSid
Definition: svc.h:110
unsigned char UCHAR
Definition: xmlstorage.h:181
#define NTSTATUS
Definition: precomp.h:20
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
#define VOID
Definition: acefi.h:82
PNET_BIOS_OPEN NetBiosOpen
Definition: svc.h:117
NTSTATUS(WINAPI * PSTART_RPC_SERVER)(_In_ PCWSTR IfName, _In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:40
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:456
PSID AuthenticatedUserSid
Definition: svc.h:102
PSTART_RPC_SERVER StartRpcServer
Definition: svc.h:114
PSID NetworkServiceSid
Definition: svc.h:100
static WAITORTIMERCALLBACK
Definition: thread.c:81
PSID LocalServiceSid
Definition: svc.h:99
WAITORTIMERCALLBACK PSVCHOST_STOP_CALLBACK
Definition: svc.h:75
NTSTATUS(WINAPI * PSTOP_RPC_SERVER)(_In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:45
PSID AliasGuestsSid
Definition: svc.h:106
struct tagContext Context
Definition: acpixf.h:1034
PSID AliasAdminsSid
Definition: svc.h:104
unsigned int ULONG
Definition: retypes.h:1
PSID AliasUsersSid
Definition: svc.h:105
PSTOP_RPC_SERVER StopRpcServer
Definition: svc.h:115
PSID BuiltinDomainSid
Definition: svc.h:101
PSID AliasSystemOpsSid
Definition: svc.h:109