https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a5ccac599028abc3f4da2c9e41521118a8c7c6b

commit 0a5ccac599028abc3f4da2c9e41521118a8c7c6b
Author:     Eric Kohl <[email protected]>
AuthorDate: Sun Aug 5 15:04:01 2018 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Sun Aug 5 15:05:19 2018 +0200

    [SRVSVC] Set and retrieve service bits and rename unknown functions
    
    - Service bits are set by NetrServerSetServiceBits and can be retrieved by 
NetrServerGetInfo.
    - The real name of function 42 is NetrServerSetServiceBitsEx and the real 
name of function 47 is NetrDfsSetServerInfo.
---
 base/services/srvsvc/precomp.h     |  4 ++++
 base/services/srvsvc/rpcserver.c   | 35 +++++++++++++++++++++++++----------
 base/services/srvsvc/srvsvc.c      |  3 +++
 sdk/include/reactos/idl/srvsvc.idl | 18 ++++++++++++------
 4 files changed, 44 insertions(+), 16 deletions(-)

diff --git a/base/services/srvsvc/precomp.h b/base/services/srvsvc/precomp.h
index a0fbcbc4bd..6da24c6e0f 100644
--- a/base/services/srvsvc/precomp.h
+++ b/base/services/srvsvc/precomp.h
@@ -15,6 +15,10 @@
 
 #include <wine/debug.h>
 
+
+extern DWORD dwServiceBits;
+
+
 DWORD
 WINAPI
 RpcThreadRoutine(
diff --git a/base/services/srvsvc/rpcserver.c b/base/services/srvsvc/rpcserver.c
index d1d9f3dc3d..214bf0bfd6 100644
--- a/base/services/srvsvc/rpcserver.c
+++ b/base/services/srvsvc/rpcserver.c
@@ -394,7 +394,7 @@ NetrServerGetInfo(
 
             pServerInfo->ServerInfo101.sv101_version_major = 
VersionInfo.dwMajorVersion;
             pServerInfo->ServerInfo101.sv101_version_minor = 
VersionInfo.dwMinorVersion;
-            pServerInfo->ServerInfo101.sv101_type = SV_TYPE_NT;  /* FIXME */
+            pServerInfo->ServerInfo101.sv101_type = dwServiceBits | SV_TYPE_NT;
             pServerInfo->ServerInfo101.sv101_comment = NULL; /* FIXME */
 
             *InfoStruct = pServerInfo;
@@ -413,7 +413,7 @@ NetrServerGetInfo(
 
             pServerInfo->ServerInfo102.sv102_version_major = 
VersionInfo.dwMajorVersion;
             pServerInfo->ServerInfo102.sv102_version_minor = 
VersionInfo.dwMinorVersion;
-            pServerInfo->ServerInfo102.sv102_type = SV_TYPE_NT;
+            pServerInfo->ServerInfo102.sv102_type = dwServiceBits | SV_TYPE_NT;
             pServerInfo->ServerInfo102.sv102_comment = NULL; /* FIXME */
 
             pServerInfo->ServerInfo102.sv102_users = 0; /* FIXME */
@@ -619,8 +619,15 @@ NetrServerSetServiceBits(
     DWORD ServiceBits,
     DWORD UpdateImmediately)
 {
-    UNIMPLEMENTED;
-    return ERROR_CALL_NOT_IMPLEMENTED;
+    FIXME("NetrServerSetServiceBits(%p %s %lx %lu)\n",
+          ServerName, debugstr_w(Transport), ServiceBits, UpdateImmediately);
+
+    /* FIXME: Support Transport */
+    /* FIXME: Support UpdateImmdiately */
+
+    dwServiceBits = ServiceBits;
+
+    return NERR_Success;
 }
 
 
@@ -798,12 +805,19 @@ NetrServerTransportAddEx(
 }
 
 
-/* Function 42 */
-void
+/* Function 42 - Not used on wire */
+NET_API_STATUS
 __stdcall
-Opnum42NotUsedOnWire(void)
+NetrServerSetServiceBitsEx(
+    SRVSVC_HANDLE ServerName,
+    WCHAR *EmulatedServer,
+    WCHAR *Transport,
+    DWORD ServiceBitsOfInterest,
+    DWORD ServiceBits,
+    DWORD UpdateImmediately)
 {
     UNIMPLEMENTED;
+    return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 
@@ -863,12 +877,13 @@ NetrDfsSetLocalVolumeState(
 }
 
 
-/* Function 47 */
-void
+/* Function 47 - Not used on wire */
+NET_API_STATUS
 __stdcall
-Opnum47NotUsedOnWire(void)
+NetrDfsSetServerInfo(void)
 {
     UNIMPLEMENTED;
+    return ERROR_CALL_NOT_IMPLEMENTED;
 }
 
 
diff --git a/base/services/srvsvc/srvsvc.c b/base/services/srvsvc/srvsvc.c
index 5182987d50..1c3710547b 100644
--- a/base/services/srvsvc/srvsvc.c
+++ b/base/services/srvsvc/srvsvc.c
@@ -37,6 +37,9 @@ static WCHAR ServiceName[] = L"Lanmanserver";
 static SERVICE_STATUS_HANDLE ServiceStatusHandle;
 static SERVICE_STATUS ServiceStatus;
 
+DWORD dwServiceBits = 0;
+
+
 /* FUNCTIONS *****************************************************************/
 
 static VOID
diff --git a/sdk/include/reactos/idl/srvsvc.idl 
b/sdk/include/reactos/idl/srvsvc.idl
index eea19b18ea..4a80140f44 100644
--- a/sdk/include/reactos/idl/srvsvc.idl
+++ b/sdk/include/reactos/idl/srvsvc.idl
@@ -1388,10 +1388,16 @@ interface srvsvc
         [in] DWORD Level,
         [in, switch_is(Level)] LPTRANSPORT_INFO Buffer);
 
-    // This method not used on the wire
-    void
+    /* Function 42 - Not used on wire */
+    NET_API_STATUS
     __stdcall
-    Opnum42NotUsedOnWire(void);
+    NetrServerSetServiceBitsEx(
+        [in, string, unique] SRVSVC_HANDLE ServerName,
+        [in, string, unique] WCHAR *EmulatedServer,
+        [in, string, unique] WCHAR *Transport,
+        [in] DWORD ServiceBitsOfInterest,
+        [in] DWORD ServiceBits,
+        [in] DWORD UpdateImmediately);
 
     NET_API_STATUS
     __stdcall
@@ -1425,10 +1431,10 @@ interface srvsvc
         [in, string] WCHAR *Prefix,
         [in] unsigned long State);
 
-    // This method not used on the wire
-    void
+    /* Function 47 - Not used on wire */
+    NET_API_STATUS
     __stdcall
-    Opnum47NotUsedOnWire(void);
+    NetrDfsSetServerInfo(void);
 
     NET_API_STATUS
     __stdcall

Reply via email to