Group: HTTP Functions (WinHTTP) - Library: winhttp
The WinHttpQueryDataAvailable function returns the number of bytes of data that are immediately available to be read with WinHttpReadData.
Custom HttpRequest class (WinHTTP)
BOOL WinHttpQueryDataAvailable(
HINTERNET hRequest,
LPDWORD lpdwNumberOfBytesAvailable
); DECLARE INTEGER WinHttpQueryDataAvailable IN winhttp;
INTEGER hRequest,;
INTEGER @lpdwNumberOfBytesAvailable
hRequest [in] Valid HINTERNET handle, as returned by WinHttpOpenRequest.
lpdwNumberOfBytesAvailable [out, optional] Pointer to an unsigned long integer variable that receives the number of available bytes.
Returns TRUE if the function succeeds, or FALSE otherwise.
MSDN: WinHttpReceiveResponse must have been called for this handle and have completed before WinHttpQueryDataAvailable is called.
This function returns the number of bytes of data that are available to read immediately by a subsequent call to WinHttpReadData. If no data is available and the end of the file has not been reached (for a synchronous session) the request waits until data becomes available.
Home