IMFHttpDownloadRequest::EndReadPayload method (mfidl.h)

Invoked by Microsoft Media Foundation to complete the asynchronous operation started by BeginReadPayload. When this method completes successfully, the payload data will have been written to the buffer that Media Foundation provided when invoking BeginReadPayload.

Syntax

HRESULT EndReadPayload(
  [in]  IMFAsyncResult *pResult,
  [out] QWORD          *pqwOffset,
  [out] ULONG          *pcbRead
);

Parameters

[in] pResult

Pointer to the IMFAsyncResult interface. Microsoft Media Foundation will pass in the same pointer that its callback object received in the IMFAsyncCallback::Invoke method.

[out] pqwOffset

The offset of the first byte written to the buffer, relative to the complete message body of the current HTTP request. For example, when Media Foundation invokes BeginReadPayload for the first time on a given IMFHttpDownloadRequest, and specifies a buffer size of 100, the pqwOffset parameter will be set to 0. Then, when Media Foundation invokes BeginReadPayload for the second time on the same IMNFHttpDownloadRequest, the pqwOffset parameter will be set to 100.

[out] pcbRead

Specifies the number of bytes written to the buffer that Media Foundation provided when invoking BeginReadPayload. Note that this value must always be equal to the size of the buffer specified in BeginReadPayload, unless the request failed, or unless the end of the message body has been reached.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
Successfully wrote data to the buffer provided in BeginReadPayload.

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

See also

IMFHttpDownloadRequest