IPortableDeviceProperties::Delete method (portabledeviceapi.h)
The Delete method deletes specified properties from a specified object on a device.
Syntax
HRESULT Delete(
[in] LPCWSTR pszObjectID,
[in] IPortableDeviceKeyCollection *pKeys
);
Parameters
[in] pszObjectID
Pointer to a null-terminated string that specifies the ID of the object whose properties you will delete. To specify the device, use WPD_DEVICE_OBJECT_ID.
[in] pKeys
Pointer to an IPortableDeviceKeyCollection interface that specifies which properties to delete. For a list of properties defined by Windows Portable Devices, see Properties and Attributes.
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. |
|
One or more property values could not be deleted. |
|
The required pointer argument was NULL. |
Remarks
Properties can be deleted only if their WPD_PROPERTY_ATTRIBUTE_CAN_DELETE attribute is True. This attribute can be retrieved by calling GetPropertyAttributes.
The driver has no way to indicate partial success; that is, if only some properties could be deleted, the driver will return S_FALSE, but this method does not indicate which properties were successfully deleted. The only way to learn which properties were deleted is to request all properties by calling IPortableDeviceProperties::GetValues.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | portabledeviceapi.h |
Library | PortableDeviceGUIDs.lib |