win32ts.WTSEnumerateSessions

(dict,...) = WTSEnumerateSessions(Server, Version , Reserved )

Lists sessions on a server

Parameters

Server=WTS_CURRENT_SERVER_HANDLE : PyHANDLE

Handle to a terminal server

Version=1 : int

Version of request, currently 1 is only valid value

Reserved=0 : int

Reserved, use 0 if passed in

Return Value

Returns a sequence of dictionaries representing WTS_SESSION_INFO structs, containing {SessionId:int, WinStationName:str, State:int}