Opened 7 years ago

Closed 7 years ago

#3528 closed Bug (No Bug)

Set Affinity to more than 32 Cores

Reported by: contact@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


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)

So this is working:


But this is not working!


Now, Cpu are not limited to 32 Cores. Mine is 56 threads.

_WinAPI_SetProcessAffinityMask must be updated to work with int64.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by BrewManNH

What processor do you have that has more than 64 cores? Do you understand the difference between threads and cores, and what the affinity mask is setting? Your first line


will set the affinity mask to every core in a 64 core processor. Your second line will set the affinity mask for a 1000(?) core processor, so unless you're running NASA I'm skeptical you're getting the results you THINK you're getting.

comment:2 Changed 7 years ago by BrewManNH

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.