WPD Application Programming Interface

Overview of the WPD Application Programming Interface technology.

To develop WPD Application Programming Interface, you need these headers:

For programming guidance for this technology, see:

Functions

Title Description
Advise The Advise method registers an application-defined callback that receives device events.
Advise Registers an application-defined callback object that receives service events.
Cancel The Cancel method cancels a pending operation.
Cancel The Cancel method cancels a pending operation on this interface.
Cancel The Cancel method cancels a pending request on this interface.
Cancel The Cancel method cancels a pending operation called on this interface.
Cancel The Cancel method cancels a call in progress on this interface.
Cancel The Cancel method cancels a pending call.
Cancel The Cancel method cancels a pending properties request.
Cancel The Cancel method cancels a pending operation.
Cancel Cancels a pending operation on this interface.
Cancel Cancels a pending operation.
Cancel Cancels a pending method invocation.
Cancel Cancels a pending request to connect or disconnect an MTP/Bluetooth device.
Capabilities The Capabilities method retrieves an interface used to query the capabilities of a portable device.
Capabilities Retrieves the service capabilities.
Clone The Clone method duplicates the current IEnumPortableDeviceObjectIDs interface.
Close The Close method closes the connection with the device.
Close Releases the connection to the service.
Connect Sends an asynchronous connection request to the MTP/Bluetooth device.
Content The Content method retrieves an interface that you can use to access objects on a device.
Content Retrieves access to the service content.
Copy The Copy method copies objects from one location on a device to another.
CreateObjectWithPropertiesAndData The CreateObjectWithPropertiesAndData method creates an object with both properties and data on the device.
CreateObjectWithPropertiesOnly The CreateObjectWithPropertiesOnly method creates an object with only properties on the device.
CreateResource The CreateResource method creates a resource.
Delete The Delete method deletes one or more objects from the device.
Delete The Delete method deletes specified properties from a specified object on a device.
Delete The Delete method deletes one or more resources from the object identified by the pszObjectID parameter.
Disconnect Sends an asynchronous disconnect request to the MTP/Bluetooth device.
EnumObjects The EnumObjects method retrieves an interface that is used to enumerate the immediate child objects of an object. It has an optional filter that can enumerate objects with specific properties.
GetCommandOptions The GetCommandOptions method retrieves all the supported options for the specified command on the device.
GetCommandOptions Retrieves the options of a WPD command.
GetDeviceDescription Retrieves the description of a device.
GetDeviceForService Retrieves the device associated with the specified service.
GetDeviceFriendlyName Retrieves the user-friendly name for the device.
GetDeviceManufacturer Retrieves the name of the device manufacturer.
GetDeviceProperty Retrieves a property value stored by the device on the computer. (These are not standard properties that are defined by Windows Portable Devices.).
GetDevices Retrieves a list of portable devices connected to the computer.
GetDeviceServices Retrieves a list of the services associated with the specified device.
GetEventAttributes Retrieves the attributes of an event.
GetEventOptions The GetEventOptions method retrieves all the supported options for the specified event on the device.
GetEventParameterAttributes Retrieves the attributes of an event parameter.
GetFixedPropertyAttributes The GetFixedPropertyAttributes method retrieves the standard property attributes for a specified property and format.
GetFormatAttributes Retrieves the attributes of a format.
GetFormatPropertyAttributes Retrieves the attributes of a format property.
GetFormatRenderingProfiles Retrieves the rendering profiles of a format.
GetFunctionalCategories The GetFunctionalCategories method retrieves all functional categories supported by the device.
GetFunctionalObjects The GetFunctionalObjects method retrieves all functional objects that match a specified category on the device.
GetInheritedServices Retrieves the services having the specified inheritance type.
GetMethodAttributes Retrieves the attributes used to describe a given method.
GetMethodParameterAttributes Retrieves the attributes used to describe a given method parameter.
GetObjectID The GetObjectID method retrieves the object ID of the resource that was written to the device. This method is only valid after calling IStream::Commit on the data stream.
GetObjectIDsFromPersistentUniqueIDs The GetObjectIDsFromPersistentUniqueIDs method retrieves the current object ID of one or more objects, given their persistent unique IDs (PUIDs).
GetPnPDeviceID The GetPnPDeviceID method retrieves the Plug and Play (PnP) device identifier that the application used to open the device.
GetPnPID Retrieves the connector's Plug and Play (PnP) device identifier.
GetPnPServiceID Retrieves a Plug and Play (PnP) identifier for the service.
GetPrivateDevices The GetPrivateDevices method retrieves a list of private portable devices connected to the computer. These private devices are only accessible through an application that is designed for these particular devices.
GetProperty Retrieves a property for the given MTP/Bluetooth Bus Enumerator device.
GetPropertyAttributes The GetPropertyAttributes method retrieves attributes of a specified object property on a device.
GetResourceAttributes The GetResourceAttributes method retrieves all attributes from a specified resource in an object.
GetServiceObjectID Retrieves an object identifier for the service. This object identifier can be used to access the properties of the service, for example.
GetStream The GetStream method gets an IStream interface with which to read or write the content data in an object on a device. The retrieved interface enables you to read from or write to the object data.
GetSupportedCommands The GetSupportedCommands method retrieves a list of all the supported commands for this device.
GetSupportedCommands Retrieves the commands supported by the service.
GetSupportedContentTypes The GetSupportedContentTypes method retrieves all supported content types for a specified functional object type on a device.
GetSupportedEvents The GetSupportedEvents method retrieves the supported events for this device.
GetSupportedEvents Retrieves the events supported by the service.
GetSupportedFormatProperties The GetSupportedFormatProperties method retrieves the properties supported by objects of a specified format on the device.
GetSupportedFormatProperties Retrieves the properties supported by the service for the specified format.
GetSupportedFormats The GetSupportedFormats method retrieves the supported formats for a specified object type on the device. For example, specifying audio objects might return WPD_OBJECT_FORMAT_WMA, WPD_OBJECT_FORMAT_WAV, and WPD_OBJECT_FORMAT_MP3.
GetSupportedFormats Retrieves the formats supported by the service.
GetSupportedMethods Retrieves the methods supported by the service.
GetSupportedMethodsByFormat Retrieves the methods supported by the service for the specified format.
GetSupportedProperties The GetSupportedProperties method retrieves a list of properties that a specified object supports. Note that not all of these properties may actually have values.
GetSupportedResources The GetSupportedResources method retrieves a list of resources that are supported by a specific object.
GetValues The GetValues method retrieves a list of specified properties from a specified object on a device.
Invoke Synchronously invokes a method.
InvokeAsync Asynchronously invokes a method.
Methods Retrieves the IPortableDeviceServiceMethods interface that is used to invoke custom functionality on the service.
Move The Move method moves one or more objects from one location on the device to another.
Next The Next method retrieves the next one or more object IDs in the enumeration sequence.
OnComplete Indicates that a callback method has completed execution.
OnEnd The OnEnd method is called by the SDK when a bulk operation that is started by IPortableDevicePropertiesBulk::Start is completed.
OnEvent The OnEvent method is called by the SDK to notify the application about asynchronous events.
OnProgress The OnProgress method is called by the SDK when a bulk operation started by IPortableDevicePropertiesBulk::Start has sent data to the device and received some information back.
OnStart The OnStart method is called by the SDK when a bulk operation started by IPortableDevicePropertiesBulk::Start is about to begin.
Open The Open method opens a connection between the application and the device.
Open Opens a connection to the service.
Properties The Properties method retrieves the interface that is required to get or set properties on an object on the device.
QueueGetValuesByObjectFormat The QueueGetValuesByObjectFormat interface queues a request for properties of objects of a specific format on a device.
QueueGetValuesByObjectList The QueueGetValuesByObjectList method queues a request for one or more specified properties from one or more specified objects on the device.
QueueSetValuesByObjectList The QueueSetValuesByObjectList method queues a request to set one or more specified values on one or more specified objects on the device.
RefreshDeviceList The RefreshDeviceList method refreshes the list of devices that are connected to the computer.
Reset The Reset method resets the enumeration sequence to the beginning.
SeekInUnits The SeekInUnits method performs a seek on a stream, based on alternate units.
SendCommand The SendCommand method sends a command to the device and retrieves the results synchronously.
SendCommand Sends a standard WPD command and its parameters to the service.
SetProperty Sets the given property on the MTP/Bluetooth Bus Enumerator device.
SetValues The SetValues method adds or modifies one or more properties on a specified object on a device.
Skip The Skip method skips a specified number of objects in the enumeration sequence.
Start The Start method starts a queued operation.
Transfer The Transfer method retrieves an interface that is used to read from or write to the content data of an existing object resource.
Unadvise The Unadvise method unregisters a client from receiving callback notifications. You must call this method if you called Advise previously.
Unadvise Unregisters a service event callback object.
UpdateObjectWithPropertiesAndData Updates an object by using properties and data found on the device.

