Provides methods for identifying a device service for a portable device that supports WPD (Windows Portable Devices) for device enumeration.
public : static class ServiceDevice
static struct winrt::Windows::Devices::Portable::ServiceDevice
public static class ServiceDevice
Public Shared Class ServiceDevice
// This class does not provide a public constructor.
Windows Desktop Extension SDK (introduced v10.0.10240.0)
Windows.Devices.Portable.PortableDeviceContract (introduced v1)
To access these services, you must declare the device service in the device capabilities section of the app manifest file. For a list of the GUIDs representing the device services, see Windows.Devices.Portable. To access the device services, you must declare the device service in the capabilities section of the app manifest file. For a list of the GUIDs representing the device services, see Windows.Devices.Portable.
The GetDeviceSelector and GetDeviceSelectorFromServiceId methods get selector strings that are passed to the Windows.Devices.Enumeration API to find portable device services. The Enumerating Common Devices tutorial explains how to use selector strings to discover available devices.
Examples of device services are the Media Transfer Protocol (MTP) device services that allow access to device status, contacts, calendar, tasks, and ringtones on a device. For more information, see MTP Device Services for Windows.
The Portable Device Services Sample demonstrates how to access the device service once you have discovered it.
Access to a device service using this API is only available to Microsoft Store device apps given privileged access to a device by the device manufacturer. For more information about Microsoft Store device apps, see Windows 8 Device Experience: .