View Single Post
Old 9th December 2007, 12:33   #19
Senior Member
Join Date: Apr 2006
Posts: 289
Send a message via ICQ to CancerFace
WTSEnumerateSessions will give you an array of WTS_SESSION_INFO structures and each one contains a SessionId for a given active session. Use kichik's code for the WTSEnumerateSessions function but do not call the WTSFreeMemory function before you extract the info you need from the structures that reside in $0.
Then call the WTSLogoffSession with one of the extracted SessionIds in order to logoff that session ...
Hope this helps ...
CancerFace is offline   Reply With Quote