IMFHttpDownloadRequest::BeginSendRequest method (mfidl.h)

Invoked by Microsoft Media Foundation to send a HTTP or HTTPS request

Syntax

HRESULT BeginSendRequest(
  [in] const BYTE       *pbPayload,
  [in] ULONG            cbPayload,
  [in] IMFAsyncCallback *pCallback,
       IUnknown         *punkState
);

Parameters

[in] pbPayload

Pointer to a buffer that contains the message payload to send in the request. This parameter is used for POST requests. GET requests do not carry a message payload and therefore pbPayload is NULL.

[in] cbPayload

The size of the pbPayload buffer, in bytes.

[in] pCallback

Pointer to the IMFAsyncCallback interface of a callback object that is implemented by Microsoft Media Foundation.

punkState

Pointer to the IUnknown interface of a state object, defined by Microsoft Media Foundation. This parameter can be NULL.

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 started the asynchronous operation.
E_OUTOFMEMORY
There is insufficient memory to complete the operation.

Remarks

The implementation of BeginWrite does not need to make a private copy of the memory pointed to by pbPayload, as Microsoft Media Foundation will not reallocate, free, or write to the buffer while an asynchronous write is still pending.

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