> Just wondering if anyone knows what the return values are for
> GetProcessAffinity using a quad core CPU, using code below works fine
[quoted text clipped - 15 lines]
> I don't have a quad yet but would like to get a head start on updating
> one of my programs.
It simply returns a bit-mask of the processors:
Processor 1 = 0x1 = 0001b
Processor 2 = 0x2 = 0010b
Processor 3 = 0x4 = 0100b
Processor 4 = 0x8 = 1000b
Processor n = (2 ^ n)
So for four processors 1 through 4 you would use an affinity mask of 0x1 + 0x2 + 0x4 + 0x8 = 0xF.
Here's an old thread with some more information and examples on the call:
http://groups.google.co.uk/group/microsoft.public.vb.winapi/msg/83e88190612c4212
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: Http://EDais.mvps.org/
Ed - 28 Jan 2007 00:47 GMT
>Processor 1 = 0x1 = 0001b
>Processor 2 = 0x2 = 0010b
>Processor 3 = 0x4 = 0100b
>Processor 4 = 0x8 = 1000b
OK, I think it sunk in now! ;)
Cheers, (holding up coffee cup)
Thanks again,
Ed