Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.72 KB

InternetReadFile.md

File metadata and controls

64 lines (45 loc) · 1.72 KB

Home

Function name : InternetReadFile

Group: Internet Functions (WinInet) - Library: wininet


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


Code examples:

Using FtpCommand
Downloading files from the FTP server using InternetReadFile
How to download this reference`s archive through WinInet functions using InternetOpenUrl
Custom HttpRequest class (WinINet)
Using InternetSetFilePointer when resuming interrupted download from the Internet
Custom FTP Class for Visual FoxPro application

Declaration:

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

FoxPro declaration:

DECLARE INTEGER InternetReadFile IN wininet;
	INTEGER   hFile,;
	STRING  @ sBuffer,;
	INTEGER   lNumBytesToRead,;
	INTEGER @ dwNumberOfBytesRead  

Parameters:

hFile [in] Valid HINTERNET handle returned from a previous call to InternetOpenUrl, FtpOpenFile, FtpCommand, GopherOpenFile, or HttpOpenRequest

lpBuffer [in] Pointer to a buffer that receives the data to read

dwNumberOfBytesToRead [in] Unsigned long integer value that contains the number of bytes to read

lpdwNumberOfBytesRead [out] Pointer to an unsigned long integer variable that receives the number of bytes read


Return value:

Returns TRUE if successful, or FALSE otherwise