WinInfo Daily News   |   Windows IT Pro
in
Microsoft Technet

IT Pro Tips


Developing for Windows Server 2008 Terminal Services (Level 300)

By Richard Lane 

Terminal Services is the technology behind Remote Desktop and I use it all the time, but this webcast by Bernard Tritsch opened my eyes to what is possible when you take advantage of the Terminal Services API. It turns a popular feature of Windows into a scriptable, programmable component that enables both easy administration and capable custom applications. Tritsch also explains what’s new for Terminal Services in Windows Server 2008. It strikes me that the webcast would be useful both for IT Professionals and for developers, since it covers a variety of coding techniques including scripts, native C code, and programming with the .NET Framework. Although it is rated level 300, it is not too demanding, and anyone with a little knowledge of how to program for Windows will find it easy to follow. The webcast can be streamed online or downloaded, and lasts around 75 minutes.

Developing for Windows Server 2008 Terminal Services

It was clear immediately that the presenter knows the subject backwards. He is an MVP, consultant, and the author of a book on Terminal Services for Microsoft Press.

I could see this would be a comprehensive webcast, covering scripting through WMI, server and client programming, and a thing called Virtual Channels that I admit I knew little about.

 

Tritsch has a great slide showing the architecture of Terminal Services, which he showed at several points during the webcast. You can create client applications, server applications, or – you guessed – applications with both client and server components.

TIP: Did you know that Terminal Services is used not only for remote desktop, but also in fast user switching, Vista’s meeting space, and XP Media Center Edition?

 

Tritsch gave a lightning tour of the WMI (Windows Management Instrumentation) provider for Terminal Services. I learned how IT professionals can use this to control and configure Terminal Services with scripts, and how it can also be called from applications.

 

I saw WMI examples in Visual Basic Script, PowerShell, and C#. I couldn’t help noticing that the PowerShell example was the most concise.

 

Tritsch went on to explain the C API for server-side coding. Apparently it is a C API because the DLL, WTSAPI32, has been around since NT 4.0. He memorably described the coding approach as “Sandwich” style. Seasoned API coders will know exactly what he means.

Many developers today prefer to use the .NET Framework. Tritsch showed in detail how to create a wrapper class for .NET using platform invoke.

Tritsch moved on to client-side programming, and gave one of the most compelling examples in the webcast: a custom application which embeds a remote desktop through the Terminal Services ActiveX control.

TIP: Beware if you have existing web applications which depend on the Remote Desktop OCX control. This will not be supported in Windows Server 2008, which could break some web pages.

This little message box is more interesting when you realize it is created by a custom application using a key feature of Terminal Services – virtual channels. I did not realize before that this is how things like printer and sound redirection work in Remote Desktop. Apparently Windows Server 2008 extends this by providing dynamic virtual channels, addressing limitations in previous implementations. This is exciting for developers, as it lets custom Terminal Services clients communicate with server components behind the scenes.

I recommend this webcast for anyone working with Terminal Services. Developers will learn the scope of the Terminal Services APIs, while IT Professionals will learn how a little coding or scripting can tailor these services to fit a wide variety of requirements.

TechNet Webcast: Developing for Windows Server 2008 Terminal Services.

Comments

 

Pages tagged "services" said:

Pingback from  Pages tagged "services"

January 8, 2008 1:27 AM
Acceptable Use Policy

SPONSORED LINKS FEATURED LINKS

Calculate your savings nowSee how SAN is 57% cheaper than DAS over three years Free CDs Offer Fundamental Content for IT ProsAre you up to speed on the latest technologies and solutions? Don't miss out on your chance to get up to speed quickly on fundamental, in-depth information on some of the hottest topics in our library of content. Let Your Users Reset Their Own Passwords: Free Download Try a 30 day free trial of Desktop Authority Password Self-Service – it provides an easy-to-use, robust system for allowing users to reset their own forgotten passwords or locked accounts. Exchange Server 2010: Deploying Unified Communications - Virtual conferenceDecember 1, 2009 - Free Registration. Build your Unified Communications future on a strong Exchange Server 2010 foundation. Get Windows IT Pro & Mark Minasi’s Favorite Power Tools GuideOrder Windows IT Pro now and get "More of Mark Minasi's Favorite Power Tools"--a in-depth guide to the most useful Windows commands --FREE with your paid order! Subscribe today, and save 58% off the cover price! Migration, Virtualization, Availability, and Desktop ManagementRealize the importance of a workload optimization strategy...it can affect your bottom line! Deep Dive into VMware vSphere, eLearning SeriesJoin John Savill to explore the major functionality capabilities of the vSphere virtualization platform, including identification of the changes from ESX 3.5.
Windows IT Pro |  Subscribe |  Register |  FAQ for Windows |  Media Kit |  WinInfo News |  Europe Edition |  About Us |  Contact Us/Customer Service |  Affiliates/Licensing
SQL Server Magazine |  Office & SharePoint Pro |  WinDevPro |  asp.netPRO |  IT Library |  Technology Resource Directory |  ITTV |  IT Job Hound

© 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing