What did Ken say. But if you do not trust it to work, you can call SetThreadAffinityMask again and confirm that the return value matches the expected mask. (But then, of course, if you do not trust the function, then you cannot trust the second call ...)
Do not confuse the existence of GetProcessAffinityMask. This function does not exist to test the operation of SetProcessAffinityMask, but, for example, therefore, you can build a thread affinity, which is a subset of the affinity for the process.
Just look at the return value and make sure it is not 0, and you should be fine.
matli
source share