Sensors and Windows

Prior to the introduction of WPD, developers wrote a significant amount of code to integrate data from sensors into their Windows applications. But, with the release of WPD, it was possible to create a driver that handled communications between the operating system and the remote device. And, once the driver was written, a developer could…

1

Windows 7 Driver Samples

The Windows Portable Devices Driver Kit in the Windows Driver Kit (WDK) comes bundled with five WPD sample drivers. Two of these drivers, WpdHelloWorldDriver and WpdWudfSampleDriver, were available in previous versions of the WDK. The remaining three drivers, WpdBasicHardwareDriver, WpdServiceSampleDriver, and WpdMultiTransportDriver, are new additions in the Windows 7 WDK. Together, these samples illustrate how…

0

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

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

Driver Dev Guide: WPP Tracing in your WPD Driver

WPP Software Tracing is the recommended way to log trace and error messages in your WPD driver.  WPP, short for Windows Software Trace PreProcessor, provides an efficient real-time event logging mechanism.    In addition, WPP traces include the system timestamp and can be used as a way to measure performance, for example by calculating the elapsed time between function calls. …

1