IPortableDevice::Content method
The Content method retrieves an interface that you can use to access objects on a device.
Syntax
HRESULT Content( [out] IPortableDeviceContent **ppContent );
Parameters
- ppContent [out]
-
Address of a variable that receives a pointer to an IPortableDeviceContent interface that is used to access the content on a device. The caller must release this interface when it is done with it.
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 ppContent argument was a NULL pointer. |
Examples
// Assume IPortableDevice* pDevice has been CoCreated and opened { HRESULT hr = S_OK; IPortableDeviceContent* pContent = NULL; hr = pDevice->Content(&pContent); if (SUCCEEDED(hr)) { // Perform IPortableDeviceContent operations here... } else { // Failed to get IPortableDeviceContent from IPortableDevice } // Release the IPortableDeviceContent interface when finished if (pContent) { pContent->Release(); pContent = NULL; } }
Requirements
|
Header |
|
|---|---|
|
Library |
|
See also
- Adding a Resource to an Object
- Enumerating Content
- IPortableDevice Interface
- Moving Content on the Device
- Retrieving an Object Identifier from a Persistent Unique Identifier
- Retrieving Properties for Multiple Objects
- Retrieving the Rendering Capabilities Supported by a Device
- Setting Properties for a Single Object
- Setting Properties for Multiple Objects