IPortableDeviceContent2::UpdateObjectWithPropertiesAndData method (portabledeviceapi.h)
The UpdateObjectWithPropertiesAndData method updates an object by using properties and data found on the device.
Syntax
HRESULT UpdateObjectWithPropertiesAndData(
[in] LPCWSTR pszObjectID,
[in] IPortableDeviceValues *pProperties,
[out] IStream **ppData,
[in, out] DWORD *pdwOptimalWriteBufferSize
);
Parameters
[in] pszObjectID
The identifier of the object to update.
[in] pProperties
The IPortableDeviceValues interface that specifies the object properties to be updated.
[out] ppData
The IStream interface through which the object data is sent to the device.
[in, out] pdwOptimalWriteBufferSize
The optimal buffer size for writing the object data to ppData, or NULL if the buffer size is ignored.
Return value
If the method succeeds, it returns S_OK. Any other HRESULT value indicates that the call failed.
Remarks
Device formats and object formats can derive some of their object properties from the data itself. Or, they can have property values that depend on the data. For example, a music track has a duration property that is specified when an application calls the IPortableDeviceContent::CreateObjectWithPropertiesAndData method. If this track is stored as a default resource (WPD_RESOURCE_DEFAULT), the application might update it. The application additionally mighthave to update the duration property. This method lets the application perform both updates at the same time.
An update is incomplete until the IStream::Commit method is called on the object referenced by the ppData parameter.
To abandon a data transfer in progress, an application should call the IStream::Revert method on the object referenced by the ppData parameter.
The IStream interface object referenced by the ppData parameter must be released after the update operation is complete, or, is canceled.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | portabledeviceapi.h |