https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dcc5dd2a69db67d3d2bf9…
commit dcc5dd2a69db67d3d2bf9263d45c5cb531f0497a
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Thu Jun 18 15:03:01 2020 +0300
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Jun 27 14:54:22 2020 +0200
[SDK][SVCHOST] Move all global svchost declarations to public header.
Also update the includes.
It will allow to use those declarations globally where they are required (e. g. for
SvchostPushServiceGlobals functions in some services).
No functional changes.
---
base/services/svchost/svchost.h | 49 ++-----------------------------------
sdk/include/reactos/svc.h | 54 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 47 deletions(-)
diff --git a/base/services/svchost/svchost.h b/base/services/svchost/svchost.h
index 2b768110d0d..519394caff7 100644
--- a/base/services/svchost/svchost.h
+++ b/base/services/svchost/svchost.h
@@ -15,11 +15,9 @@
#include <rpc.h>
#include <ndk/rtlfuncs.h>
#include <ndk/kdtypes.h>
+#include <dpfilter.h>
-//
-// FIXME: Should go in public headers
-//
-#define DPFLTR_SVCHOST_ID 28
+#include <svc.h>
//
// This prints out a SVCHOST-specific debug print, with the PID/TID
@@ -35,49 +33,6 @@
#define DBG_ERR(fmt, ...) SvchostDbgPrint(1, fmt, __VA_ARGS__)
#define DBG_TRACE(fmt, ...) SvchostDbgPrint(4, fmt, __VA_ARGS__)
-//
-// This is the callback that a hosted service can register for stop notification
-// FIXME: GLOBAL HEADER
-//
-typedef VOID
- (CALLBACK *PSVCHOST_STOP_CALLBACK) (
- _In_ PVOID lpParameter,
- _In_ BOOLEAN TimerOrWaitFired
- );
-
-//
-// Hosted Services and SvcHost Use this Structure
-// FIXME: GLOBAL HEADER
-//
-typedef struct _SVCHOST_GLOBALS
-{
- PVOID NullSid;
- PVOID WorldSid;
- PVOID LocalSid;
- PVOID NetworkSid;
- PVOID LocalSystemSid;
- PVOID LocalServiceSid;
- PVOID NetworkServiceSid;
- PVOID BuiltinDomainSid;
- PVOID AuthenticatedUserSid;
- PVOID AnonymousLogonSid;
- PVOID AliasAdminsSid;
- PVOID AliasUsersSid;
- PVOID AliasGuestsSid;
- PVOID AliasPowerUsersSid;
- PVOID AliasAccountOpsSid;
- PVOID AliasSystemOpsSid;
- PVOID AliasPrintOpsSid;
- PVOID AliasBackupOpsSid;
- PVOID RpcpStartRpcServer;
- PVOID RpcpStopRpcServer;
- PVOID RpcpStopRpcServerEx;
- PVOID SvcNetBiosOpen;
- PVOID SvcNetBiosClose;
- PVOID SvcNetBiosReset;
- PVOID SvcRegisterStopCallback;
-} SVCHOST_GLOBALS, *PSVCHOST_GLOBALS;
-
//
// This is the callback for them to receive it
//
diff --git a/sdk/include/reactos/svc.h b/sdk/include/reactos/svc.h
new file mode 100644
index 00000000000..b028f1a0bf5
--- /dev/null
+++ b/sdk/include/reactos/svc.h
@@ -0,0 +1,54 @@
+/*
+ * PROJECT: ReactOS Service Host
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: sdk/include/reactos/svc.h
+ * PURPOSE: Global Header for Service Host
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+/* See
https://www.geoffchappell.com/studies/windows/win32/services/svchost/proces…
*/
+
+#ifndef __SVC_H
+#define __SVC_H
+
+//
+// This is the callback that a hosted service can register for stop notification
+//
+typedef VOID
+(CALLBACK *PSVCHOST_STOP_CALLBACK) (
+ _In_ PVOID lpParameter,
+ _In_ BOOLEAN TimerOrWaitFired
+ );
+
+//
+// Hosted Services and SvcHost Use this Structure
+//
+typedef struct _SVCHOST_GLOBALS
+{
+ PVOID NullSid;
+ PVOID WorldSid;
+ PVOID LocalSid;
+ PVOID NetworkSid;
+ PVOID LocalSystemSid;
+ PVOID LocalServiceSid;
+ PVOID NetworkServiceSid;
+ PVOID BuiltinDomainSid;
+ PVOID AuthenticatedUserSid;
+ PVOID AnonymousLogonSid;
+ PVOID AliasAdminsSid;
+ PVOID AliasUsersSid;
+ PVOID AliasGuestsSid;
+ PVOID AliasPowerUsersSid;
+ PVOID AliasAccountOpsSid;
+ PVOID AliasSystemOpsSid;
+ PVOID AliasPrintOpsSid;
+ PVOID AliasBackupOpsSid;
+ PVOID RpcpStartRpcServer;
+ PVOID RpcpStopRpcServer;
+ PVOID RpcpStopRpcServerEx;
+ PVOID SvcNetBiosOpen;
+ PVOID SvcNetBiosClose;
+ PVOID SvcNetBiosReset;
+ PVOID SvcRegisterStopCallback;
+} SVCHOST_GLOBALS, *PSVCHOST_GLOBALS;
+
+#endif /* __SVC_H */