HttpGetTransferStatus Function  
 
INT WINAPI HttpGetTransferStatus(
  HCLIENT hClient,  
  LPHTTPTRANSFERSTATUS lpStatus  
);

The HttpGetTransferStatus function returns information about the current data transfer in progress.

Parameters

hClient
Handle to the client session.
lpStatus
A pointer to an HTTPTRANSFERSTATUS structure which contains information about the status of the current data transfer.

Return Value

If the function succeeds, the return value is zero. If the function fails, the return value is HTTP_ERROR. To get extended error information, call HttpGetLastError.

Remarks

The HttpGetTransferStatus function returns information about the current data transfer, including the average number of bytes transferred per second and the estimated amount of time until the transfer completes. If there is no data currently being transferred, this function will return the status of the last successful transfer made by the client.

In a multithreaded application, any thread in the current process may call this function to obtain status information for the specified client session.

If the option HTTP_OPTION_HIRES_TIMER has been specified when connecting to the server, the values of the dwTimeElapsed and dwTimeEstimated members of the HTTPTRANSFERSTATUS structure will be in milliseconds instead of seconds. You can use this option to obtain more accurate elapsed times when uploading or downloading small amounts of data over a fast network connection.

If you are uploading or downloading large files which exceed 4GB, you should use the HttpGetTransferStatusEx function which returns the size as a 64-bit value.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h

See Also

HttpEnableEvents, HttpGetTransferStatusEx, HttpRegisterEvent, HTTPTRANSFERSTATUS, HTTPTRANSFERSTATUSEX