From c7ed817b9c0b4edf7969ec05f1f3e081a04155d9 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Wed, 21 Oct 2015 06:23:22 +0800
Subject: ntdll: Add fake data implementation for ProcessQuotaLimits class.

---
 dlls/ntdll/process.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 37c08f1..088834e 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -134,7 +134,6 @@ NTSTATUS WINAPI SYSCALL(NtQueryInformationProcess)(
 
     switch (ProcessInformationClass) 
     {
-    UNIMPLEMENTED_INFO_CLASS(ProcessQuotaLimits);
     UNIMPLEMENTED_INFO_CLASS(ProcessBasePriority);
     UNIMPLEMENTED_INFO_CLASS(ProcessRaisePriority);
     UNIMPLEMENTED_INFO_CLASS(ProcessExceptionPort);
@@ -199,6 +198,36 @@ NTSTATUS WINAPI SYSCALL(NtQueryInformationProcess)(
             }
         }
         break;
+    case ProcessQuotaLimits:
+        {
+            QUOTA_LIMITS pqli;
+
+            if (ProcessInformationLength >= sizeof(QUOTA_LIMITS))
+            {
+                if (!ProcessInformation)
+                    ret = STATUS_ACCESS_VIOLATION;
+                else if (!ProcessHandle)
+                    ret = STATUS_INVALID_HANDLE;
+                else
+                {
+                    /* FIXME : real data */
+                    memset(&pqli, 0, sizeof(QUOTA_LIMITS));
+
+                    memcpy(ProcessInformation, &pqli, sizeof(QUOTA_LIMITS));
+
+                    len = sizeof(QUOTA_LIMITS);
+                }
+
+                if (ProcessInformationLength > sizeof(QUOTA_LIMITS))
+                    ret = STATUS_INFO_LENGTH_MISMATCH;
+            }
+            else
+            {
+                len = sizeof(QUOTA_LIMITS);
+                ret = STATUS_INFO_LENGTH_MISMATCH;
+            }
+        }
+        break;
     case ProcessIoCounters:
         {
             IO_COUNTERS pii;
-- 
2.6.1

