求问关于GetCurrentProcess()函数问题?

1:GetCurrentProcess 获取当前进程的一个伪句柄 ,它和进程句柄之间有什么关系??这个伪句柄 是当前的程序还是别的??2:OpenProcessToken这个函数的第一个参数,如果不是用GetCurrentProcess获取的伪句柄可以不??

开满天机
浏览 320回答 2
2回答

沧海一幻觉

The return value is a pseudo handle to the current process.A pseudo handle is a special constant that is interpreted as the current process handle. The calling process can use this handle to specify its own process whenever a process handle is required. Pseudo handles are not inherited by child processes.  BOOL OpenProcessToken(  __in HANDLE ProcessHandle, //要修改访问权限的进程句柄  __in DWORD DesiredAccess, //指定你要进行的操作类型  __out PHANDLE TokenHandle //返回的访问令牌指针  );
打开App,查看更多内容
随时随地看视频慕课网APP