Retrieves the length of a string value associated with a key.
public:
HRESULT GetStringLength(
REFGUID guidKey,
UINT32 *pcchLength
)
guidKey
Type: REFGUID
[in]
GUID that identifies which value to retrieve. The attribute type must be MF_ATTRIBUTE_STRING.
pcchLength
Type: UINT32 *
[out]
If the key is found and the value is a string type, this parameter receives the number of characters in the string, not including the terminating NULL character. To get the string value, call IMFAttributes::GetString.
Type: HRESULT
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. |
| MF_E_ATTRIBUTENOTFOUND | The specified key was not found. |
| MF_E_INVALIDTYPE | The attribute value is not a string. |
Refer to Media Foundation return codes.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use Mfuuid.lib.