ReactOS 0.4.15-dev-7897-g78dc504
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
15extern "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 */
39typedef NTSTATUS
41 _In_ PCWSTR IfName,
42 _In_ RPC_IF_HANDLE IfSpec);
43
44typedef NTSTATUS
46 _In_ RPC_IF_HANDLE IfSpec);
47
48typedef NTSTATUS
50 _In_ RPC_IF_HANDLE IfSpec);
51
52/*
53 * Entrypoints for NetBIOS service support.
54 */
55typedef VOID
57
58typedef VOID
60
61typedef 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/*
70typedef 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)
79typedef 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 */
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 */
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
#define NTSTATUS
Definition: precomp.h:21
* PNTSTATUS
Definition: strlen.c:14
static WAITORTIMERCALLBACK
Definition: thread.c:81
#define _Return_type_success_(expr)
Definition: ms_sal.h:263
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define DWORD
Definition: nt_native.h:44
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
long LONG
Definition: pedump.c:60
WAITORTIMERCALLBACK PSVCHOST_STOP_CALLBACK
Definition: svc.h:75
DWORD(WINAPI * PNET_BIOS_RESET)(_In_ UCHAR LanaNum)
Definition: svc.h:62
NTSTATUS(WINAPI * PSTART_RPC_SERVER)(_In_ PCWSTR IfName, _In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:40
struct _SVCHOST_GLOBAL_DATA SVCHOST_GLOBAL_DATA
NTSTATUS(WINAPI * PSTOP_RPC_SERVER_EX)(_In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:49
NTSTATUS(WINAPI * PSTOP_RPC_SERVER)(_In_ RPC_IF_HANDLE IfSpec)
Definition: svc.h:45
VOID(WINAPI * PNET_BIOS_CLOSE)(VOID)
Definition: svc.h:59
#define WINAPI
Definition: svc.h:27
struct _SVCHOST_GLOBAL_DATA * PSVCHOST_GLOBAL_DATA
VOID(WINAPI * PNET_BIOS_OPEN)(VOID)
Definition: svc.h:56
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
PNET_BIOS_OPEN NetBiosOpen
Definition: svc.h:117
PSID LocalSystemSid
Definition: svc.h:98
PSID AliasAdminsSid
Definition: svc.h:104
PSTOP_RPC_SERVER_EX StopRpcServerEx
Definition: svc.h:116
PSID AliasAccountOpsSid
Definition: svc.h:108
PSID NetworkServiceSid
Definition: svc.h:100
PNET_BIOS_RESET NetBiosReset
Definition: svc.h:119
PSID AliasUsersSid
Definition: svc.h:105
PSID AliasPrintOpsSid
Definition: svc.h:110
PSID AnonymousLogonSid
Definition: svc.h:103
PSID NetworkSid
Definition: svc.h:97
PSID BuiltinDomainSid
Definition: svc.h:101
PSID AliasGuestsSid
Definition: svc.h:106
PSID AliasPowerUsersSid
Definition: svc.h:107
PREGISTER_STOP_CALLBACK RegisterStopCallback
Definition: svc.h:123
PSID LocalServiceSid
Definition: svc.h:99
PSID AuthenticatedUserSid
Definition: svc.h:102
PSTOP_RPC_SERVER StopRpcServer
Definition: svc.h:115
PSTART_RPC_SERVER StartRpcServer
Definition: svc.h:114
PNET_BIOS_CLOSE NetBiosClose
Definition: svc.h:118
PSID AliasSystemOpsSid
Definition: svc.h:109
PSID AliasBackupOpsSid
Definition: svc.h:111
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
unsigned char UCHAR
Definition: xmlstorage.h:181