Interfaces

Title Description
IEnumPortableDeviceObjectIDs The IEnumPortableDeviceObjectIDs interface enumerates the objects on a portable device. Get this interface initially by calling IPortableDeviceContent::EnumObjects on a device.
IPortableDevice The IPortableDevice interface provides access to a portable device.
IPortableDeviceCapabilities The IPortableDeviceCapabilities interface a variety of device capabilities, including supported formats, commands, and functional objects. You can retrieve this interface from a device by calling IPortableDevice::Capabilities.
IPortableDeviceConnector Defines methods used for connection-management and property-retrieval for a paired MTP/Bluetooth device.
IPortableDeviceContent The IPortableDeviceContent interface provides methods to create, enumerate, examine, and delete content on a device. To get this interface, call IPortableDevice::Content.
IPortableDeviceContent2 Defines additional methods that provide access to content found on a device.
IPortableDeviceDataStream The IPortableDeviceDataStream interface exposes additional methods on an IStream that is used for data transfers.
IPortableDeviceEventCallback The IPortableDeviceEventCallback interface implemented by the application to receive asynchronous callbacks if an application has registered to receive them by calling IPortableDevice::Advise.
IPortableDeviceManager Enumerates devices that are connected to the computer and provides a simple way to request installation information, including manufacturer, friendly name, and description.
IPortableDeviceProperties The IPortableDeviceProperties interface retrieves, adds, or deletes properties from an object on a device, or the device itself.
IPortableDevicePropertiesBulk The IPortableDevicePropertiesBulk interface queries or sets multiple properties on multiple objects on a device, asynchronously.
IPortableDevicePropertiesBulkCallback The IPortableDevicePropertiesBulkCallback interface is implemented by the application to track the progress of an asynchronous operation that was begun by using the IPortableDevicePropertiesBulk interface.After the application calls IPortableDevicePropertiesBulk::Start, Windows Portable Devices calls IPortableDevicePropertiesBulkCallback::OnStart first, and then repeatedly calls IPortableDevicePropertiesBulkCallback::OnProgress with information until the operation is completed or the application calls IPortableDevicePropertiesBulk::Cancel or returns an error value for OnProgress. Finally, regardless of whether the operation completed successfully, Windows Portable Devices calls IPortableDevicePropertiesBulkCallback::OnEnd.
IPortableDeviceResources The IPortableDeviceResources interface provides access to an object's raw data. Use this interface to read or write resources in an object. To get this interface, call IPortableDeviceContent::Transfer.
IPortableDeviceService Provides access to a service.
IPortableDeviceServiceCapabilities Retrieves information describing the capabilities of a service.
IPortableDeviceServiceManager Retrieves the device associated with a service and the list of services found on a device.
IPortableDeviceServiceMethodCallback Contains a method that applications use to track the completion of a callback method. Applications that call service methods asynchronously may implement this interface, and supply it as a parameter to IPortableDeviceServiceMethods::InvokeAsync.
IPortableDeviceServiceMethods Invokes, or cancels invocation of, a method on a service.
IPortableDeviceUnitsStream The IPortableDeviceUnitsStream interface provides a way to operate, or seek, on a stream by using alternate units, such as frames or milliseconds.