reactos/lib/kernel32/misc
diff -u -r1.84 -r1.85
--- stubs.c 21 Sep 2004 19:17:26 -0000 1.84
+++ stubs.c 21 Sep 2004 21:53:45 -0000 1.85
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.84 2004/09/21 19:17:26 weiden Exp $
+/* $Id: stubs.c,v 1.85 2004/09/21 21:53:45 weiden Exp $
*
* KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them.
@@ -819,20 +819,6 @@
*/
BOOL
STDCALL
-GetProcessHandleCount(
- HANDLE hProcess,
- PDWORD pdwHandleCount
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
GetSystemRegistryQuota(
PDWORD pdwQuotaAllowed,
PDWORD pdwQuotaUsed
reactos/lib/kernel32/process
diff -u -r1.66 -r1.67
--- proc.c 19 Sep 2004 14:36:47 -0000 1.66
+++ proc.c 21 Sep 2004 21:53:45 -0000 1.67
@@ -1,4 +1,4 @@
-/* $Id: proc.c,v 1.66 2004/09/19 14:36:47 weiden Exp $
+/* $Id: proc.c,v 1.67 2004/09/21 21:53:45 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -940,4 +940,31 @@
return TRUE;
}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+GetProcessHandleCount(HANDLE hProcess,
+ PDWORD pdwHandleCount)
+{
+ ULONG phc, BytesWritten;
+ NTSTATUS Status;
+
+ Status = NtQueryInformationProcess(hProcess,
+ ProcessHandleCount,
+ &phc,
+ sizeof(ULONG),
+ &BytesWritten);
+ if(NT_SUCCESS(Status))
+ {
+ *pdwHandleCount = ProcessHandleCount;
+ return TRUE;
+ }
+
+ SetLastErrorByStatus(Status);
+ return FALSE;
+}
+
/* EOF */