<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Portable Devices Team Blog : WMDM</title><link>http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx</link><description>Tags: WMDM</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Windows 7 Driver Samples</title><link>http://blogs.msdn.com/wpdblog/archive/2009/09/18/windows-7-driver-samples.aspx</link><pubDate>Sat, 19 Sep 2009 00:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896984</guid><dc:creator>wpdblog</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/9896984.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=9896984</wfw:commentRss><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;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 to build a WPD driver for the different scenarios that WPD enables, including interaction with basic hardware, media synchronization, device services, and multi-transport. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;We had mentioned these samples in a previous post on the &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/wpdblog/archive/2009/09/11/windows-7-portable-device-development-kits.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/09/11/windows-7-portable-device-development-kits.aspx"&gt;&lt;FONT size=2&gt;Windows 7 Portable Devices Development Kits&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt;. The purpose of this post is to spend some time covering each sample in greater detail. Hopefully, this will help driver developers navigate the various WPD samples, and figure out which sample(s) best fit their driver requirements. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The following sections will describe each driver, the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd434932.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd434932.aspx"&gt;&lt;FONT size=2&gt;WPD commands&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; that each implements, and the operating systems that each supports. In addition, we will provide the links to instructions for building and installing.&lt;/FONT&gt;&lt;/P&gt;
&lt;H2&gt;WpdHelloWorldDriver&lt;/H2&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN&gt;Of all the sample drivers, the WpdHelloWorldDriver is the most simple. This driver supports and emulates four objects in software: a device object, a storage object, a folder object, and a text file object. WpdHelloWorldDriver was designed to provide the most basic scaffolding or skeleton required for developing a WPD driver; similar to the canonical "Hello World" program used for introducing a framework or programming language. If you are new to WPD driver development and need a kick start, we recommend starting with this sample.&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;The WpdHelloWorldDriver sample supports 22 commands. These commands cover the basic functionality that enables a WPD device to be browsed in Windows Explorer as a read-only device. The commands fall into four categories: object enumeration, object properties, object resources, and device capabilities. Like all WPD drivers, when this driver is installed and a WPD application calls a method to enumerate objects, set a property, open a resource, and so on, the driver will invoke a corresponding command handler for one of these supported commands. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This driver is supported on Windows XP, Windows Vista (x86, amd64), and Windows 7 (x86, amd64). &lt;/P&gt;
&lt;P&gt;For instructions on how to build and install this driver, see: &lt;A href="http://msdn.microsoft.com/en-us/library/dd573842.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd573842.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd573842.aspx&lt;/A&gt;&lt;/P&gt;
&lt;H2&gt;WpdBasicHardwareDriver&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;The WpdBasicHardwareDriver sample is new for Windows 7 and builds upon the WpdHelloWorldDriver. This sample stands apart from the other WPD samples in that it accesses real device hardware instead of emulating a software-only device. We provided this sample to demonstrate how a basic WPD driver can be built to interact with simple devices. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;For our demonstration device, we targetted a “hobbyist” microcontroller that reads data from a variety of sensors. The sensors include: a 2-axis accelerometer, a 3-axis accelerometer, a temperature/humidity sensor, a pressure sensor, a distance sensor, a passive infrared sensor, a compass, a vibration sensor, and a light sensor. These sensor devices are controlled by a Parallax BS2 microcontroller attached to the PC via an RS232 port. In addition to the driver source code, we also provided some sample firmware code that retrieves the sensor data and sends them over the serial port to the PC.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;The WpdBasicHardwareDriver sample supports an even smaller set of commands than the WpdHelloWorldDriver. In the interests of only providing the code that is necessary to demontrate the concepts, we removed some commands for object resources because the WpdBasicHardwareDriver does not need to support reading of files from the device. The remaining commands fall under these three categories: object enumeration, object properties, and device capabilities. To see this driver in action, you can use WpdMon to view the events corresponding to each sensor reading.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;This sample also showcases how WPP Software Tracing can be used for error checking macros. A while ago, we had a post &lt;FONT size=2&gt;that describes how you can &lt;A href="http://blogs.msdn.com/wpdblog/archive/2007/04/01/driver-dev-guide-using-wpp-tracing-in-your-wpd-driver.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/04/01/driver-dev-guide-using-wpp-tracing-in-your-wpd-driver.aspx"&gt;migrate your existing WPD driver from OutputDebugString to WPP Tracing&lt;/A&gt;. The WpdBasicHardwareDriver is now bundled with the macros.&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;This driver is supported on Windows XP, Windows Vista (x86, amd64), and Windows 7 (x86, amd64). If you plan to develop drivers that integrate sensors with Windows 7, we recommend using the &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd318953%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd318953(VS.85).aspx"&gt;&lt;FONT size=2&gt;Sensor API&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; and &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc974537.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc974537.aspx"&gt;&lt;FONT size=2&gt;Sensor Driver Model&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt;. If you need to develop drivers to integrate sensors with Windows Vista or Windows XP, WPD provides a viable solution.&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;For instructions on how to build and install this driver, see: &lt;A href="http://msdn.microsoft.com/en-us/library/dd573829.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd573829.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;H2&gt;WpdWudfSampleDriver&lt;/H2&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;SPAN&gt;The WpdWudfSampleDriver is a comprehensive driver sample that demonstrates using the WPD DDI for media transfer scenarios.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;In addition to file browsing and transfer via Windows Explorer, this sample contains additional functionality that supports media synchronization with Windows Media Device Manager (WMDM) applications (e.g. Windows Media Player), and photo acquisition with Windows Image Acquisition (WIA) applications (e.g. Paint). All interactions with hardware are emulated in software (meaning that this driver talks to a "fake" device).&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;To enable the media transfer scenarios, the WpdWudfSampleDriver sample had to support a large set of commands, including the commands supported by the WpdHelloWorldDriver. These commands can be divided into eight categories: object enumeration, object management, object properties, bulk properties, object resources, capabilities, and storage.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;In this version, we fixed &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/wpdblog/archive/2007/05/08/getting-a-wpd-sample-driver-working-with-windows-media-player-11.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/05/08/getting-a-wpd-sample-driver-working-with-windows-media-player-11.aspx"&gt;&lt;FONT size=2&gt;a compatibility issue&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=2&gt; in the Vista WDK version of the sample driver code that prevents it from being properly enumerated in Windows Media Player.&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This driver is supported on Windows XP, Windows Vista (x86, amd64), and Windows 7 (x86, amd64).&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;For instructions on how to build and install this driver, see: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd573843.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd573843.aspx&lt;/A&gt; &lt;/P&gt;
&lt;H2&gt;WpdMultiTransportDriver&lt;/H2&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;The WpdMultiTransportDriver builds upon the WpdHelloWorldDriver and demonstrates how driver developers can take advantage of the Windows 7 support for Multiple Transports. For an overview on what multi transport is all about, check out our post two weeks ago about &lt;A href="http://blogs.msdn.com/wpdblog/archive/2009/09/04/multi-transport-devices-in-windows-7.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/09/04/multi-transport-devices-in-windows-7.aspx"&gt;Multi-Transport support in Windows 7&lt;/A&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: small" class=Apple-style-span&gt;This driver emulates a transport driver and illustrates how to set the relevant multi-transport settings and generate the Functional Unique Identifier (FUID) during device arrival, in order to perform handshaking with the WPD Composite Driver. In addition, this sample supports multiple Windows Driver Framework I/O queues, where all the other WPD samples only support a single I/O queue.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: small" class=Apple-style-span&gt;Other than the multi-transport support, the WpdMultiTransportDriver sample is virtually identical as the WpdHelloWorldDriver, and supports the same set of WPD commands. A quick way to zero-in on the code modifications needed to support Multi-Transport is to use your favorite diff program to compare the WpdHelloWorldDriver and WpdMultiTransportDriver source folders.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Because multi-transport support is a new feature in Windows 7, this sample driver is only supported on Windows 7 (x86, amd64). &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;For instructions on how to build and install this driver, see: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd573843.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd573843.aspx"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/dd573843.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;SPAN&gt;
&lt;H2&gt;WpdServiceSampleDriver&lt;/H2&gt;&lt;/SPAN&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;The WpdServiceSampleDriver demonstrates how a driver can support Windows 7 Device Services. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;We covered an &lt;A href="http://blogs.msdn.com/wpdblog/archive/2009/08/15/introducing-device-services.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/08/15/introducing-device-services.aspx"&gt;introduction to Device Services&lt;/A&gt; in another recent post&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;. This driver emulates a basic Contacts device service that uses the Full Enumeration Sync device service. To support Device Services, this driver implements device services-specific WPD command sets: WPD_CATEGORY_SERVICE_COMMON, WPD_CATEGORY_SERVICE_CAPABILITIES, and WPD_CATEGORY_SERVICE_METHODS. These commands would allow an application to determine the capabilities of a service and invoke methods supported by the service. This driver also uses the new functionality in the WPD Class Extension (IPortableDeviceClassExtension) to register and unregister the Contacts device service interface. Last but not the least, to support object and property management, this sample also supports commands for object enumeration, object properties, bulk properties, object resources, and device capabilities.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;The WpdServiceSampleDriver does not emulate a Media Transfer Protocol (MTP) device. Like most of the other WPD samples, it simulates a software-only device that is not tied to a specific protocol or transport. If you are looking to build firmware for an MTP device that supports device services, you should start with the &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://www.microsoft.com/whdc/device/wpd/MTP-DEK_Win7.mspx" mce_href="http://www.microsoft.com/whdc/device/wpd/MTP-DEK_Win7.mspx"&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;Device Enabling Kit&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&lt;FONT size=2&gt;. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: small" class=Apple-style-span&gt;Device Services is a new feature we introduced in Windows 7, therefore this sample is only supported on Windows 7 (x86, amd64).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;For instructions on how to build and install this driver, see: &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd573846.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd573846.aspx"&gt;&lt;FONT size=2&gt;http://msdn.microsoft.com/en-us/library/dd573846.aspx&lt;/FONT&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;I&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;This posting is provided "AS IS" with no warranties and confers no rights.&lt;/SPAN&gt;&lt;/I&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9896984" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WDK/default.aspx">WDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WIA/default.aspx">WIA</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/Device+Services/default.aspx">Device Services</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/multi-transport/default.aspx">multi-transport</category></item><item><title>Windows 7 Portable Device Development Kits</title><link>http://blogs.msdn.com/wpdblog/archive/2009/09/11/windows-7-portable-device-development-kits.aspx</link><pubDate>Sat, 12 Sep 2009 09:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9894442</guid><dc:creator>wpdblog</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/9894442.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=9894442</wfw:commentRss><description>&lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;There are several different resources made available to portable device manufacturers to assist in device firmware and driver development, and to application developers wishing to create applications that interact with these portable devices. These resources are provided and maintained by members of the Windows Portable Devices team. &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;This post provides a description for the following development kits: &lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;span style="font-family: symbol; mso-bidi-font-family: symbol; mso-fareast-font-family: symbol"&gt;&lt;span style="mso-list: ignore"&gt;&lt;span style="font: 7pt &amp;#39;Times New Roman&amp;#39;"&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Windows 7 Portable Device Enabling Kit for MTP &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;Windows Portable Devices SDK &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;Windows Portable Devices Driver Kit &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;Windows Media Device Manager SDK &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;Microsoft Device Experience Development Kit &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle"&gt;&lt;font size="2"&gt;&lt;font face="Verdana"&gt;&lt;/span&gt;Windows Logo Kit &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2&gt;Windows 7 Portable Device Enabling Kit for MTP&lt;/h2&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;This development kit is designed to assist portable device manufacturers in the development of Media Transfer Protocol (MTP) device firmware that is compatible with the &lt;/font&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2009/08/29/mtp-over-various-transports.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/08/29/mtp-over-various-transports.aspx"&gt;&lt;font size="2"&gt;various MTP device transports that Windows supports&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, and with &lt;/font&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2009/08/15/introducing-device-services.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/08/15/introducing-device-services.aspx"&gt;&lt;font size="2"&gt;Device Services&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. There are two packages provided for download: &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin-left: 0.5in"&gt;&lt;i&gt;&lt;font face="Verdana"&gt;Windows 7 Portable Device Enabling Kit for MTP - Tools&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;font face="Verdana"&gt;      &lt;br /&gt;The tools kit includes design documentation and implementation guidelines, a Windows-based reference design, development tools, and the updated MTP Device Simulator. &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin-left: 0.5in"&gt;&lt;i&gt;&lt;font face="Verdana"&gt;Windows 7 Portable Device Enabling Kit for MTP - Reference Code&lt;/font&gt;&lt;/i&gt;&lt;font face="Verdana"&gt;      &lt;br /&gt;The reference code kit includes the core responder reference source code that is being made available under a separate Berkeley Software Distribution (BSD)–style license. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;To download both packages of the Windows 7 Portable Device Enabling Kit for MTP, go to: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://www.microsoft.com/whdc/device/wpd/MTP-DEK_Win7.mspx"&gt;http://www.microsoft.com/whdc/device/wpd/MTP-DEK_Win7.mspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You are not required to license the reference code in order to use the tools and resources provided in the tools kit.&lt;span class="MsoCommentReference"&gt;&lt;span style="line-height: 115%; mso-bidi-font-size: 11.0pt; mso-ansi-font-size: 11.0pt"&gt; &lt;/span&gt;&lt;/span&gt;This kit is free to download and use.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;Windows Portable Devices SDK&lt;/h2&gt; &lt;span style="color: black"&gt;   &lt;p&gt;&lt;font size="2"&gt;The WPD SDK includes the WPD Application Programming Interface (API) that is supported in Windows 7, Windows Vista, and Windows XP operating Systems. Developers will use this API to write Windows applications in C++. &lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt;Being a COM API, the WPD API is also accessible from Managed code, so C# .Net, and Visual Basic .Net applications can use COM Interoperability to invoke the same functionality that the C++ API provides. WPD applications can: explore a device, send and receive content, and even control the device, for example, take a picture or send a text message.&lt;/font&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p style="vertical-align: top"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;The WPD SDK includes two sample applications for C++/COM developers. The first, WpdApiSample, is a command-line desktop application that demonstrates how you would: enumerate connected devices, explore those devices, query device-objects for properties and attributes, send and retrieve data, and so on. The second sample, WpdServicesApiSample, is a command-line desktop application that demonstrates how you would explore a Contacts service on a device that is attached to your computer. &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;The WPD SDK also includes an Automation Object Model that is supported in Windows 7. Developers can use the Automation model to write web applications that accomplish tasks similar to those accomplished with the API. We provided an introduction to WPD Automation in this recent &lt;/font&gt;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2009/08/21/introducing-wpd-automation.aspxhttp:/blogs.msdn.com/wpdblog/archive/2009/08/21/introducing-wpd-automation.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/08/21/introducing-wpd-automation.aspxhttp:/blogs.msdn.com/wpdblog/archive/2009/08/21/introducing-wpd-automation.aspx"&gt;&lt;font color="#0080ff" size="2"&gt;post&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;.&lt;/font&gt; &lt;/span&gt;&lt;span style="color: black; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;&lt;span style="color: black"&gt;The WPD SDK is included in the Windows SDK which can be downloaded from &lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;amp;displaylang=en&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: black"&gt;&lt;/span&gt; &lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;The documentation for the WPD SDK (both the API and Automation Object Model) is found on MSDN at: &lt;/font&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx"&gt;&lt;font color="#0000ff"&gt;&lt;/font&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx"&gt;&lt;font size="2"&gt;http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx&lt;/font&gt;&lt;/a&gt;&lt;/a&gt;&lt;b&gt;&lt;span style="line-height: 140%; font-family: &amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;; color: black; font-size: 12pt; mso-bidi-font-size: 11.0pt"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Windows Portable Devices Driver Kit&lt;/h2&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;The WPD Driver Kit includes a Device Driver Interface (DDI) that is supported in Windows 7, Windows Vista, and Windows XP operating Systems. Developers will use this DDI to write drivers for devices that are not already supported by the MTP or Mass Storage class drivers that Microsoft distributes.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The WPD Driver Kit includes five sample device drivers which are described in the following table. In the next &lt;/font&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2009/09/18/windows-7-driver-samples.aspx"&gt;&lt;font size="2"&gt;post&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, we covered each sample in more detail.&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;table style="border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;       &lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;b&gt;&lt;font size="2"&gt;Sample Driver&lt;/font&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-top: black 1pt solid; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;b&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 1"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;WpdHelloWorldDriver&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;This is the most basic WPD driver that emulates interaction with hardware. Supports four objects: device, storage, folder, and file. This provides the scaffolding or skeleton for developing a WPD driver.&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 2"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;WpdBasicHardwareDriver&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;Builds upon the WpdHelloWorldDriver and demonstrates interaction with simple hardware devices. Supports nine sensor devices: 2-axis accelerometer, 3-axis accelerometer, temperature/humidity sensor, pressure sensor, distance sensor, passive infrared sensor, compass, vibration sensor, and light sensor. These sensor devices are simple devices that are controlled by a Parallax BS2 microcontroller attached to the PC. &lt;/font&gt;&lt;/p&gt;            &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt;If you plan to develop drivers that integrate sensors with Windows 7, we recommend using the &lt;/font&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd318953(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd318953(VS.85).aspx"&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt;Sensor API&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt; and &lt;/font&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc974537.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc974537.aspx"&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt;Sensor Driver Model&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt;&lt;font size="2"&gt;. If you need to develop drivers to integrate sensors with Windows Vista or Windows XP, WPD provides a viable solution. &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 3"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;WpdServiceSampleDriver&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;Demonstrates how a developer would extend the WpdHelloWorldDriver to support a simulated device with a Contacts device service.(Using this service, WPD applications can discover events, methods, and properties associated with the Contacts stored on the device. This sample emulates interaction with hardware.&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 4"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;WpdMultiTransportDriver&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;Demonstrates how developers can take advantage of the Windows 7 support for multiple transports. The sample emulates interaction with hardware and demonstrates support for the following transports: IP, Bluetooth, and USB. We covered an overview of Multi-transport support in Windows 7 &lt;/font&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2009/09/04/multi-transport-devices-in-windows-7.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2009/09/04/multi-transport-devices-in-windows-7.aspx"&gt;&lt;font size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;.&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr style="mso-yfti-irow: 5; mso-yfti-lastrow: yes"&gt;         &lt;td style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;WpdWudfSampleDriver&lt;span style="mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-bidi-font-family: calibri"&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td style="border-bottom: black 1pt solid; padding-bottom: 0in; background-color: transparent; border-top-color: #f0f0f0; padding-left: 5.4pt; width: 239.4pt; padding-right: 5.4pt; border-left-color: #f0f0f0; border-right: black 1pt solid; padding-top: 0in" valign="top" width="319"&gt;           &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;A comprehensive sample driver that demonstrates what to enable in the WPD DDI for media transfer scenarios (such as music and photos). This sample supports media synchronization with Windows Media Player, and also emulates interaction with hardware.&lt;/font&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;The WPD Driver Kit is included in the Windows Driver Kit (WDK). For information about downloading the WDK, see: &lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://www.microsoft.com/whdc/devtools/wdk/WDKpkg.mspx"&gt;http://www.microsoft.com/whdc/devtools/wdk/WDKpkg.mspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="color: black"&gt;&lt;font size="2"&gt;The documentation for the WPD Driver Kit is found on MSDN at: &lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd419925.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd419925.aspx&lt;/a&gt;&lt;/font&gt;&lt;span style="color: #1f497d"&gt;&lt;/span&gt; &lt;/p&gt;  &lt;h2&gt;Windows Media Device Manager SDK &lt;/h2&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The Windows Media Device Manager (WMDM) SDK &lt;span style="color: black"&gt;enables you to build desktop applications and components that can communicate with connected portable devices. WMDM enables your application or component to enumerate, explore, and exchange files with a device, query for metadata, and request play count information. Applications or components built on WMDM have a consistent API for communicating with a wide range of devices including Media Transfer Protocol (MTP), Mass Storage Class (MSC), RAPI, and other devices built on both the latest and previous versions of Windows Media technology. &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;font size="2"&gt;The Windows Media Device Manager SDK is available at: &lt;/font&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/windows/bb190309.aspx" mce_href="http://msdn.microsoft.com/en-us/windows/bb190309.aspx"&gt;&lt;font size="2"&gt;http://msdn.microsoft.com/en-us/windows/bb190309.aspx&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. &lt;/font&gt;&lt;/p&gt;  &lt;h2&gt;Microsoft Device Experience Development Kit&lt;/h2&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The Microsoft Device Experience Development Kit provides detailed information and material that you would need to know in order to develop Device Stage™ experiences for Portable Devices. The development kit includes device development guides, planning worksheets, tutorials, and development samples that you can use when developing a Device Stage experience on Windows 7. For portable devices, Device Stage supports the industry-standard Media Transfer Protocol (MTP) 1.0 with device services that enable a new rich set of features in Windows 7. &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The development kit along with other pertinent information to build a complete Windows Device Experience is available at: &lt;/font&gt;&lt;a href="http://www.microsoft.com/whdc/device/DeviceExperience/default.mspx" mce_href="http://www.microsoft.com/whdc/device/DeviceExperience/default.mspx"&gt;&lt;font size="2"&gt;http://www.microsoft.com/whdc/device/DeviceExperience/default.mspx&lt;/font&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The kit is free to download and use. &lt;/font&gt;&lt;/p&gt;  &lt;h2&gt;Windows Logo Kit&lt;/h2&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The primary use of the Windows Logo Kit (WLK) is for Windows Logo Program device certification. This kit can also be used for product development. We encourage its use during the product development cycle of hardware in order to ensure device compliance with both Windows and industry standards. The kit includes several tests designed to validate device implementation and behavior at multiple levels. There are tests for USB compliance, Media Transfer Protocol (MTP) compliance, and Windows Portable Devices (WPD) platform compliance that also cover device services validation.&lt;span style="mso-spacerun: yes"&gt;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;There is a significant amount of information available about the WLK, including user guides and video tutorials. For more information about the WLK see: &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://www.microsoft.com/whdc/winlogo/WLK/default.mspx"&gt;http://www.microsoft.com/whdc/winlogo/WLK/default.mspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;The kit is free to download and use.&lt;/font&gt; &lt;/p&gt;  &lt;h2&gt;Other Resources&lt;/h2&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;Windows Portable Devices node on Windows Hardware Developer Central &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;a href="http://www.microsoft.com/whdc/device/wpd/default.mspx" mce_href="http://www.microsoft.com/whdc/device/wpd/default.mspx"&gt;&lt;font size="2"&gt;http://www.microsoft.com/whdc/device/wpd/default.mspx&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font size="2"&gt;Windows Portable Devices on Microsoft Developer Network &lt;/font&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/dd388998(VS.85).aspx&lt;/a&gt;&lt;/font&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0in 0in 10pt" class="MsoNormal"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&lt;/span&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p mce_keep="true"&gt;&lt;span style="font-family: &amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;; font-size: 10pt"&gt;&lt;em&gt;This posting is provided &amp;quot;AS IS&amp;quot; with no warranties and confers no rights.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9894442" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/MTP/default.aspx">MTP</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/Device+Stage/default.aspx">Device Stage</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Getting a WPD Sample Driver working with Windows Media Player 11</title><link>http://blogs.msdn.com/wpdblog/archive/2007/05/08/getting-a-wpd-sample-driver-working-with-windows-media-player-11.aspx</link><pubDate>Tue, 08 May 2007 22:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2485116</guid><dc:creator>wpdblog</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/2485116.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=2485116</wfw:commentRss><description>&lt;p&gt;We mentioned in a &lt;a href="http://blogs.msdn.com/wpdblog/archive/2007/01/31/building-driver-samples-from-the-wdk.aspx" class="" title="Building WPD Driver Samples from the WDK" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/01/31/building-driver-samples-from-the-wdk.aspx"&gt;previous post&lt;/a&gt;&amp;nbsp;that the WPD sample drivers are not designed to enumerate in Windows Media Player 11 (WMP11) due to compatibility issues.&amp;nbsp;&amp;nbsp; This post covers the changes needed to enable the WPD Comprehensive Sample Driver (WpdWudfSampleDriver) to&amp;nbsp;appear&amp;nbsp;as a&amp;nbsp;portable device in WMP11 and simulate a sync.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The WpdWudfSampleDriver is featured in this post because it contains a lot more functionality than the WpdHelloWorldDriver,&amp;nbsp;and is closer to meeting the requirements of WMP11 than the WpdHelloWorldDriver.&amp;nbsp;&amp;nbsp;&amp;nbsp; More specifically, the WpdWudfSampleDriver &lt;b&gt;simulates&lt;/b&gt; the following additional functionality:&lt;/p&gt;
&lt;p&gt;1. Creating and transferring data objects on the device.&lt;/p&gt;
&lt;p&gt;2. &lt;a href="http://msdn.microsoft.com/en-us/library/dd435167.aspx" title="Rendering Information" mce_href="http://msdn.microsoft.com/en-us/library/dd435167.aspx"&gt;Rendering information&lt;/a&gt; profiles for creating content to the device.&lt;/p&gt;
&lt;p&gt;3. Setting properties on objects.&lt;/p&gt;
&lt;p&gt;4. &lt;a href="http://blogs.msdn.com/wpdblog/archive/2007/03/16/how-to-post-events-from-your-wpd-driver.aspx" class="" title="Posting Events from a WPD Driver" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/03/16/how-to-post-events-from-your-wpd-driver.aspx"&gt;Posting device events&lt;/a&gt;.&lt;/p&gt;
&lt;p mce_keep="true"&gt;5. &lt;a href="http://msdn.microsoft.com/en-us/library/dd419971.aspx" title="An example of a Bulk Property Operation" mce_href="http://msdn.microsoft.com/en-us/library/dd419971.aspx"&gt;Bulk property operations&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the list above, items 1-3&amp;nbsp;provide basic&amp;nbsp;compatibility with WMP11.&amp;nbsp; Device events&amp;nbsp;are a "good to have" feature,&amp;nbsp;for application responsiveness to changes in the device content and device state.&amp;nbsp; Bulk property operations are optional, but also provide improved application responsiveness -&amp;nbsp;multiple properties for objects can be sent in batches, instead of&amp;nbsp;multiple per-object "GetProperty" requests.&lt;/p&gt;
&lt;p&gt;During sync, the WpdWudfSampleDriver simulates&amp;nbsp;file and folder creation&amp;nbsp;by allowing content to be created and transferred to the device.&amp;nbsp;&amp;nbsp; The data&amp;nbsp;is not persisted by the driver, and will exist as long as the sample driver is still loaded.&amp;nbsp;&amp;nbsp;&amp;nbsp;Once the driver is disconnected (e.g. disable in Device Manager), the data goes away.&amp;nbsp;&amp;nbsp; Typically, your WPD driver&amp;nbsp;would be sending this data to your physical device and persisting it there, so this should not be an issue for real devices.&lt;/p&gt;
&lt;p mce_keep="true"&gt;&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;&lt;b&gt;Modifications to the WpdWudfSampleDriver to Enumerate and Sync in WMP11&lt;/b&gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;Some of the changes below involve updating the fake contents on the device for illustration.&amp;nbsp;&amp;nbsp;&amp;nbsp;The same property requirements will apply for&amp;nbsp;your&amp;nbsp;own&amp;nbsp;driver or device objects.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p mce_keep="true"&gt;1.&amp;nbsp; Add WPD_DEVICE_SYNC_PARTNER as a writable property for the "Device" object.&amp;nbsp;&amp;nbsp; This is needed by WMP11 for setting up a sync partnership&amp;nbsp;with the device.&amp;nbsp;&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;In deviceobjectfakecontent.h:&lt;br&gt;&lt;br&gt;class DeviceObjectFakeContent : public FakeContent&lt;br&gt;{&lt;br&gt;  ...&lt;br&gt;&lt;br&gt;    virtual HRESULT GetAllValues(&lt;br&gt;        IPortableDeviceValues*  pValues)&lt;br&gt;    {&lt;br&gt;	...&lt;br&gt;        // Add WPD_DEVICE_SYNC_PARTNER&lt;br&gt;        hrSetValue = pValues-&amp;gt;SetStringValue(WPD_DEVICE_SYNC_PARTNER, SyncPartner);&lt;br&gt;        if (hrSetValue != S_OK)&lt;br&gt;        {&lt;br&gt;            CHECK_HR(hrSetValue, "Failed to set WPD_DEVICE_SYNC_PARTNER");&lt;br&gt;            return hrSetValue;&lt;br&gt;        }&lt;br&gt;        ...&lt;br&gt;    }	&lt;br&gt;&lt;br&gt;    virtual HRESULT WriteValue(&lt;br&gt;        const PROPERTYKEY&amp;amp; key,&lt;br&gt;        const PROPVARIANT&amp;amp; Value)&lt;br&gt;    {&lt;br&gt;        ...&lt;br&gt;        else if(IsEqualPropertyKey(key, WPD_DEVICE_SYNC_PARTNER))&lt;br&gt;        {&lt;br&gt;            if (Value.vt == VT_LPWSTR)&lt;br&gt;            {&lt;br&gt;               SyncPartner = Value.pwszVal;&lt;br&gt;            }&lt;br&gt;            else&lt;br&gt;            {&lt;br&gt;                hr = E_INVALIDARG;&lt;br&gt;                CHECK_HR(hr, "Failed to set WPD_DEVICE_SYNC_PARTNER because type was not VT_LPWSTR");&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;	...&lt;br&gt;    }&lt;br&gt;   ...&lt;br&gt;&lt;br&gt;private:&lt;br&gt;    ...&lt;br&gt;    CAtlStringW SyncPartner;&lt;br&gt;};&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;2. Add WPD_OBJECT_NON_CONSUMABLE as a writable property for all objects.&amp;nbsp;&amp;nbsp; This allows simulating the saving of sync settings into a&amp;nbsp;file on the device called&amp;nbsp;WMPInfo.xml.&amp;nbsp;&amp;nbsp; This file is created by WMP11 on the device and&amp;nbsp;marked as "Non Consumable," with Format = WPD_OBJECT_FORMAT_UNSPECIFIED and Content Type =&amp;nbsp;WPD_CONTENT_TYPE_UNSPECIFIED.&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;In fakecontent.h:&lt;br&gt;&lt;br&gt;class FakeContent&lt;br&gt;{&lt;br&gt;&lt;br&gt;    virtual HRESULT WriteValue(&lt;br&gt;        const PROPERTYKEY&amp;amp; key,&lt;br&gt;        const PROPVARIANT&amp;amp; Value)&lt;br&gt;    {&lt;br&gt;        ...&lt;br&gt;        else if (IsEqualPropertyKey(key, WPD_OBJECT_NON_CONSUMABLE))&lt;br&gt;        {&lt;br&gt;            if(Value.vt == VT_BOOL)&lt;br&gt;            {&lt;br&gt;                NonConsumable = Value.boolVal;&lt;br&gt;            }&lt;br&gt;            else&lt;br&gt;            {&lt;br&gt;                hr = E_INVALIDARG;&lt;br&gt;                CHECK_HR(hr, "Failed to set WPD_OBJECT_NON_CONSUMABLE because type was not VT_BOOL");&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;        ...&lt;br&gt;    }&lt;br&gt;   ...&lt;br&gt;};&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;3. Add&amp;nbsp;support for WPD_OBJECT_ORIGINAL_FILE_NAME in for all objects.&amp;nbsp; This involves updating the support properties and fixed attributes tables, and overriding FakeGenericFileContent::GetAllValues() to return this property in addition to the standard properties.&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;In helpers.cpp:&lt;br&gt;&lt;br&gt;const PROPERTYKEY* g_SupportedPropertiesForFakeContentFormat[] =&lt;br&gt;{&lt;br&gt;    ...&lt;br&gt;    &amp;amp;WPD_OBJECT_ORIGINAL_FILE_NAME,&lt;br&gt;    ...&lt;br&gt;};&lt;br&gt;&lt;br&gt;KeyAndAttributesEntry g_FixedAttributesTable [] =&lt;br&gt;{     &lt;br&gt;    ...&lt;br&gt;    {&amp;amp;FakeContent_Format, &amp;amp;WPD_OBJECT_ORIGINAL_FILE_NAME, &lt;br&gt;         UnspecifiedForm_CanRead_CannotWrite_CannotDelete_Fast},&lt;br&gt;    // Properties for the device object&lt;br&gt;    ...&lt;br&gt;}&lt;br&gt;&lt;br&gt;In fakecontent.h:&lt;br&gt;&lt;br&gt;class FakeGenericFileContent : public FakeContent&lt;br&gt;{&lt;br&gt;public:&lt;br&gt;&lt;br&gt;    virtual HRESULT GetAllValues(&lt;br&gt;        IPortableDeviceValues*  pStore)&lt;br&gt;    {&lt;br&gt;        HRESULT             hr          = S_OK;&lt;br&gt;        PropVariantWrapper  pvValue;&lt;br&gt;&lt;br&gt;        // Call the base class to fill in the standard properties&lt;br&gt;        hr = FakeContent::GetAllValues(pStore);&lt;br&gt;        if (FAILED(hr))&lt;br&gt;        {&lt;br&gt;            CHECK_HR(hr, "Failed to get basic property set");&lt;br&gt;            return hr;&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        // Add WPD_OBJECT_ORIGINAL_FILE_NAME&lt;br&gt;        pvValue = FileName;&lt;br&gt;        hr = pStore-&amp;gt;SetValue(WPD_OBJECT_ORIGINAL_FILE_NAME, &amp;amp;pvValue);&lt;br&gt;        if (hr != S_OK)&lt;br&gt;        {&lt;br&gt;            CHECK_HR(hr, ("Failed to set WPD_OBJECT_ORIGINAL_FILE_NAME"));&lt;br&gt;            return hr;&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        return hr;&lt;br&gt;    }&lt;br&gt;    ...&lt;br&gt;};&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;4. Add support for creation of folders.&amp;nbsp;&amp;nbsp; These folders need to support WPD_OBJECT_ORIGINAL_FILE_NAME.&amp;nbsp;&amp;nbsp;&amp;nbsp; This allows WMP11 to create the "Album", "Artist" folders on the device during the sync operation.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;One way to do this is to&amp;nbsp;define a new &lt;b&gt;FakeFolderContent &lt;/b&gt;class that inherits from &lt;b&gt;FakeContent&lt;/b&gt;, and return WPD_OBJECT_ORIGINAL_FILE_NAME in &lt;b&gt;FakeFolderContent::GetAllValues()&lt;/b&gt;.&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;Added new header file: fakefoldercontent.h&lt;br&gt;&lt;br&gt;class FakeFolderContent : public FakeContent&lt;br&gt;{&lt;br&gt;public:&lt;br&gt;    ...&lt;br&gt;&lt;br&gt;    virtual HRESULT GetAllValues(&lt;br&gt;        IPortableDeviceValues*  pStore)&lt;br&gt;    {&lt;br&gt;        HRESULT             hr          = S_OK;&lt;br&gt;        PropVariantWrapper  pvValue;&lt;br&gt;&lt;br&gt;        // Call the base class to fill in the standard properties&lt;br&gt;        hr = FakeContent::GetAllValues(pStore);&lt;br&gt;        if (FAILED(hr))&lt;br&gt;        {&lt;br&gt;            CHECK_HR(hr, "Failed to get basic property set");&lt;br&gt;            return hr;&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        // Add WPD_OBJECT_ORIGINAL_FILE_NAME&lt;br&gt;        pvValue = FileName;&lt;br&gt;        hr = pStore-&amp;gt;SetValue(WPD_OBJECT_ORIGINAL_FILE_NAME, &amp;amp;pvValue);&lt;br&gt;        if (hr != S_OK)&lt;br&gt;        {&lt;br&gt;            CHECK_HR(hr, ("Failed to set WPD_OBJECT_ORIGINAL_FILE_NAME"));&lt;br&gt;            return hr;&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        return hr;&lt;br&gt;    }&lt;br&gt;};&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;All top level folders (e.g. Video Folder, Music Folder) in the sample driver can then initialize a &lt;b&gt;FakeFolderContent &lt;/b&gt;instead of a &lt;b&gt;FakeContent&lt;/b&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp; The value of WPD_OBJECT_ORIGINAL_FILE_NAME is usually the same as WPD_OBJECT_NAME.&amp;nbsp; Assign&amp;nbsp;the value of FileName in &lt;b&gt;FakeDevice::CreateContentObject() &lt;/b&gt;whenever an object is created, so that it will be returned during subsequent "Get Property" queries.&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;In fakedevice.h:&lt;br&gt;&lt;br&gt;class FakeDevice&lt;br&gt;{&lt;br&gt;    ...   &lt;br&gt;    HRESULT InitializeContent(&lt;br&gt;        IPortableDeviceClassExtension *pPortableDeviceClassExtension)&lt;br&gt;    {&lt;br&gt;        ...&lt;br&gt;        &lt;br&gt;        // Add Media folder: Music folder&lt;br&gt;        pContent = new FakeFolderContent();&lt;br&gt;        if (pContent)&lt;br&gt;        {&lt;br&gt;            ...&lt;br&gt;            pContent-&amp;gt;FileName  = pContent-&amp;gt;Name;  // Set Original File Name property&lt;br&gt;            ...&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        // Repeat for other types of folders declared here&lt;br&gt;        ...&lt;br&gt;&lt;br&gt;        // Add generic file content objects to storage 1&lt;br&gt;        for(DWORD dwIndex = 0; dwIndex &amp;lt; NUM_VERTICAL_OBJECTS; dwIndex++)&lt;br&gt;        {&lt;br&gt;            m_dwLastObjectID++;&lt;br&gt;&lt;br&gt;            pContent = new FakeGenericFileContent();&lt;br&gt;            if (pContent)&lt;br&gt;            {&lt;br&gt;                ...&lt;br&gt;                pContent-&amp;gt;FileName = pContent-&amp;gt;Name;&lt;br&gt;                ...&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;        ...&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    HRESULT CreateContentObject(&lt;br&gt;        LPCWSTR                 pszObjectName,&lt;br&gt;        LPCWSTR                 pszParentID,&lt;br&gt;        REFGUID                 guidContentType,&lt;br&gt;        IPortableDeviceValues*  pObjectProperties,&lt;br&gt;        FakeContent**           ppContent)&lt;br&gt;    {&lt;br&gt;        ...&lt;br&gt;        if(guidContentType == WPD_CONTENT_TYPE_FOLDER)&lt;br&gt;        {&lt;br&gt;            FakeContent* pContent = NULL;&lt;br&gt;&lt;br&gt;            pContent = new FakeContent();&lt;br&gt;            if (pContent)&lt;br&gt;            {&lt;br&gt;                ...&lt;br&gt;                pContent-&amp;gt;FileName = pszObjectName;&lt;br&gt;                ...&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;   }&lt;br&gt;   ...&lt;br&gt;}; &lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;5.&amp;nbsp; Modify WpdWudfSampleDriver.INF to set &lt;b&gt;EnableLegacySupport &lt;/b&gt;to&lt;b&gt; 3 &lt;/b&gt;so that the WMDM compatibility&amp;nbsp;component is registered and enabled&amp;nbsp;for this device when it installs.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;; Enable support for legacy WIA and WMDM applications&lt;br&gt;HKR,,"EnableLegacySupport",0x10001,3&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;
&lt;p mce_keep="true"&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;6. When returning the list of rendering information profiles in &lt;b&gt;SetRenderingProfiles()&lt;/b&gt;, return an additional profile for WPD_OBJECT_FORMAT_WMV.&amp;nbsp; This profile contains a single WPD_PROPERTY_ATTRIBUTE_FORM_ENUMERATION entry with an IPortableDevicePropVariantCollection containing the list of valid FourCC Codec VT_UI4 values.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p mce_keep="true"&gt;This step is needed&amp;nbsp;because the sample driver reports support for WMV.&amp;nbsp;&amp;nbsp; &amp;nbsp;In your real driver implementation, you don't need this step unless your device needs to support WPD_OBJECT_FORMAT_WMV.&amp;nbsp;&amp;nbsp; WMP11 has additional requirements on the attributes of FourCC Codec property, and would not enumerate any content on the device otherwise [Symptom: you will see the device in the Sync Pane, but no content under the device].&lt;/p&gt;&lt;span style="font-size: 9pt; font-family: 'courier-new';"&gt;&lt;pre&gt;In helpers.cpp:&lt;br&gt;&lt;br&gt;HRESULT GetVideoProfile(&lt;br&gt;    IPortableDeviceValues** ppProfile)&lt;br&gt;{&lt;br&gt;    HRESULT hr = S_OK;&lt;br&gt;    CComPtr&amp;lt;IPortableDeviceValues&amp;gt; pProfile;&lt;br&gt;    CComPtr&amp;lt;IPortableDeviceValues&amp;gt; pFourCCCode;&lt;br&gt;&lt;br&gt;    hr = CoCreateInstance(CLSID_PortableDeviceValues,&lt;br&gt;                          NULL,&lt;br&gt;                          CLSCTX_INPROC_SERVER,&lt;br&gt;                          IID_IPortableDeviceValues,&lt;br&gt;                          (VOID**) &amp;amp;pProfile);&lt;br&gt;    CHECK_HR(hr, "Failed to CoCreateInstance CLSID_PortableDeviceValues");&lt;br&gt;&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        hr = CoCreateInstance(CLSID_PortableDeviceValues,&lt;br&gt;                              NULL,&lt;br&gt;                              CLSCTX_INPROC_SERVER,&lt;br&gt;                              IID_IPortableDeviceValues,&lt;br&gt;                              (VOID**) &amp;amp;pFourCCCode);&lt;br&gt;        CHECK_HR(hr, "Failed to CoCreateInstance CLSID_PortableDeviceValues");&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    // Set the value for WPD_OBJECT_FORMAT to indicate this profile applies to WMV objects&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        hr = pProfile-&amp;gt;SetGuidValue(WPD_OBJECT_FORMAT, WPD_OBJECT_FORMAT_WMV);&lt;br&gt;        CHECK_HR(hr, "Failed to set WPD_OBJECT_FORMAT");&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    // Set the value for WPD_VIDEO_FOURCC_CODE&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        CComPtr&amp;lt;IPortableDevicePropVariantCollection&amp;gt; pFourCCCodeEnumElements;&lt;br&gt;&lt;br&gt;        if (hr == S_OK)&lt;br&gt;        {&lt;br&gt;            hr = CoCreateInstance(CLSID_PortableDevicePropVariantCollection,&lt;br&gt;                                  NULL,&lt;br&gt;                                  CLSCTX_INPROC_SERVER,&lt;br&gt;                                  IID_IPortableDevicePropVariantCollection,&lt;br&gt;                                  (VOID**) &amp;amp;pFourCCCodeEnumElements);&lt;br&gt;            CHECK_HR(hr, "Failed to CoCreateInstance &lt;br&gt;                     CLSID_PortableDevicePropVariantCollection");&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        if (hr == S_OK)&lt;br&gt;        {&lt;br&gt;            hr = pFourCCCode-&amp;gt;SetUnsignedIntegerValue(&lt;br&gt;                                 WPD_PROPERTY_ATTRIBUTE_FORM, &lt;br&gt;                                 WPD_PROPERTY_ATTRIBUTE_FORM_ENUMERATION);&lt;br&gt;            CHECK_HR(hr, "Failed to set WPD_PROPERTY_ATTRIBUTE_FORM &lt;br&gt;                          for WPD_VIDEO_FOURCC_CODE");&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        if (hr == S_OK)&lt;br&gt;        {&lt;br&gt;            // Only 1 sample value is set here, add more as appropriate for your device&lt;br&gt;            PROPVARIANT pvValue;&lt;br&gt;            PropVariantInit(&amp;amp;pvValue);&lt;br&gt;            pvValue.vt = VT_UI4;&lt;br&gt;            pvValue.ulVal = MAKEFOURCC('W', 'M', 'V', '3');&lt;br&gt;            hr = pFourCCCodeEnumElements-&amp;gt;Add(&amp;amp;pvValue);&lt;br&gt;            CHECK_HR(hr, "Failed to populate the FourCC Code Enumeration Elements");&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        if (hr == S_OK)&lt;br&gt;        {&lt;br&gt;            hr = pFourCCCode-&amp;gt;SetIPortableDevicePropVariantCollectionValue(&lt;br&gt;                                 WPD_PROPERTY_ATTRIBUTE_ENUMERATION_ELEMENTS, &lt;br&gt;                                 pFourCCCodeEnumElements);&lt;br&gt;            CHECK_HR(hr, "Failed to set WPD_PROPERTY_ATTRIBUTE_ENUMERATION_ELEMENTS &lt;br&gt;                          for WPD_VIDEO_FOURCC_CODE");&lt;br&gt;        }&lt;br&gt;&lt;br&gt;        // Now set the Video FourCC Code property to be pFourCCCode&lt;br&gt;        if (hr == S_OK)&lt;br&gt;        {&lt;br&gt;            hr = pProfile-&amp;gt;SetIPortableDeviceValuesValue(&lt;br&gt;                              WPD_VIDEO_FOURCC_CODE, &lt;br&gt;                              pFourCCCode);&lt;br&gt;            CHECK_HR(hr, "Failed to add the WPD_VIDEO_FOURCC_CODE attributes &lt;br&gt;                          to the WPD_OBJECT_FORMAT_WMV rendering profile");&lt;br&gt;        }&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    // Set the output result&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        hr = pProfile-&amp;gt;QueryInterface(IID_PPV_ARGS(ppProfile));&lt;br&gt;        CHECK_HR(hr, "Failed to QI for IPortableDeviceValues");&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    return hr;&lt;br&gt;}&lt;br&gt;&lt;br&gt;HRESULT SetRenderingProfiles(&lt;br&gt;    IPortableDeviceValues*          pValues)&lt;br&gt;{&lt;br&gt;    ...&lt;br&gt;    CComPtr&amp;lt;IPortableDeviceValues&amp;gt;  pVideoProfile;&lt;br&gt;    ...&lt;br&gt;&lt;br&gt;    // Get the video profile&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        hr = GetVideoProfile(&amp;amp;pVideoProfile);&lt;br&gt;        CHECK_HR(hr, "Failed to get video profile properties");&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    // Add the profile to the collection&lt;br&gt;    if (hr == S_OK)&lt;br&gt;    {&lt;br&gt;        hr = pProfiles-&amp;gt;Add(pVideoProfile);&lt;br&gt;        CHECK_HR(hr, "Failed to add video profile to profile collection");&lt;br&gt;    }&lt;br&gt;    ...&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;/span&gt;

&lt;p&gt;&lt;b&gt;Known Issue with Multiple Storages&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;When a device that contains multiple storages&amp;nbsp;is disconnected, one of the storages will still remain in the treeview.&amp;nbsp;&amp;nbsp; This is a known bug in WMP11.&amp;nbsp;&amp;nbsp; Since the WpdWudfSampleDriver emulates multiple storages, you'll see this bug when you disable the driver from Device Manager while WMP11 is running.&lt;/p&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;&lt;p mce_keep="true"&gt;&lt;b&gt;Update [August 7, 2009]:&amp;nbsp;&lt;/b&gt; The WDK 7.0.0 now contains 
an updated &lt;b&gt;WpdWudfSampleDriver&lt;/b&gt; sample that supports enumeration in 
Windows Media Player. You can get the latest WDK &lt;a href="http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx" mce_href="http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx"&gt;here&lt;/a&gt;. See &lt;a href="http://www.microsoft.com/whdc/devtools/wdk/RelNotesW7.mspx#EHJAE" mce_href="http://www.microsoft.com/whdc/devtools/wdk/RelNotesW7.mspx#EHJAE"&gt;this 
WDK 7.0.0 RTM release note&lt;/a&gt; for the complete list of build environments and 
target operating systems applicable to the WPD driver samples. &lt;br&gt;&lt;/p&gt;

&lt;p mce_keep="true"&gt;&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/i&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2485116" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WDK/default.aspx">WDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category></item><item><title>New Driver and Application Whitepapers Are Here</title><link>http://blogs.msdn.com/wpdblog/archive/2007/05/07/wpd-whitepapers.aspx</link><pubDate>Mon, 07 May 2007 21:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2466855</guid><dc:creator>wpdblog</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/2466855.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=2466855</wfw:commentRss><description>&lt;P&gt;We've published two new WPD developer-centric&amp;nbsp;whitepapers at the Microsoft WHDC website for WinHEC.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first&amp;nbsp;covers how to do WMDRM metering and license synchronization from a WPD application; the second&amp;nbsp;describes how to port the existing WPD "Hello World" sample driver to communicate with a Parallax Basic Stamp II microcontroller to&amp;nbsp;read temperature sensor data.&amp;nbsp;&amp;nbsp; Both contain sample code.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I. Accessing WMDRM APIs from a WPD Application:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/whdc/device/media/WMDRM_API.mspx" mce_href="http://www.microsoft.com/whdc/device/media/WMDRM_API.mspx"&gt;http://www.microsoft.com/whdc/device/media/WMDRM_API.mspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This whitepaper describes how to associate a WPD device instance with a WMDM device instance for MTP devices; the WMDM device instance is then&amp;nbsp;used&amp;nbsp;for calling Windows Media Digital Rights Management (WMDRM) application interfaces. To&amp;nbsp;build the sample WPD application, you need the Windows Media Format SDK v11 and the Windows SDK (v6000).&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;II. Creating a WPD Driver for a Microcontroller-Based Sensor:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/whdc/device/media/WPD_drv.mspx" mce_href="http://www.microsoft.com/whdc/device/media/WPD_drv.mspx"&gt;http://www.microsoft.com/whdc/device/media/WPD_drv.mspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This sample is based on the Parallax Basic Stamp II microcontroller to provide an example of a simple hardware device that&amp;nbsp;can have a WPD driver for it.&amp;nbsp;&amp;nbsp; Parallax provides an &lt;A class="" title="Basic Stamp Activity Kit for Windows Portable Devices" href="http://www.parallax.com/detail.asp?product_id=910-90005" mce_href="http://www.parallax.com/detail.asp?product_id=910-90005"&gt;activity kit&lt;/A&gt; that contains the hardware components for this sample&amp;nbsp;driver.&amp;nbsp; To&amp;nbsp;build the driver,&amp;nbsp;you need the&amp;nbsp;Windows Driver Kit&amp;nbsp;(v6000).&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;References&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;All WPD-related whitepapers are posted &lt;A class="" title="Windows Portable Devices Whitepapers" href="http://www.microsoft.com/whdc/device/netAttach/default.mspx" mce_href="http://www.microsoft.com/whdc/device/netAttach/default.mspx"&gt;here&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" title="Downloading WPD for Development" href="http://blogs.msdn.com/controlpanel/blogs/To%20download%20the%20pre-requisities,%20see%20http://blogs.msdn.com/wpdblog/pages/downloading-wpd-for-development.aspx" mce_href="To download the pre-requisities, see http://blogs.msdn.com/wpdblog/pages/downloading-wpd-for-development.aspx"&gt;More information&lt;/A&gt; on downloading the various SDKs.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2466855" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WDK/default.aspx">WDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/DRM/default.aspx">DRM</category></item><item><title>WPD and WMDM Side-by-side: An Application Development Perspective</title><link>http://blogs.msdn.com/wpdblog/archive/2007/03/24/wpd-and-wmdm-side-by-side-application-development.aspx</link><pubDate>Sat, 24 Mar 2007 20:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1943316</guid><dc:creator>wpdblog</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/1943316.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=1943316</wfw:commentRss><description>&lt;p&gt;This post will compare&amp;nbsp;WPD and the latest version of &lt;a href="http://msdn2.microsoft.com/en-us/library/bb231982.aspx" class="" title="Windows Media Device Manager 11" mce_href="http://msdn2.microsoft.com/en-us/library/bb231982.aspx"&gt;Windows Media Device Manager (WMDM)&lt;/a&gt;,&amp;nbsp;from an application developer's point of view.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;b&gt;Availability (aka SDK and Runtime Requirements)&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx" title="Windows SDK" mce_href="http://msdn.microsoft.com/en-us/windows/bb980924.aspx"&gt;Windows SDK&lt;/a&gt; contains the complete build environment&amp;nbsp;(headers, libs, sample code ...)&amp;nbsp;for&amp;nbsp;developing&amp;nbsp;a WPD application&amp;nbsp;for both 32 and 64-bit.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://msdn2.microsoft.com/en-us/windowsmedia/bb190309.aspx" class="" title="Windows Media Downloads" mce_href="http://msdn2.microsoft.com/en-us/windowsmedia/bb190309.aspx"&gt;Windows Media Format 11 SDK&lt;/a&gt;&amp;nbsp;(WMFSDK11) provides&amp;nbsp;headers and libs for WMDM 11.&amp;nbsp;&amp;nbsp;Since&amp;nbsp;WMFSDK11&amp;nbsp;is released in 32-bit, only 32-bit WMDM applications can be built.&amp;nbsp; On 64-bit Windows,&amp;nbsp;a 32-bit&amp;nbsp;WMDM application will run in SysWOW mode.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="border: medium none ; border-collapse: collapse;" class="MsoNormalTable" border="1" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr style=""&gt;
&lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 125.6pt; background-color: transparent;" valign="top" width="167"&gt;&lt;br&gt;&lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 229.5pt; background-color: transparent;" valign="top" width="306"&gt;&lt;b&gt;WMDM 11&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 247.5pt; background-color: transparent;" valign="top" width="330"&gt;&lt;b&gt;WPD&lt;/b&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 125.6pt; background-color: transparent;" valign="top" width="167"&gt;Operating Systems &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 229.5pt; background-color: transparent;" valign="top" width="330"&gt;Windows XP + Windows Media Format 11 Redistributable, Windows Vista &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 247.5pt; background-color: transparent;" valign="top" width="330"&gt;Windows XP + Windows Media Format 11 Redistributable, Windows Vista &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 125.6pt; background-color: transparent;" valign="top" width="167"&gt;Processors &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 229.5pt; background-color: transparent;" valign="top" width="306"&gt;X86, AMD64 (SysWOW mode only) &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 247.5pt; background-color: transparent;" valign="top" width="330"&gt;X86, AMD64 &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 125.6pt; background-color: transparent;" valign="top" width="167"&gt;SDKs&lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 229.5pt; background-color: transparent;" valign="top" width="306"&gt;Windows Media Format SDK 11 &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 247.5pt; background-color: transparent;" valign="top" width="330"&gt;Windows SDK &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Common Device-level Operations&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Both WPD and WMDM support basic device-level operations: enumeration of connected devices,&amp;nbsp;managing device-level properties, and querying of static device capabilities.&lt;/p&gt;
&lt;p&gt;WMDM's &lt;a href="http://msdn.microsoft.com/en-us/library/bb231801%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb231801(VS.85).aspx"&gt;IWMDMDeviceControl&lt;/a&gt; operations&amp;nbsp;internally delegate to the service provider (through &lt;a href="http://msdn.microsoft.com/en-us/library/bb231655%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb231655(VS.85).aspx"&gt;IMDSPDeviceControl&lt;/a&gt;), and would require the service provider to support these operations. While device playback control is not natively supported by the WPD API, WPD's extensibility mechanism makes it easy to add this as a custom command to your driver. For example, your WPD driver can support a custom Playback command that&amp;nbsp;your&amp;nbsp;application can invoke using &lt;a href="http://msdn.microsoft.com/en-us/library/dd375691%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd375691(VS.85).aspx"&gt;IPortableDevice::SendCommand&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="border: medium none ; border-collapse: collapse;" class="MsoNormalTable" border="1" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr style=""&gt;
&lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;&lt;b&gt;Operation&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;&lt;b&gt;Example WMDM API&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;&lt;b&gt;Suggested WPD API&lt;/b&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Enumerate attached devices &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDeviceManager2::EnumDevices2 &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceManager::GetDevices &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Enumerating device content &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMDevice::EnumStorage &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::EnumObjects &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Examine device capabilities &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMDevice::GetFormatSupport, IWMDMDevice2::GetFormatCapability &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceCapabilities:: GetSupportedContentTypes, GetSupportFormats &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;
&lt;p&gt;Retrieve device properties&lt;/p&gt;&lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMDevice::GetManufacturer &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceManager:: GetDeviceManufacturer&amp;nbsp;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif';"&gt;OR &lt;br&gt;&lt;/span&gt;IPortableDeviceProperties::GetValues(WPD_DEVICE_OBJECT_ID) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Write device&amp;nbsp;properties &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMDevice3::SetProperty &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceProperties::SetValues(WPD_DEVICE_OBJECT_ID) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Controlling device playback &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMDeviceControl::Play &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="401"&gt;- &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Common Object-level Operations&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A WPD object is analogous to a WMDM storage, and most WMDM storage operations have their equivalent WPD API.&amp;nbsp;&amp;nbsp; WPD is ObjectID-based, so each interface method that supports object-level operations receives&amp;nbsp;an Object Identifier&amp;nbsp;as a parameter.&amp;nbsp;&amp;nbsp; WMDM is interface-based, &lt;a href="http://msdn.microsoft.com/en-us/library/bb231928%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb231928(VS.85).aspx"&gt;IWMDMStorage&lt;/a&gt; represents a storage or a file, and&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/bb231909%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb231909(VS.85).aspx"&gt;IWMDMStorageControl&lt;/a&gt; implements the operations on a storage or a file.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For data object creation, both WPD and WMDM support transfer of protected Windows Media Digital Rights Management (WMDRM) content.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="border: medium none ; border-collapse: collapse;" class="MsoNormalTable" border="1" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr style=""&gt;
&lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;&lt;b&gt;Operation&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;&lt;b&gt;Example WMDM API&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;&lt;b&gt;Suggested WPD API&lt;/b&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Enumerating&amp;nbsp;objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMDevice::EnumStorage, IWMDMEnumStorage::Next &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::EnumObjects, IEnumPortableDeviceObjectIDs::Next &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Create a folder object &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorageControl::Insert3 &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::&amp;nbsp; CreateObjectWithPropertiesOnly &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Create a data object &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorageControl::Insert3 &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent:: CreateObjectWithPropertiesAndData &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Transfer object data from device &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorageControl::Read &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceResources::GetStream &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Move objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorageControl::Move &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::Move &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Copy objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::Copy &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Delete objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorageControl::Delete &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceContent::Delete &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Retrieve object properties &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorage4::GetSpecifiedMetadata &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceProperties::GetValues &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Write object properties &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;IWMDMStorage3::SetMetadata &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceProperties::SetValues &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Delete object properties &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="273"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceProperties::Delete &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Device Events&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are only 4&amp;nbsp;events that WMDM applications can receive: media arrival/removal, and device arrival/removal. WPD supports device-level and the more granular object-level events, plus built-in extensibility for &lt;a href="http://blogs.msdn.com/wpdblog/archive/2007/03/16/how-to-post-events-from-your-wpd-driver.aspx" title="Custom WPD Events" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/03/16/how-to-post-events-from-your-wpd-driver.aspx"&gt;custom events&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="border: medium none ; border-collapse: collapse;" class="MsoNormalTable" border="1" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr style=""&gt;
&lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;&lt;b&gt;Operation&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;&lt;b&gt;Example WMDM API&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;&lt;b&gt;Suggested WPD API&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Monitor object-level property changes 
&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceEventCallback::OnEvent (WPD_EVENT_OBJECT_UPDATED) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Monitor object-level arrival and removal &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceEventCallback::OnEvent (WPD_EVENT_OBJECT_ADDED, WPD_EVENT_OBJECT_REMOVED) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Monitor media arrival and removal &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMNotification::WMDMMessage (WMDM_MSG_MEDIA_ARRIVAL, WMDM_MSG_MEDIA_REMOVAL) &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceEventCallback::OnEvent (WPD_EVENT_OBJECT_ADDED, WPD_EVENT_OBJECT_REMOVED) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Monitor device removal &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMNotification::WMDMMessage (WMDM_MSG_DEVICE_REMOVAL) &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;IPortableDeviceEventCallback::OnEvent (WPD_EVENT_DEVICE_REMOVED) &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;
&lt;p&gt;Monitor device arrival&lt;/p&gt;&lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.7pt; background-color: transparent;" valign="top" width="274"&gt;IWMDMNotification::WMDMMessage (WMDM_MSG_DEVICE_ARRIVAL) &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="401"&gt;&lt;a href="http://blogs.msdn.com/wpdblog/archive/2007/03/17/how-to-receive-wpd-device-arrival-events.aspx" mce_href="http://blogs.msdn.com/wpdblog/archive/2007/03/17/how-to-receive-wpd-device-arrival-events.aspx"&gt;Subscribe&lt;/a&gt; to WPD interface arrival PnP event &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Advanced Operations&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Both WPD and WMDM provide some extensibility mechanism for sending device-specific commands.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb231793.aspx" class="" title="IWMDMDevice3::DeviceIoControl" mce_href="http://msdn2.microsoft.com/en-us/library/bb231793.aspx"&gt;IWMDMDevice3::DeviceIoControl&lt;/a&gt; is used for&amp;nbsp;packaging and sending&amp;nbsp;commands only to Media Transfer Protocol&amp;nbsp;(MTP) portable media players.&lt;/p&gt;
&lt;p&gt;WPD API methods&amp;nbsp;that map to&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/aa528314.aspx" title="WPD Commands" mce_href="http://msdn.microsoft.com/en-us/library/aa528314.aspx"&gt;Command GUIDs&lt;/a&gt; internally delegate to &lt;a href="http://msdn.microsoft.com/en-us/library/dd375691%28VS.85%29.aspx" title="IPortableDevice::SendCommand" mce_href="http://msdn.microsoft.com/en-us/library/dd375691(VS.85).aspx"&gt;IPortableDevice::SendCommand&lt;/a&gt;.&amp;nbsp;&amp;nbsp;Applications&amp;nbsp;can&amp;nbsp;invoke these commands with additional options or parameters, such as the use of Read or Write&amp;nbsp;IOCTLs for access control.&lt;/p&gt;
&lt;p&gt;In addition, for better performance, WPD supports batching of property writes and retrievals across multiple objects, either per format or using a list of Object Identifiers.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="border: medium none ; border-collapse: collapse;" class="MsoNormalTable" border="1" cellpadding="0" cellspacing="0"&gt;
&lt;tbody&gt;
&lt;tr style=""&gt;
&lt;td style="border: 1pt solid black; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;&lt;b&gt;Operation&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 200.55pt; background-color: transparent;" valign="top" width="267"&gt;&lt;b&gt;Example WMDM API&lt;/b&gt; &lt;/td&gt;
&lt;td style="border-style: solid solid solid none; border-color: black black black rgb(240, 240, 240); border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="407"&gt;&lt;b&gt;Suggested WPD API&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Retrieve properties of multiple objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 200.55pt; background-color: transparent;" valign="top" width="267"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="407"&gt;IPortableDevicePropertiesBulk::&amp;nbsp; QueueGetValuesByObjectList, OR QueueGetValuesByObjectFormat &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="407"&gt;Set properties of multiple objects &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 200.55pt; background-color: transparent;" valign="top" width="267"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="407"&gt;IPortableDevicePropertiesBulk:: QueueSetValuesByObjectList &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Send device-specific commands &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 200.55pt; background-color: transparent;" valign="top" width="267"&gt;IWMDMDevice::SendOpaqueCommand OR IWMDMDevice3::DeviceIoControl &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="407"&gt;IPortableDevice::SendCommand &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=""&gt;
&lt;td style="border-style: none solid solid; border-color: rgb(240, 240, 240) black black; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 95.4pt; background-color: transparent;" valign="top" width="127"&gt;Cancel an operation &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 200.55pt; background-color: transparent;" valign="top" width="267"&gt;- &lt;/td&gt;
&lt;td style="border-style: none solid solid none; border-color: rgb(240, 240, 240) black black rgb(240, 240, 240); border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 205.05pt; background-color: transparent;" valign="top" width="407"&gt;IPortableDevice*::Cancel, e.g. IPortableDeviceProperties::Cancel &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Stability&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;WMDM loads registered service providers (SPs) within the same process as the application. Any crash or instability in the device driver or SP could cause undue crashes in the application process, or worse, trigger bluescreens if kernel mode drivers are involved.&lt;/p&gt;
&lt;p&gt;WPD drivers are sandboxed in the User Mode Driver Framework (UMDF) host process, and gain the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511005.aspx" title="UMDF Stability and Security" mce_href="http://msdn2.microsoft.com/en-us/library/aa511005.aspx"&gt;stability and security benefits&lt;/a&gt; of a UMDF driver. If a WPD driver crashes, only the sandbox process will be affected; the WPD application process is isolated from the driver instability. In a similar way, a WPD driver's process&amp;nbsp;is not affected when a WPD client application crashes.&lt;/p&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;&lt;b&gt;&lt;u&gt;The Verdict&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;WPD and WMDM have a lot of overlap in&amp;nbsp;terms of the&amp;nbsp;device operations that each enables.&amp;nbsp;&amp;nbsp; WMDM is geared&amp;nbsp;specifically towards portable media player applications and scenarios,&amp;nbsp;with media-centric metadata schema, support for device playback control, and direct access to Windows Media Digital Rights Management (WMDRM)&amp;nbsp;application interfaces.&amp;nbsp;&amp;nbsp;&amp;nbsp;WPD supports much of what WMDM does (including WMDRM transfers), &lt;i&gt;plus &lt;/i&gt;many key advantages over WMDM, including&amp;nbsp;stability, UMDF integration,&amp;nbsp;comprehensive property and content type&amp;nbsp;schema (beyond portable media devices),&amp;nbsp;extensibility for custom device solutions, broader device support,&amp;nbsp;and&amp;nbsp;not to mention, great &lt;a href="http://msdn2.microsoft.com/en-us/library/aa973613.aspx" class="" title="WpdInfo" mce_href="http://msdn2.microsoft.com/en-us/library/aa973613.aspx"&gt;development tools&lt;/a&gt;.&lt;/p&gt;
&lt;p mce_keep="true"&gt;For applications that&amp;nbsp;would&amp;nbsp;like to&amp;nbsp;connect to, control,&amp;nbsp;and manage content&amp;nbsp;across a &lt;i&gt;wide range of devices&lt;/i&gt; (digital still cameras, portable media players, cellular phones, third-party device classes,&amp;nbsp;and more), WPD is the clear choice.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; line-height: normal;"&gt;&lt;i&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif';"&gt;&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt; line-height: normal;"&gt;&lt;i&gt;&lt;span style="font-size: 10pt; font-family: 'Arial','sans-serif';"&gt;This posting is provided "AS IS" with no warranties and confers no rights.&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1943316" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category></item><item><title>Working with WMDRM Protected Content using WPD</title><link>http://blogs.msdn.com/wpdblog/archive/2007/02/09/working-with-wmdrm-protected-content-using-wpd.aspx</link><pubDate>Sat, 10 Feb 2007 02:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1638560</guid><dc:creator>wpdblog</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/wpdblog/comments/1638560.aspx</comments><wfw:commentRss>http://blogs.msdn.com/wpdblog/commentrss.aspx?PostID=1638560</wfw:commentRss><description>&lt;p&gt;&lt;b&gt;Setting up your WPD&amp;nbsp;application to handle protected&amp;nbsp;WMDRM content&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The WPD API supports the transfer and licensing&amp;nbsp;operations for &lt;a href="http://www.microsoft.com/windows/windowsmedia/forpros/drm/default.mspx" class="" title="WMDRM" mce_href="http://www.microsoft.com/windows/windowsmedia/forpros/drm/default.mspx"&gt;Windows Media Digital Rights Management&lt;/a&gt; (WMDRM) content.&lt;/p&gt;
&lt;p&gt;This &lt;a href="http://msdn.microsoft.com/en-us/library/dd375717%28VS.85%29.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd375717(VS.85).aspx"&gt;MSDN article&lt;/a&gt; describes&amp;nbsp;two &lt;b&gt;additional &lt;/b&gt;properties that are required to enable your WPD application to transfer protected content.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table rules="rows" border="0" cols="2" frame="below"&gt;
&lt;tbody&gt;
&lt;tr valign="top"&gt;
&lt;td class="blue" width="50%"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;/td&gt;
&lt;td class="blue" width="20%"&gt;&lt;b&gt;Vartype&lt;/b&gt;&lt;/td&gt;
&lt;td class="blue" width="30%"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="50%"&gt;WPD_CLIENT_WMDRM_APPLICATION_PRIVATE_KEY &lt;/td&gt;
&lt;td width="20%"&gt;VT_VECTOR | VT_UI1 &lt;/td&gt;
&lt;td width="30%"&gt;Specifies the application's private key.&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="50%"&gt;WPD_CLIENT_WMDRM_APPLICATION_CERTIFICATE &lt;/td&gt;
&lt;td width="20%"&gt;VT_VECTOR | VT_UI1 &lt;/td&gt;
&lt;td width="30%"&gt;Specifies the application's certificate.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;To initialize WPD for protected content, call &lt;i&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd375690%28VS.85%29.aspx" title="IPortableDevice::Open" mce_href="http://msdn.microsoft.com/en-us/library/dd375690(VS.85).aspx"&gt;IPortableDevice::Open()&lt;/a&gt; &lt;/i&gt;with the above parameters added to the pClientInfo IPortableDeviceValues.&amp;nbsp;&amp;nbsp;If this succeeds, you can use the derived&amp;nbsp;&lt;i&gt;IPortableDeviceContent &lt;/i&gt;interface (from &lt;i&gt;IPortableDevice::Content()&lt;/i&gt;) to transfer protected (and clear)&amp;nbsp;content using &lt;i&gt;IPortableDeviceContent::CreateObjectWithPropertiesAndData().&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;To obtain a private application key and certificate, visit &lt;a href="http://www.microsoft.com/windows/windowsmedia/licensing/Licensing_DRM_Apps.aspx" mce_href="http://www.microsoft.com/windows/windowsmedia/licensing/Licensing_DRM_Apps.aspx"&gt;this link&lt;/a&gt;. &lt;br&gt;&lt;a href="http://www.microsoft.com/windows/windowsmedia/licensing/Licensing_DRM_Apps.aspx"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Transferring Content&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To transfer WMDRM protected content, use &lt;i&gt;IPortableDeviceContent::CreateObjectWithPropertiesAndData().&amp;nbsp;&amp;nbsp; &lt;/i&gt;The same CreateObjectWithPropetiesAndData API call can be used for &lt;b&gt;both &lt;/b&gt;protected and clear content without additional&amp;nbsp;options.&amp;nbsp;&amp;nbsp; The WPD API will automatically select the protected or clear channel&amp;nbsp;depending on whether the content is protected or clear.&amp;nbsp;&amp;nbsp;&amp;nbsp;It&amp;nbsp;interfaces with the WMDRM Secure Content Provider to process the WMDRM licenses.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Transferring Known Clear Content&lt;/b&gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;If you've enabled&amp;nbsp;WPD&amp;nbsp;to handle protected content, but you know that a specific&amp;nbsp;file is not protected, you can tell WPD to skip the DRM processing by&amp;nbsp;setting&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/dd375699%28VS.85%29.aspx" title="WPD_API_OPTION_USE_CLEAR_DATA_STREAM" mce_href="http://msdn.microsoft.com/en-us/library/dd375699(VS.85).aspx"&gt;WPD_API_OPTION_USE_CLEAR_DATA_STREAM&lt;/a&gt; option to &lt;b&gt;TRUE &lt;/b&gt;in the input IPortableDeviceValues when calling &lt;i&gt;IPortableDeviceContent::CreateObjectWithPropertiesAndData() &lt;/i&gt;for clear content.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Accessing Metering Operations using IWMDRMDeviceApp&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;WPD&amp;nbsp;provides a mechanism&amp;nbsp;to access the&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/bb231938%28VS.85%29.aspx" title="IWMDRMDeviceApp" mce_href="http://msdn.microsoft.com/en-us/library/bb231938(VS.85).aspx"&gt;&lt;i&gt;IWMDRMDeviceApp &lt;/i&gt;APIs&lt;/a&gt; for license updates and metering data retrieval.&amp;nbsp; &lt;b&gt;To access IWMDRMDeviceApp through WPD&lt;/b&gt;, call &lt;i&gt;QueryInterface&lt;/i&gt; on &lt;i&gt;IID_IWMDRMDeviceApp&lt;/i&gt; from the &lt;i&gt;IStream&amp;nbsp;&lt;/i&gt;returned from &lt;i&gt;IPortableDeviceContent::CreateObjectWithPropertiesAndData()&lt;/i&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;This IWMDRMDeviceApp instance&amp;nbsp;tied to the&amp;nbsp;IPortableDevice connection to your WMDRM-compatible device, and not the specific content&amp;nbsp;where the IStream was obtained.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WPD internally wraps the metering APIs and makes it accessible to your application.&amp;nbsp;&amp;nbsp; Your application&amp;nbsp;uses a constant for the IWMDMDevice* parameter:&amp;nbsp; &lt;b&gt;WMDRMDEVICEAPP_USE_WPD_DEVICE_PTR&lt;/b&gt;.&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;IStream*&lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;pDataStream = NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;IWMDRMDeviceApp* &lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;pWMDRMApp &lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;= NULL;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;// ... Initialization &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;hr&amp;nbsp;= pPortableDeviceContent-&amp;gt;CreateObjectWithPropertiesAndData(&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;pValues,&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&amp;amp;pDataStream,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;amp;dwOptimalWriteBufferSize,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;NULL);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;// ... Transfer the protected WMDRM content &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;pDataStream-&amp;gt;Write(pData, cbData, &amp;amp;cbWritten);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;pDataStream-&amp;gt;Commit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;hr = pDataStream-&amp;gt;QueryInterface(IID_IWMDRMDeviceApp, &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void**)&amp;amp;pWMDRMApp);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;if (SUCCEEDED(hr))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;DWORD dwStatus&amp;nbsp;= 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=""&gt;&amp;nbsp;&lt;/span&gt;// Call metering operations on the current device using the WPD device pointer&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;span style=""&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=""&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=""&gt;&amp;nbsp;&lt;/span&gt;hr = pWMDRMApp-&amp;gt;QueryDeviceStatus((IWMDMDevice *)WMDRMDEVICEAPP_USE_WPD_DEVICE_PTR, &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&amp;amp;dwStatus);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;The same pre-requisitie with the application private key and certificate applies here as well.&amp;nbsp;&amp;nbsp; If the key/certificate is invalid or if the WMDRM system fails to initialize, the QueryInferface call will fail.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;&lt;b&gt;Update [March 13, 2007]:&lt;/b&gt;&amp;nbsp; The above method to acquire the IWMDRMDeviceApp interface from the IStream pointer is just a &lt;i&gt;convenience&lt;/i&gt; if your application is already doing a &lt;i&gt;prior protected&amp;nbsp;content transfer&lt;/i&gt;&lt;b&gt;,&lt;/b&gt; before proceeding on to do metering and license synchronization operations.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;Our recommendation for most applications that need to access IWMDRMDeviceApp is to initialize IWMDRMDeviceApp directly as this does not require your application&amp;nbsp;to transfer protected content or hold on to the transfer interfaces in order to do device metering and license sync.&amp;nbsp;&amp;nbsp; For details, refer to &lt;a href="http://msdn.microsoft.com/en-us/library/bb231629%28VS.85%29.aspx" title="Handling Protected Content using WMDRMDeviceApp" mce_href="http://msdn.microsoft.com/en-us/library/bb231629(VS.85).aspx"&gt;this MSDN article&lt;/a&gt; entitled "Handling Protected Content in the Application."&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p mce_keep="true"&gt;&lt;b&gt;Update [May 5, 2007]:&amp;nbsp; &lt;/b&gt;The whitepaper (and sample code)&amp;nbsp;on initializing IWMDRMDeviceApp for WPD is&amp;nbsp;now&amp;nbsp;posted &lt;a href="http://www.microsoft.com/whdc/device/media/WMDRM_API.mspx" class="" title="Accessing WMDRM APIs from WPD" mce_href="http://www.microsoft.com/whdc/device/media/WMDRM_API.mspx"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p mce_keep="true"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;This posting is provided "AS IS" with no warranties, and confers no rights.&lt;/i&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1638560" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/wpdblog/archive/tags/SDK/default.aspx">SDK</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/WMDM/default.aspx">WMDM</category><category domain="http://blogs.msdn.com/wpdblog/archive/tags/DRM/default.aspx">DRM</category></item></channel></rss>