kernel32: Reimplement GetActiveProcessorGroupCount on top of GetLogicalProcessorInformationEx.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2021-05-24 02:10:41 -06:00 committed by Alexandre Julliard
parent 0cd033a07e
commit 59e9a8ecf3
1 changed files with 18 additions and 2 deletions

View File

@ -609,8 +609,24 @@ HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK
*/
WORD WINAPI GetActiveProcessorGroupCount(void)
{
FIXME("semi-stub, always returning 1\n");
return 1;
WORD groups;
DWORD size = 0;
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *info;
TRACE("()\n");
if (!GetLogicalProcessorInformationEx(RelationGroup, NULL, &size)) return 0;
if (!(info = HeapAlloc(GetProcessHeap(), 0, size))) return 0;
if (!GetLogicalProcessorInformationEx(RelationGroup, info, &size))
{
HeapFree(GetProcessHeap(), 0, info);
return 0;
}
groups = info->Group.ActiveGroupCount;
HeapFree(GetProcessHeap(), 0, info);
return groups;
}
/***********************************************************************