Piotr Caban : kernel32: Added GetLogicalProcessorInformation implementation .
Alexandre Julliard
julliard at winehq.org
Tue Sep 4 12:38:38 CDT 2012
Module: wine
Branch: master
Commit: c6ac0d0fcc57b4b955289826e2effb759f74e673
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c6ac0d0fcc57b4b955289826e2effb759f74e673
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Sep 4 13:39:52 2012 +0200
kernel32: Added GetLogicalProcessorInformation implementation.
---
dlls/kernel32/process.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 1edf9ea..1b10f9e 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -3717,9 +3717,29 @@ HANDLE WINAPI GetCurrentProcess(void)
*/
BOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer, PDWORD pBufLen)
{
- FIXME("(%p,%p): stub\n", buffer, pBufLen);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ NTSTATUS status;
+
+ TRACE("(%p,%p)\n", buffer, pBufLen);
+
+ if(!pBufLen)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ status = NtQuerySystemInformation( SystemLogicalProcessorInformation, buffer, *pBufLen, pBufLen);
+
+ if (status == STATUS_INFO_LENGTH_MISMATCH)
+ {
+ SetLastError( ERROR_INSUFFICIENT_BUFFER );
+ return FALSE;
+ }
+ if (status != STATUS_SUCCESS)
+ {
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return FALSE;
+ }
+ return TRUE;
}
/***********************************************************************
More information about the wine-cvs
mailing list