Gets data for a specific property.
HRESULT GetValue( [in] REFPROPERTYKEY key, [out] PROPVARIANT *pv );
A reference to the PROPERTYKEY structure retrieved through IPropertyStore::GetAt. This structure contains a unique identifier for the property in question.
When this method returns, contains a PROPVARIANT structure that contains the property data.
Returns S_OK or INPLACE_S_TRUNCATED if successful, or an error value otherwise.
INPLACE_S_TRUNCATED is returned to indicate that the returned PROPVARIANT was coerced to a more canonical form, for instance to trim leading or trailing spaces from a string value. Most code should use the SUCCEEDED macro to check the return value, which treats INPLACE_S_TRUNCATED as a success code.
If the PROPERTYKEY referenced in key is not present in the property store, this method returns S_OK and the vt member of the structure pointed to by pv is set to VT_EMPTY.
File property handler implementers can use IPropertyStore::GetValue to retrieve the property value by using the filestream with which Initialize initialized the property handler. The value can also be computed from an in-memory cache, or other means. However, most consumers of the property system obtain IPropertyStore through GetPropertyStore and are not—and have no need to be—aware of the method of initialization.
Minimum supported client
Windows Vista [desktop apps | UWP apps]
Minimum supported server
Windows Server 2008 [desktop apps | UWP apps]