Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function queries the amount of data available.
BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile , LPDWORD lpdwNumberOfBytesAvailable , DWORD dwFlags , DWORD dwContext );
Parameters
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. If the function finds no matching files, GetLastErrorreturns ERROR_NO_MORE_FILES.
Windows CE Remarks
Windows CE stipulates that the hFileparameter must be a valid Internet file handle returned by the FtpOpenFile, FtpFindFirstFile, or HttpOpenRequestfunction.
The InternetQueryDataAvailablefunction can be completed in either synchronous or asynchronous mode.
Remarks
This function returns the number of bytes of data that are available to be read immediately by a subsequent call to InternetReadFile. If there is currently no data available and the end of the file has not been reached, the request waits until data becomes available. The amount of data remaining will not be recalculated until all available data indicated by the call to InternetQueryDataAvailableis read.
For HINTERNETHandles created by HttpOpenRequestand sent by HttpSendRequestEx, a call to HttpEndRequestmust be made on the handle before InternetQueryDataAvailablecan be used.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Wininet.h | Wininet.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
HINTERNET, FtpFindFirstFile, FtpOpenFile, GetLastError, HttpEndRequest, HttpOpenRequest, HttpSendRequestEx, InternetOpenUrl, InternetQueryDataAvailable, InternetReadFile