To open a handle to another local process and obtain full access rights, you must enable the SeDebugPrivilege privilege.
VS2010 has this privilege, but the explore doesn't. Since your program is a child process, it will inherit privilege from parents.
For details, check this MSDN doc.