IPortableDeviceResources::GetResourceAttributes method (portabledeviceapi.h)

The GetResourceAttributes method retrieves all attributes from a specified resource in an object.

Syntax

HRESULT GetResourceAttributes(
  [in]  LPCWSTR               pszObjectID,
  [in]  REFPROPERTYKEY        Key,
  [out] IPortableDeviceValues **ppResourceAttributes
);

Parameters

[in] pszObjectID

Pointer to a null-terminated string that contains the object ID of the object hosting the resource.

[in] Key

A REFPROPERTYKEY that specifies which resource to query.

[out] ppResourceAttributes

Pointer to an IPortableDeviceValues interface pointer that holds PROPERTYKEY/PROPVARIANT pairs that describe each attribute and its value, respectively. The value types of the attribute values vary. If a property could not be returned, the value for the returned property will be VT_ERROR, and the PROPVARIANT scode member will contain the HRESULT of that particular failure.

Return value

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

Return code Description
S_OK
All attribute values were retrieved.
S_FALSE
One or more attribute values could not be retrieved. These will have HRESULT values of type VT_ERROR in the retrieved ppResourceAttributes parameter.
E_POINTER
At least one of the required pointer arguments was NULL.

Remarks

Resource attributes describe the access rights, size, format, and other information related to a resource. For example, the attributes for an audio annotation resource on an image object may specify the bit rate, channel count, and data format of the audio.

Requirements

Requirement Value
Target Platform Windows
Header portabledeviceapi.h
Library PortableDeviceGUIDs.lib

See also

IPortableDeviceResources Interface