LED Display SideShow

LED Display SideShow

This article was submitted .

This is sample code that implements a Windows SideShow device. It allows for sending live information from Windows Media Player, weather information, track'n'trace for postal packages and much more to an auxiliary display hardware.

Some time ago I got a LED display in my hands and decided to play a bit with it by programming it with the coin-up game Frogger.
The display still sits in my office but now it displays various statistics from customer sites. Every night it connects to the customers' servers and collects key performance numbers, which then scrolls by all day. It's actually a great Monday morning motivation gadget. You know: Monday morning - when you're still half asleep and think to yourself "Now why did I get up to go to work today?! It's not even noon yet". My eyes accidentally catches the display information and I recall that the hard work definitely helps thousands of people get on with their lives.

After installing Windows Vista on my workstation I figured I'd try to convert the bulky LED display into a real Vista SideShow device. A SideShow Display Device embedded in the bag Don't confuse SideShow with the Vista Sidebar although the two technologies are linked as I will mention later. Vista SideShow gadgets is a new technology Microsoft added to Windows Vista which allows auxiliary devices (usually displays, but any device such as an MP3 player will do) to receive information from the PC. The most appealing feature could be the ability to sync PC information (say your email or calendar) with an auxiliary device incorporated in the lid of your laptop computer, and access this information even when your laptop has been powered down.

The LED display in my office isn't exactly mobile. Still, the ability to hook it up with the Windows Media Player to display what songs I'm currently playing would be pretty cool.
Obviously, the current task it performs, displaying statistics, can be entirely replaced by attaching it to a RSS Feed gadget. Collecting the statistics in an RSS feed would give it greater exposure, since anyone on the network can subscribe to it in the Internet Explorer browser as well. Once you have developed your own SideShow device, you can attach numerous gadgets to it that collect and present a wealth of information - including a RSS Feed gadget, which is included in the standard Vista installation.

About the code

To create a SideShow device you will need to write a Windows Device Driver. It's not as bad as it sounds, because you'll be using the new user-mode Device Driver Framework (UMDF) which, most importantly, runs in user-mode rather than at kernel level. Design-wise UMDF is using an architecture identical to COM even though it is not powered by the OLE subsystem.

The code for my LED display is basically a rewrite of the WDK sample code (there is only one sample offered) provided with the Windows Vista Device Driver kit.
The driver must implement the following C++ interfaces:

The point of all this is probably that the UMDF framework also allows you to easily communicate with a USB device and extending the basic SideShow skeleton code above to do just that will probably be the preferred option when communicating with the device hardware. It's just that my LED display gets updated using a simple TCP/IP stream so I'm getting by with pretty much what the default WDK sample explains.

Possible gadgets in Vista The driver gets fed with content from the PC, but it still needs to persist a few settings across sessions. The SideShow framework exposes a way to persist properties. The PC then delivers content in Simple Content Format (SCF), a HTML-like markup language, and the driver can then process and render the content in a way that suits the connected hardware.

To push content to the device you must link the device to one or more SideShow gadgets on the PC. You can use one of the preinstalled SideShow gadgets in Vista or download new ones from the Microsoft Gallery website. SideShow even integrates with some of the Vista Sidebar gadgets. When you develop a new Sidebar gadget you can pinpoint specific information that should also be exposed to the SideShow devices. Nice thinking Microsoft.

There aren't really a lot of SideShow gadgets available at the moment. SideShow probably isn't a huge success right now because there hardly is any hardware that supports it.
Still I think a lot of great SideShow gadgets are to be written in the future. For instance, the postal services here in my country has published a track'n'trace gadget, allowing you to follow the status of parcel delivery.

Source Code Dependencies

Windows Vista
Microsoft Visual C++ 6.0
Microsoft ATL Library
Microsoft Windows DDK

Installation Guide

  • To install the component, go to the Control Panel and choose Install New Hardware.
  • Pick manual install, choose the Windows SideShow type and browse for the INF file.

Download Files

DownloadSource Code (33 Kb)

To the top