IPortableDeviceConnector::SetProperty method (portabledeviceconnectapi.h)
The SetProperty method sets the given property on the MTP/Bluetooth Bus Enumerator device.
Syntax
HRESULT SetProperty(
[in] const DEVPROPKEY *pPropertyKey,
[in] DEVPROPTYPE PropertyType,
[in] const BYTE *pData,
[in] UINT32 cbData
);
Parameters
[in] pPropertyKey
A pointer to a property key for the given property.
[in] PropertyType
The property type.
[in] pData
A pointer to the property data.
[in] cbData
The size (in bytes) of the property data.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
The specified property key is not supported. |
Remarks
Before calling this method, an application must verify that it has Administrator user rights.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | portabledeviceconnectapi.h |
Library | PortableDeviceGuids.lib |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for