IPortableDeviceProperties::Delete

banner art

Previous Next

IPortableDeviceProperties::Delete

The Delete method deletes specified properties from a specified object on a device.

Syntax

  HRESULT Delete(
  LPCWSTR  pszObjectID,
  IPortableDeviceKeyCollection*  pKeys
);

Parameters

pszObjectID

[in]  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.

pKeys

[in]  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 Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_POINTER 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 objects could be deleted, the driver will return an error, 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::GetSupportedProperties.

Requirements

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next