[WKSSVC] Implements NetrWorkstationStatisticsGet().
authorEricKohl <eric.kohl@reactos.org>
Wed, 11 Oct 2017 20:54:14 +0000 (22:54 +0200)
committerEricKohl <eric.kohl@reactos.org>
Wed, 11 Oct 2017 20:55:01 +0000 (22:55 +0200)
Should fix CORE-13867 and CORE-13868.

base/services/wkssvc/rpcserver.c

index 4de805c..422138e 100644 (file)
@@ -267,8 +267,28 @@ NetrWorkstationStatisticsGet(
     unsigned long Options,
     LPSTAT_WORKSTATION_0 *Buffer)
 {
-    UNIMPLEMENTED;
-    return 0;
+    PSTAT_WORKSTATION_0 pStatBuffer;
+
+    TRACE("NetrWorkstationStatisticsGet(%p %p %lu 0x%lx %p)\n",
+          ServerName, ServiceName, Level, Options, Buffer);
+
+    if (Level != 0)
+        return ERROR_INVALID_LEVEL;
+
+    if (Options != 0)
+        return ERROR_INVALID_PARAMETER;
+
+    pStatBuffer = midl_user_allocate(sizeof(STAT_WORKSTATION_0));
+    if (pStatBuffer == NULL)
+        return ERROR_NOT_ENOUGH_MEMORY;
+
+    ZeroMemory(pStatBuffer, sizeof(STAT_WORKSTATION_0));
+
+    // FIXME: Return the actual statistcs data!
+
+    *Buffer = pStatBuffer;
+
+    return NERR_Success;
 }