IPortableDeviceValues::GetValue method (portabledevicetypes.h)
The GetValue interface retrieves a PROPVARIANT value that is specified by a key.
Syntax
HRESULT GetValue(
[in] REFPROPERTYKEY key,
[out] PROPVARIANT *pValue
);
Parameters
[in] key
A REFPROPERTYKEY key that specifies the item to retrieve.
[out] pValue
A pointer to the retrieved PROPVARIANT value. The caller must release the memory by calling PropVariantClear when the call is complete.
Return value
The method returns an HRESULT. Possible return values are shown in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
The property that is specified by key is not in the collection. |
Remarks
This method can be used to retrieve a value of any type from the collection. However, if you know the value type in advance, use one of the specialized retrieval methods of this interface for additional type checking.
When the VARTYPE for pValue is VT_VECTOR or VT_UI1, retrieving a NULL or zero-sized buffer is not supported. For example, neither pValue.caub.pElems = NULL nor pValue.caub.cElems = 0 are allowed.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | portabledevicetypes.h |
See also
IPortableDeviceValues Interface
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for