c++ getProcess.GetCurrentProcess().SessionId [英] c++ get Process.GetCurrentProcess().SessionId
本文介绍了c++ getProcess.GetCurrentProcess().SessionId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 c# 中,我们可以通过在 Windows 中使用此方法获取当前用户进程 ID Process.GetCurrentProcess().SessionId;
In c# we can get Current user process id by using this method in Windows Process.GetCurrentProcess().SessionId;
我们如何在 C++ 中做到这一点.
how can we do this in c++.
推荐答案
致电 GetCurrentProcessID 获取当前进程ID,然后调用ProcessIDToSessionID 将该进程 ID 转换为会话 ID.
Call GetCurrentProcessID to get the current process ID, and then call ProcessIDToSessionID to convert that process ID to a session ID.
这篇关于c++ getProcess.GetCurrentProcess().SessionId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文