函数原型:
BOOL
WINAPI
WTSQuerySessionInformationW(
IN HANDLE hServer,
IN DWORD SessionId,
IN WTS_INFO_CLASS WTSInfoClass,
__deref_out_bcount(*pBytesReturned) LPWSTR * ppBuffer,
__out DWORD * pBytesReturned
);
说明:
hServer: WTS_CURRENT_SERVER_HANDLE
SessionId:会话ID,可以从WTSEnumerateProcesses或者WTSEnumerateSessions 或WTSGetActiveConsoleSessionId
中得到,
WTSInfoClass:指定要查找的信息,该结构是一个枚举类型,可以看下面定义:
typedef
Windows API 23 篇 WTSQuerySessionInformation
最新推荐文章于 2023-08-23 21:52:13 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)