0
votes

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

1
Is your app native x64 or x86 running under WOW64? - Zach Saw
my app is x86 and not native x64; so by changing project configuration did this problem will get solved? - user243174
Yes. With x86 apps, you'd running on WOW64 under your 64-bit OS. In which case, you have access to only a max of 32 processors. - Zach Saw

1 Answers

3
votes

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