VC++ 2008, OpenProcess always returning error 5 (Access Denied)

前端 未结 3 1983
遥遥无期
遥遥无期 2021-01-14 07:50

Would anyone know why MSVC++ 2008 always returns error 5 on GetLastError() when I try to call OpenProcess with PROCESS_ALL_ACCESS as my desired access? PROCESS_VM_READ works

3条回答
  •  醉梦人生
    2021-01-14 08:38

    Another thing that might be causing this is new to Vista:

    Windows Vista introduces protected processes to enhance support for Digital Rights Management. The system restricts access to protected processes and the threads of protected processes.

    The following standard access rights are not allowed from a process to a protected process:

    DELETE READ_CONTROL WRITE_DAC WRITE_OWNER

提交回复
热议问题