Share via


IPortableDeviceCapabilities::GetFixedPropertyAttributes

banner art

Previous Next

IPortableDeviceCapabilities::GetFixedPropertyAttributes

The GetFixedPropertyAttributes method retrieves the standard property attributes for a specified property and format. Standard attributes are those that have the same value for all objects of the same format. For example, one device might not allow users to modify video file names; this device would return WPD_PROPERTY_ATTRIBUTE_CAN_WRITE with a value of False for WMV formatted objects. Attributes that can have different values—or optional attributes—for a format are not returned.

Syntax

  HRESULT GetFixedPropertyAttributes(
  REFGUID  Format,
  REFPROPERTYKEY  Key,
  IPortableDeviceValues**  ppAttributes
);

Parameters

Format

[in]  A REFGUID that specifies the format of the objects of interest. For format GUID values, see Object Formats.

Key

[in]  A REFPROPERTYKEY that specifies the property that you want to know the attributes of. Properties defined by Windows Portable Devices are listed in Properties and Attributes.

ppAttributes

[out]  Address of a variable that receives a pointer to an IPortableDeviceValues interface that holds the attributes and their values. The caller must release this interface when it is done with it.

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.

Remarks

You can specify WPD_OBJECT_FORMAT_ALL for the Format parameter to retrieve the complete set of property attributes.

Attributes describe properties. Example attributes are WPD_PROPERTY_ATTRIBUTE_CAN_READ and WPD_PROPERTY_ATTRIBUTE_CAN_WRITE. This method does not retrieve resource attributes.

Requirements

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next