Commit ebcc9c52 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Michael Stefaniuc

kernel32: Forward GetLogicalProcessorInformationEx() to ntdll.

Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org> (cherry picked from commit ae1fe69e) Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org>
parent bd3e9421
......@@ -3836,11 +3836,26 @@ BOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION
/***********************************************************************
* GetLogicalProcessorInformationEx (KERNEL32.@)
*/
BOOL WINAPI GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX buffer, PDWORD pBufLen)
BOOL WINAPI GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP relationship, SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *buffer, DWORD *len)
{
FIXME("(%u,%p,%p): stub\n", relationship, buffer, pBufLen);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
NTSTATUS status;
TRACE("(%u,%p,%p)\n", relationship, buffer, len);
if (!len)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
status = NtQuerySystemInformationEx( SystemLogicalProcessorInformationEx, &relationship, sizeof(relationship),
buffer, *len, len );
if (status != STATUS_SUCCESS)
{
SetLastError( RtlNtStatusToDosError( status ) );
return FALSE;
}
return TRUE;
}
/***********************************************************************
......
......@@ -2982,9 +2982,15 @@ static void test_GetLogicalProcessorInformationEx(void)
}
ret = pGetLogicalProcessorInformationEx(RelationAll, NULL, NULL);
ok(!ret, "got %d, error %d\n", ret, GetLastError());
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %d\n", ret, GetLastError());
len = 0;
ret = pGetLogicalProcessorInformationEx(RelationProcessorCore, NULL, &len);
todo_wine {
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %d\n", ret, GetLastError());
ok(len > 0, "got %u\n", len);
}
len = 0;
ret = pGetLogicalProcessorInformationEx(RelationAll, NULL, &len);
todo_wine {
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, error %d\n", ret, GetLastError());
......
......@@ -687,6 +687,13 @@ static void test_query_logicalprocex(void)
return;
len = 0;
relationship = RelationProcessorCore;
status = pNtQuerySystemInformationEx(SystemLogicalProcessorInformationEx, &relationship, sizeof(relationship), NULL, 0, &len);
todo_wine {
ok(status == STATUS_INFO_LENGTH_MISMATCH, "got 0x%08x\n", status);
ok(len > 0, "got %u\n", len);
}
len = 0;
relationship = RelationAll;
status = pNtQuerySystemInformationEx(SystemLogicalProcessorInformationEx, &relationship, sizeof(relationship), NULL, 0, &len);
todo_wine {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment