implemented GetProcessHandleCount()

svn path=/trunk/; revision=10964
This commit is contained in:
Thomas Bluemel 2004-09-21 21:53:45 +00:00
parent 63b36d9681
commit 1f2ec88e90
2 changed files with 29 additions and 16 deletions

View file

@ -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.
@ -814,20 +814,6 @@ GetNumaProcessorNode(
return 0;
}
/*
* @unimplemented
*/
BOOL
STDCALL
GetProcessHandleCount(
HANDLE hProcess,
PDWORD pdwHandleCount
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/

View file

@ -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 @@ SetProcessPriorityBoost(HANDLE hProcess,
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 */