HttpWriteRequestData
Sends the data portion of an HTTP request.
#include <httpexp.h>
#include <httpclnt.h>
int HttpWriteRequestData (
HINTERNET hndl,
void *pDataBuffer,
UINT32 *pDataBufferLen,
void *pContext,
void (*pCallBackRoutine)(
void *pContext,
HINTERNET hndl,
int returnCode,
void *reserved)
);
The callback function is passed the following parameters:
If successful, returns 0. For an asynchronous request, success means that the parameters are valid and the data has been sent. For a synchronous request, success means that the data has been sent and the reply has been received.
On failure, returns a nonzero error code.
The HttpWriteRequestData function can be called as many times as necessary to send all the data.
The function can be used synchronously or asynchronously. In synchronous mode, the function blocks until the send is completed and the status is returned. To use this mode, set the pContext and pCallBackRoutine parameters to NULL.
In asynchronous mode, the initial status returns immediately. If it is zero, the data has been sent and your callback function is called when the data has been written. If the initial status is nonzero, an error has occurred, the data is not sent, and your callback function is never called.