Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » MTP   (RSS)

Where is wpdmtpextensions.h?

The header file - Wpdmtpextensions.h - has been referenced in several of my posts and is needed to talk MTP to the device through WPD. The header file is not available in the Vista SDK/WDK or the WMP 11 SDK, but is planned for inclusion in the Windows
Posted by dimeby8 | 0 Comments
Filed under: ,

MTP array properties (AINT*/AUINT*) in WPD

MTP allows for a wide range of array-based data types ranging from an array of bytes (AINT8/AUINT8) to an array of GUIDs (AINT128/AUINT128). Check out section 3.2.1 and 3.2.2 in the MTP specification for a complete list and definition. Unfortunately the
Posted by dimeby8 | 1 Comments
Filed under: ,

Accessing MTP vendor extended properties through WPD

Apart from the standard device and object properties defined in the MTP specification, device vendors are free to add their own properties. The codes for these properties must lie in the vendor-extension range as defined by the MTP spec in section 3.3.1.
Posted by dimeby8 | 0 Comments
Filed under: ,

Sending MTP commands through WPD (Part 3 - data from device)

Let's use the GetDevicePropValue command (MTP spec - section D.2.21) to illustrate this. GetDevicePropValue takes one parameter - the device property code that we want to retrieve the current value for. We'll retrieve the BatteryLevel device property
Posted by dimeby8 | 1 Comments
Filed under: ,

Sending MTP commands through WPD (Part 2 - data to the device)

We'll pick the SetDevicePropValue MTP command (MTP spec - section D.2.22) to illustrate this example. This command requires the device property code as a parameter. We'll try setting the DateTime property (MTP spec - section C.2.18). The DateTime property
Posted by dimeby8 | 0 Comments
Filed under: ,

Creating an MTP string

In some of our later examples, we'll have to send MTP strings to the device. MTP strings are defined in the MTP spec in section 3.2.3. Briefly, the first byte is the number of Unicode characters to follow (including the NULL terminator), the remaining
Posted by dimeby8 | 1 Comments
Filed under:

Listening to MTP events

MTP devices can fire events as well. These events are used to educate the PC (or the initiator) about any change in device status. Think of a scenario where you connect a camera extension to an MTP cellphone. The configuration of the cellphone has now
Posted by dimeby8 | 1 Comments
Filed under: ,

Sending MTP commands through WPD (Part 1 - without a data phase)

Most WPD API are wrappers around the SendCommand API. The documentation for the SendCommand API provides a pretty good example on how to send commands to a driver. So rather than reinvent the wheel, we'll take a look at how we can use the SendCommand
Posted by dimeby8 | 2 Comments
Filed under: ,

What is MTP anyway?

MTP is the successor to PTP (Picture Transfer Protocol) that has been used by cameras. Since PTP was geared towards pictures (the first P in PTP), MTP was designed to be a more media-centric solution (and hence the M for media in MTP) and offers M ore-
Posted by dimeby8 | 2 Comments
Filed under: ,
 
Page view tracker