Subj : Re: getprocessaffinitymask To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Wed Oct 01 2003 11:51 am Jeff Kish wrote: >make a comment here? This code keeps getting executed: MessageBox( >"Exit Error", "OpenProcessToken() failed", MB_OK); > >is PROCESS_ALL_ACCESS the problem or something else? Did you try it with TOKEN_ALL_ACCESS ? > if (!OpenProcessToken(GetCurrentProcess(), > PROCESS_ALL_ACCESS, &hToken)) > { > MessageBox( "Exit Error", "OpenProcessToken() failed", MB_OK); > return; > } .