InternetReadFile

From aldeid
Jump to navigation Jump to search

Description

Reads data from a handle opened by the InternetOpenUrl, FtpOpenFile, or HttpOpenRequest function.

Syntax

BOOL InternetReadFile(
  _In_  HINTERNET hFile,
  _Out_ LPVOID    lpBuffer,
  _In_  DWORD     dwNumberOfBytesToRead,
  _Out_ LPDWORD   lpdwNumberOfBytesRead
);

Parameters

hFile [in]
Handle returned from a previous call to InternetOpenUrl, FtpOpenFile, or HttpOpenRequest.
lpBuffer [out]
Pointer to a buffer that receives the data.
dwNumberOfBytesToRead [in]
Number of bytes to be read.
lpdwNumberOfBytesRead [out]
Pointer to a variable that receives the number of bytes read. InternetReadFile sets this value to zero before doing any work or error checking.

Return value

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError. An application can also use InternetGetLastResponseInfo when necessary.