IPortableDeviceProperties::GetPropertyAttributes
Previous | Next |
IPortableDeviceProperties::GetPropertyAttributes
The GetPropertyAttributes method retrieves attributes of a specified object property on a device.
Syntax
HRESULT GetPropertyAttributes( LPCWSTR pszObjectID, REFPROPERTYKEY Key, IPortableDeviceValues** ppAttributes );
Parameters
pszObjectID
[in] Pointer to a null-terminated string that contains the object ID of the object to query. To specify the device, use WPD_DEVICE_OBJECT_ID.
Key
[in] A REFPROPERTYKEY that specifies the property to query for. You can retrieve a list of supported properties by calling GetSupportedProperties. For a list of properties that are defined by Windows Portable Devices, see Properties and Attributes.
ppAttributes
[out] Address of a variable that receives a pointer to an IPortableDeviceValues interface that holds the retrieved property attributes. These are PROPERTYKEY/value pairs, where the PROPERTYKEY is the property, and the value data type depends on the specific property. The caller must release this interface when it is done with it. Attributes defined by Windows Portable Devices can be found on the Properties and Attributes page.
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, and all attributes were retrieved successfully. |
S_FALSE | Only some attribute values could be retrieved. Others could not, and will contain an HRESULT value of type VT_ERROR. |
E_POINTER | A required pointer argument was NULL. |
Remarks
Property attributes describe a property's access rights, valid values, and other information. For example, a property can have a WPD_PROPERTY_ATTRIBUTE_CAN_DELETE value set to False to prevent deletion, and have a range of valid values stored as individual entries.
Requirements
Header: Defined in PortableDeviceApi.h
Library: PortableDeviceGUIDs.lib
See Also
Previous | Next |