Subj : Re: getprocessaffinitymask To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Wed Oct 01 2003 02:37 pm 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(), .