Subj : Re: getprocessaffinitymask To : borland.public.cpp.borlandcpp From : Jeff Kish Date : Wed Oct 01 2003 06:10 pm On Wed, 01 Oct 2003 13:37:28 -0700, Bob Gonder wrote: >Jeff Kish wrote: > >>>> if (!OpenProcessToken(GetCurrentProcess(), >>>> PROCESS_ALL_ACCESS, &hToken)) >>>> { >> >>which means that this code is returning a zero: >>DWORD dwProcessAM; >>DWORD dwSystemAM; >>BOOL BResult = GetProcessAffinityMask(hToken, // handle to the >>process of interest > >"Handle to the process" is not a "Token". >Use the Process Handle just as you did before: GetCurrentProcess(), > Thanks Bob. You've made it quite easy. I believe the DWORD is a bit mask for processors.. is that correct? If so, any easy way to get/set the bits? Maybe that is a language question! Thanks again Jeff Kish .