From: meil2000 on
Hi, can anyone tell me how to use Wtsapi32.dll to get the count of
active terminal connections running on a Terminal Server? I tried
WTSEnumerateSessions and WTSQuerySessionInformation. They seem to only
give information about one terminal session.

Thanks,

Lin Mei

From: Drew Hammond [MS] on
Hi Lin,

I don't believe you can do this with WTS APIs, but you can query active
sessions through WMI:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_perfformatteddata_termservice_terminalservices.asp

Thanks,
Drew

--
Drew Hammond
Terminal Services Developer in Test
TS team blog: http://blogs.msdn.com/ts

This posting is provided "AS IS" with no warranties, and confers no rights.
<meil2000(a)yahoo.com> wrote in message
news:1156279006.150803.102930(a)b28g2000cwb.googlegroups.com...
> Hi, can anyone tell me how to use Wtsapi32.dll to get the count of
> active terminal connections running on a Terminal Server? I tried
> WTSEnumerateSessions and WTSQuerySessionInformation. They seem to only
> give information about one terminal session.
>
> Thanks,
>
> Lin Mei
>

From: meil2000 on
Hi Drew,

I tried with that class and it worked on Windows 2003 and XP. Do you
know how to retrieve the same info from Windows 2000?

Thank you for help!

Lin

Drew Hammond [MS] wrote:
> Hi Lin,
>
> I don't believe you can do this with WTS APIs, but you can query active
> sessions through WMI:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_perfformatteddata_termservice_terminalservices.asp
>
> Thanks,
> Drew
>
> --
> Drew Hammond
> Terminal Services Developer in Test
> TS team blog: http://blogs.msdn.com/ts
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> <meil2000(a)yahoo.com> wrote in message
> news:1156279006.150803.102930(a)b28g2000cwb.googlegroups.com...
> > Hi, can anyone tell me how to use Wtsapi32.dll to get the count of
> > active terminal connections running on a Terminal Server? I tried
> > WTSEnumerateSessions and WTSQuerySessionInformation. They seem to only
> > give information about one terminal session.
> >
> > Thanks,
> >
> > Lin Mei
> >