Freigeben über


InternetQueryDataAvailable (Windows CE 5.0)

Send Feedback

This function queries the amount of data available.

BOOL WINAPI InternetQueryDataAvailable(HINTERNET hFile, LPDWORD lpdwNumberOfBytesAvailable, DWORD dwFlags, DWORD dwContext);

Parameters

  • hFile
    [in] Valid Internet file handle, as returned by InternetOpenUrl, FtpOpenFile, FtpFindFirstFile and HttpOpenRequest.
  • lpdwNumberOfBytesAvailable
    [out] Optional. Long pointer to a variable that receives the number of available bytes.
  • dwFlags
    [in] Reserved. Must be set to zero.
  • dwContext
    [in] Reserved. Must be set to zero.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. If the function finds no matching files, GetLastError returns ERROR_NO_MORE_FILES.

Remarks

The InternetQueryDataAvailable function can be completed in either synchronous or asynchronous mode.

InternetQueryDataAvailable 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 InternetQueryDataAvailable is read.

For HINTERNET handles created by HttpOpenRequest and sent by HttpSendRequestEx, a call to HttpEndRequest must be made on the handle before InternetQueryDataAvailable can be used.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Wininet.h.
Link Library: Wininet.lib.

See Also

About HINTERNET Handles | FtpFindFirstFile | FtpOpenFile | HttpEndRequest | HttpOpenRequest | HttpSendRequestEx | InternetOpenUrl | InternetReadFile | WinInet Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.