Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceResources::GetResourceAttributes method

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

pszObjectID [in]

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

Key [in]

A REFPROPERTYKEY that specifies which resource to query.

ppResourceAttributes [out]

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 codeDescription
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

Header

PortableDeviceApi.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDeviceResources Interface

 

 

Community Additions

Show:
© 2017 Microsoft