Microsoft KB Archive/299947

= HOW TO: Use Terminal Server APIs via Windows Scripting Host =

Article ID: 299947

Article Last Modified on 8/9/2004

-

APPLIES TO


 * Microsoft Windows NT Server 4.0, Terminal Server Edition
 * Microsoft Windows 2000 Server

-



This article was previously published under Q299947



SUMMARY
There is no interface for Windows Terminal Services APIs via the Windows Scripting Host or Active Server Pages (ASP). However, the existing APIs can be leveraged if they are implemented in a COM object (as documented in the Platform SDK). This article provides source code (Atlwts_source.exe) for a sample ATL COM object (Atlwts_2.dll) that implements the following Windows Terminal Services APIs:

WTSSendMessage

WTSQuerySessionInformation

WTSQueryUserConfig

WTSOpenServer

WTSEnumerateSessions

WTSFreeMemory

WTSCloseServer

WTSLogoffSession

This sample ATL COM object can be used from the Windows Scripting Host or from ASP, and a sample of each is included as well.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

Atlwts_source.exe

Release Date: Jul-18-2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The Atlwts_source.exe file contains the following files:

The sample code for the sample object (Atlwts_2.dll) has been tested on Windows 2000 with Terminal Services installed as well as Windows NT 4.0 Terminal Services with Service Pack 4.0 or later, and Microsoft Transaction Server.

Additional query words: atlwts_source

Keywords: kbdownload kbfile KB299947

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.