WTSQuerySessionInformation() is failing on windows server 2008 R2

强颜欢笑 提交于 2019-12-24 19:25:43

问题


I have written win32 application. I'm using WTSQuerySessionInformation() function to query clientprotocoltype . it works fine but during log-off if i call this function, its getting failed with error code 2. this is happening only on windows server 2008R2 x64 VM machine. It works fine with rest OS during logoff.

I've not find any relevant solution to troubleshoot this issue.

Kindly help me...


回答1:


In my experience, it's quite common to see WTSQuerySessionInformation return errors when you're trying to fetch information for the session that is being logged off, most likely because the logoff process is continuing asynchronously while session change notifications are being processed. I wouldn't rely on calling WTSQuerySessionInformation for the session that is being logged off.



来源:https://stackoverflow.com/questions/19428951/wtsquerysessioninformation-is-failing-on-windows-server-2008-r2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!