Atak_Snajpera
Atak_Snajpera

Reputation: 629

Looking for workaround for 32 cpu limitation using GetProcessAffinityMask in 32 bit process

I've just realized that GetProcessAffinityMask can't return values larger than 4'294'967'295 (1111 1111 1111 1111 1111 1111 1111 1111) in 32 bit applications, even on a 64 bit system.

This means that I'm unable to correctly detect system affinity mask on machines with more than 32 logical processors. Is there any hack to get other half of the affinity mask in this case?

Upvotes: 0

Views: 264

Answers (1)

David Heffernan
David Heffernan

Reputation: 613262

The supported way to do this is to use a 64 bit process.

If you are unable to covert your application to 64 bit then create and call a small helper process to do the work, and pass the information back to your 32 bit application.

Upvotes: 1

Related Questions