WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSUserName, szName, ret);
当前用户为本地用户时,该API获取的是本地用户名称;当前用户为域用户时,该API获取的是域用户名称。问题是在win8和win10下,当前用户为微软账户时,怎么获取不到微软账户名称呢?
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.