mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 00:31:27 +00:00
Add GetLogicalProcessorInformation() and a stub for ReOpenFile() by Alwyn Tan's request.
svn path=/trunk/; revision=42440
This commit is contained in:
parent
78f8e0a7c2
commit
2e74dd3e76
3 changed files with 38 additions and 9 deletions
|
@ -400,6 +400,7 @@
|
|||
@ stdcall GetLogicalDriveStringsA(long ptr)
|
||||
@ stdcall GetLogicalDriveStringsW(long ptr)
|
||||
@ stdcall GetLogicalDrives()
|
||||
@ stdcall GetLogicalProcessorInformation(ptr ptr)
|
||||
@ stdcall GetLongPathNameA (str long long)
|
||||
@ stdcall GetLongPathNameW (wstr long long)
|
||||
@ stdcall GetMailslotInfo(long ptr ptr ptr ptr)
|
||||
|
@ -710,6 +711,7 @@
|
|||
@ stdcall QueueUserAPC(ptr long long)
|
||||
@ stdcall QueueUserWorkItem(ptr ptr long)
|
||||
@ stdcall RaiseException(long long long ptr)
|
||||
@ stub ReOpenFile ;@ stdcall ReOpenFile(ptr long long long)
|
||||
@ stdcall ReadConsoleA(long ptr long ptr ptr)
|
||||
@ stdcall ReadConsoleInputA(long ptr long ptr)
|
||||
@ stdcall ReadConsoleInputExA(long ptr long ptr long)
|
||||
|
|
|
@ -992,15 +992,6 @@ GetProcessWorkingSetSizeEx(IN HANDLE hProcess,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
|
||||
IN OUT PDWORD ReturnLength)
|
||||
{
|
||||
STUB;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
GetNumaAvailableMemoryNode(IN UCHAR Node,
|
||||
|
|
|
@ -232,3 +232,39 @@ GetNativeSystemInfo(
|
|||
// GetNativeSystemInfo should return PROCESSOR_ARCHITECTURE_AMD64
|
||||
GetSystemInfo(lpSystemInfo);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
|
||||
IN OUT PDWORD ReturnLength)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
if (!ReturnLength)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Status = NtQuerySystemInformation(SystemLogicalProcessorInformation,
|
||||
Buffer,
|
||||
*ReturnLength,
|
||||
ReturnLength);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/*
|
||||
* When NtQuerySystemInformation says STATUS_INFO_LENGTH_MISMATCH,
|
||||
* return ERROR_INSUFFICIENT_BUFFER instead of ERROR_BAD_LENGTH.
|
||||
*/
|
||||
SetLastErrorByStatus(Status == STATUS_INFO_LENGTH_MISMATCH
|
||||
? STATUS_BUFFER_TOO_SMALL
|
||||
: Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue