﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3528	Set Affinity to more than 32 Cores	contact@…		"It seems not possible to set more than 32 cores to Cpu Affinity.



Exemple of working code:

{{{
#include <WinAPI.au3>
#include <Constants.au3>
 
 
$begin = TimerInit()
 
While 1
        If ProcessExists(""notepad.exe"") Then
            $process= ProcessList(""notepad.exe"")
 
            $sPID = $process[1][1]
           
            $hProc = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, False, $sPID)
            $aRet = _WinAPI_GetProcessAffinityMask($hProc)
            _WinAPI_SetProcessAffinityMask($hProc,0xFFFFFFFF)
            _WinAPI_CloseHandle($hProc)
EndIf
 
         Sleep(3000)
WEnd
}}}



So this is working:

{{{ 
_WinAPI_SetProcessAffinityMask($hProc,0xFFFFFFFF)
}}}

But this is not working!

{{{
_WinAPI_SetProcessAffinityMask($hProc,0x00FFFFFFFFFFFFFC)
}}}

Now, Cpu are not limited to 32 Cores. Mine is 56 threads.

_WinAPI_SetProcessAffinityMask must be updated to work with int64.


"	Bug	closed		AutoIt	3.3.14.0	None	No Bug		
