环球科创网

getcurrentprocessid

更新时间:2022-09-22 05:18:22

导读 大家好,小勉来为大家解答以上的问题。getcurrentprocessid这个很多人还不知道,现在让我们一起来看看吧!1、伪句柄可以代替句柄被函数调用,

大家好,小勉来为大家解答以上的问题。getcurrentprocessid这个很多人还不知道,现在让我们一起来看看吧!

1、伪句柄可以代替句柄被函数调用,用句柄调用当然也行。

2、相当于是一个别名的概念,但伪句柄不需要去closehandle,因为它只是个别名,如果closehandle伪句柄,造成的结果可能是无法预料的。

3、虽然是伪句柄,也是当前的。

4、openprocesstoken不用获取的伪句柄,用进程真实句柄也可。

5、Len函数只接收两种:Len(string | varname)其他的都不行,varname可以是variant,也可以是用户自定义类型,但不能是数组!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 //返回的访问令牌指针  );。

本文到此分享完毕,希望对大家有所帮助。

免责声明:本文由用户上传,如有侵权请联系删除!