Udostępnij za pośrednictwem


Windows.Devices.Portable Namespace

Windows Portable Devices (WPD) enables computers to communicate with attached media and storage devices. This namespace provides methods for identifying Windows Portable Device (WPD) services and storage.

Classes

ServiceDevice

Provides methods for identifying a device service for a portable device that supports WPD (Windows Portable Devices) for device enumeration.

StorageDevice

Provides methods for accessing the storage functionality of a portable device that supports WPD. Removable storage devices include:

  • USB mass storage flash drives and cameras
  • Media Transfer Protocol (MTP) music players, phones, and cameras
  • Picture Transfer Protocol (PTP) cameras

Enums

ServiceDeviceType

Indicates the type of a portable device service.

Remarks

This table lists the GUIDs of standard MTP device services that can be passed to the serviceId parameter. For more information about these MTP devices services, see MTP Device Services for Windows.

While the standard device services are all MTP device services, non-MTP devices may also support services. An MTP device may also support additional device services that are not standard device services. Check with the device manufacturer to find out what device services are supported on a given WPD device.

ServiceGUID
MTP Contact ServiceDD04D5FC-9D6E-4F76-9DCF-ECA6339B7389
MTP Calendar ServiceE4DFDBD3-7F04-45E9-9FA1-5CA0EAEB0AE3
MTP Notes Service5c017aea-e706-4719-8cc0-a303836fd321
MTP Task ServiceBB340C54-B5C6-491D-8827-28D0E7631903
MTP Status Service0B9F1048-B94B-DC9A-4ED7-FE4FED3A0DEB
MTP Hints Servicec8a98b1f-6b19-4e79-a414-67ea4c39eec2
MTP Device Metadata Service332ffe6a-af65-41e1-a0af-d3e2627bdf54
MTP Ringtone Serviced0eace0e-707d-4106-8d38-4f560e6a9f8e
MTP Enumeration Synchronization Service28d3aac9-c075-44be-8881-65f38d305909
MTP Anchor Synchronization Service056d8b9e-ad7a-44fc-946f-1d63a25cda9a

To access these services, you must declare the device service in the device capabilities section of the appxmanifest file. For example:

<Capabilities>
  <DeviceCapability Name="0B9F1048-B94B-DC9A-4ED7-FE4FED3A0DEB"/> <!-- Status Device Service -->
  <DeviceCapability Name="D0EACE0E-707D-4106-8D38-4F560E6A9f8E"/> <!-- Ringtones Device Service -->
</Capabilities>

This table lists GUIDs commonly used when accessing storage functionality on WPD devices using the WPD APIs. These can also be declared in the device capabilities section of the appxmanifest file.

Storage FunctionalityGUID
WPD Storage6AC27878-A6FA-4155-BA85-F98F491D4F33
WPD Storage (private devices)BA0C718F-4DED-49B7-BDD3-FABE28661211
Imaging Devices (for example, cameras)6BDD1FC6-810F-11D0-BEC7-08002BE2092F

See also