开发者

Query all RDP sessions using .net

开发者 https://www.devze.com 2023-01-17 03:28 出处:网络
I am a lot of difficulty finding a way to query all RDP sessions using .net.Anyone know of a wa开发者_StackOverflowy to return this data without having to parse the results of a qwinsta.exe call?

I am a lot of difficulty finding a way to query all RDP sessions using .net. Anyone know of a wa开发者_StackOverflowy to return this data without having to parse the results of a qwinsta.exe call?

Currently i am using the qwinsta method, but this is returning some very unexpected results when querying different os installations (2003/2008/2008r2 etc.).


You can do this using the various WTS* functions (WTSEnumerateSessions and friends), or using the Cassia library, which provides a wrapper for those unmanaged API calls.

0

精彩评论

暂无评论...
验证码 换一张
取 消