Retrieves a byte array associated with a key. This method copies the array into a caller-allocated buffer.
public:
HRESULT GetBlob(
REFGUID guidKey,
UINT8 *pBuf,
UINT32 cbBufSize,
UINT32 *pcbBlobSize
)
guidKey
Type: REFGUID
[in]
GUID that identifies which value to retrieve. The attribute type must be MF_ATTRIBUTE_BLOB.
pBuf
Type: UINT8 *
[out]
Pointer to a buffer allocated by the caller. If the key is found and the value is a byte array, the method copies the array into this buffer. To find the required size of the buffer, call IMFAttributes::GetBlobSize.
cbBufSize
Type: UINT32
The size of the pBuf buffer, in bytes.
pcbBlobSize
Type: UINT32 *
[in, out, optional]
Receives the size of the byte array. This parameter can be NULL.
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. |
| E_NOT_SUFFICIENT_BUFFER | The buffer is not large enough to the array. |
| MF_E_ATTRIBUTENOTFOUND | The specified key was not found. |
| MF_E_INVALIDTYPE | The attribute value is not a byte array. |
Refer to Media Foundation return codes.
You can also use the IMFAttributes::GetAllocatedBlob method, which allocates the buffer to hold the byte array.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use Mfuuid.lib.