user243174
user243174

Reputation:

GetProcessAffinityMask gives wrong value

I am using WIN API method GetProcessAffinityMask to retrieve process and the system affinity mask for the system. The method executes without any error but the lpProcessAffinityMask and lpSystemAffinityMask have value -1 which is wrong.

My Machine is AMD Opteron 6174 4 Physical, and 12 core each so in total system have 48 cores. My OS is Windows Web Server 2008 R2 64 bit

Upvotes: 0

Views: 1388

Answers (1)

Zach Saw
Zach Saw

Reputation: 4378

Seeing that no information was given on the app that the OP was running, I'm making an educated guess that the app is running under WOW64 - hence limited to 32 processors (lpProcessAffinityMask is a pointer to DWORD). Therefore, the OP is seeing a result of 0xFFFFFFFF. See: http://msdn.microsoft.com/en-us/library/aa384228%28v=VS.85%29.aspx

Upvotes: 3

Related Questions