Creating a Temperature Sensor Gadget for Windows Sidebar with C++

The following post describes a gadget for Windows Sidebar that displays the temperature reading from a temperature sensor device. Similar applications could be written to display: battery-level or available memory for a portable media device, contact lists from a mobile phone or PDA, route lists from a GPS device, and so on. Introduction Microcontrollers are…

1

Creating a Temperature-Sensor Gadget for Windows Sidebar with C#

This article was written for application developers who are interested in displaying portable device data in the Windows Sidebar. It describes a Microsoft .Net application written in C# as well as a gadget for Windows Sidebar. The application was written using Microsoft Visual Studio 8. The WPD gadget was written in HTML and JScript. The .Net…

2

Driver Dev Guide: Client Context Management

Client Context Management in WPD Drivers A WPD driver provides the communication channel between applications and the physical device.   There can be multiple WPD applications running at any time, and the driver needs to handle requests from different clients and identify the clients based on the queued requests.   In other words, the driver needs an efficient and easy way…

1

Which version of the WDK do I download?

To develop WPD drivers for Vista SP1: – Build them using the Vista WDK (version 6000) or from the Longhorn Server Beta 3 WDK build environments.    – WPD drivers built using Longhorn Server WDK Beta 3 will not run on Vista RTM or Windows XP, this is because the version 1.7 WDF Co-installer shipped in the Beta 3 release does…

2

Getting a WPD Sample Driver working with Windows Media Player 11

We mentioned in a previous post that the WPD sample drivers are not designed to enumerate in Windows Media Player 11 (WMP11) due to compatibility issues.   This post covers the changes needed to enable the WPD Comprehensive Sample Driver (WpdWudfSampleDriver) to appear as a portable device in WMP11 and simulate a sync.     The WpdWudfSampleDriver is featured in this post…

1

New Driver and Application Whitepapers Are Here

We’ve published two new WPD developer-centric whitepapers at the Microsoft WHDC website for WinHEC.    The first covers how to do WMDRM metering and license synchronization from a WPD application; the second describes how to port the existing WPD “Hello World” sample driver to communicate with a Parallax Basic Stamp II microcontroller to read temperature sensor data.   Both contain sample…

1

Driver Dev Guide: Supporting WPD_CLIENT_EVENT_COOKIE

WPD Applications can specify a unique string “cookie” in the client information when calling IPortableDevice::Open:   WPD_CLIENT_EVENT_COOKIE VT_LPWSTR Client supplied cookie returned by the driver in events posted as a direct result of operations issued by this client.   This is in addition to the client information properties described on MSDN, and declared in PortableDevice.h. Depending on the application, this value will typically contain the…

0

Cancellation Behavior of MTP USB Devices

The MTP Specification contains this definition of the CancelTransaction Event: G.2.2 CancelTransactionEvent Code: 0x4001Parameter 1: NoneParameter 2: NoneParameter 3: None This event is used to initiate the cancellation of a transaction over transports which do not have their own mechanism for canceling transactions. The details of how a transaction is cancelled may be transport-specific. When an…

5

Installing the Sample Drivers on XP and Vista

A question was raised today on how to run the WPD sample drivers on Windows XP.    WPD drivers and applications can run downlevel on Windows XP as long as the WPD and UMDF runtimes are both installed.   Compiling a WPD Driver for your OS For the driver to run on Windows XP, it has to be built using a…

8

WPD Development Kits and Downloads

WPD Application Development To get started on developing a WPD application, download the Windows SDK (Windows Vista or later).  This contains the header and library files, build environment, and code for a sample WPD application.   Earlier versions of the Platform SDK do not include WPD. If you are sending MTP vendor extension commands in your WPD application, and…

1