Commit in reactos/lib/kernel32/misc on MAIN
stubs.c+1-151.85 -> 1.86
sysinfo.c+36-11.13 -> 1.14
+37-16
2 modified files
implemented GetSystemRegistryQuota()

reactos/lib/kernel32/misc
stubs.c 1.85 -> 1.86
diff -u -r1.85 -r1.86
--- stubs.c	21 Sep 2004 21:53:45 -0000	1.85
+++ stubs.c	21 Sep 2004 22:08:18 -0000	1.86
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.85 2004/09/21 21:53:45 weiden Exp $
+/* $Id: stubs.c,v 1.86 2004/09/21 22:08:18 weiden Exp $
  *
  * KERNEL32.DLL stubs (unimplemented functions)
  * Remove from this file, if you implement them.
@@ -819,20 +819,6 @@
  */
 BOOL
 STDCALL
-GetSystemRegistryQuota(
-    PDWORD pdwQuotaAllowed,
-    PDWORD pdwQuotaUsed
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
 GetThreadIOPendingFlag(
     HANDLE hThread,
     PBOOL lpIOIsPending

reactos/lib/kernel32/misc
sysinfo.c 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- sysinfo.c	13 Jun 2004 20:04:56 -0000	1.13
+++ sysinfo.c	21 Sep 2004 22:08:18 -0000	1.14
@@ -1,4 +1,4 @@
-/* $Id: sysinfo.c,v 1.13 2004/06/13 20:04:56 navaraf Exp $
+/* $Id: sysinfo.c,v 1.14 2004/09/21 22:08:18 weiden Exp $
  *
  * reactos/lib/kernel32/misc/sysinfo.c
  *
@@ -163,4 +163,39 @@
   return((BOOL)SharedUserData->ProcessorFeatures[ProcessorFeature]);
 }
 
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+GetSystemRegistryQuota(PDWORD pdwQuotaAllowed,
+                       PDWORD pdwQuotaUsed)
+{
+    SYSTEM_REGISTRY_QUOTA_INFORMATION srqi;
+    ULONG BytesWritten;
+    NTSTATUS Status;
+
+    Status = NtQuerySystemInformation(SystemRegistryQuotaInformation,
+                                      &srqi,
+                                      sizeof(srqi),
+                                      &BytesWritten);
+    if(NT_SUCCESS(Status))
+    {
+      if(pdwQuotaAllowed != NULL)
+      {
+        *pdwQuotaAllowed = srqi.RegistryQuotaAllowed;
+      }
+      if(pdwQuotaUsed != NULL)
+      {
+        *pdwQuotaUsed = srqi.RegistryQuotaUsed;
+      }
+
+      return TRUE;
+    }
+
+    SetLastErrorByStatus(Status);
+    return FALSE;
+}
+
 /* EOF */
CVSspam 0.2.8