IMFHttpDownloadRequest::QueryHeader method (mfidl.h)
Invoked by Microsoft Media Foundation to retrieve the values of specified HTTP headers from the response to a previously sent HTTP or HTTPS request. Media Foundation invokes this method only after having successfully invoked the EndReceiveResponse method.
Syntax
HRESULT QueryHeader(
[in] LPCWSTR szHeaderName,
[in] DWORD dwIndex,
[out] LPWSTR *ppszHeaderValue
);
Parameters
[in] szHeaderName
The name of the HTTP header for which the value is being queried.
[in] dwIndex
The index number of the specified header, for the case where the response contains multiple headers with the same name. A value of 0 indicates that the value of the first header with the specified name is requested, 1 indicates that the second header is requested, and so on.
[out] ppszHeaderValue
Set to the value of the requested header, not including the carriage return or line feed characters. The memory for ppszHeaderValue must be allocated with CoTaskMemAlloc and will be freed by Media Foundation with CoTaskMemFree.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
Successfully returned the value of the specified header with the specified index. |
|
There is insufficient memory to complete the operation. |
|
The ppszHeaderValue parameter is an invalid pointer. |
|
The dwIndex parameter value is out of range. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1703 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | mfidl.h |
Library | Mfplat.lib; Mfplat.dll |