1 out of 4 rated this helpful - Rate this topic

InternetReadFileEx function

Applies to: desktop apps only

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

Syntax

BOOL InternetReadFileEx(
  __in   HINTERNET hFile,
  __out  LPINTERNET_BUFFERS lpBuffersOut,
  __in   DWORD dwFlags,
  __in   DWORD_PTR dwContext
);

Parameters

hFile [in]

Handle returned by the InternetOpenUrl or HttpOpenRequest function.

lpBuffersOut [out]

Pointer to an INTERNET_BUFFERS structure that receives the data downloaded.

dwFlags [in]

This parameter can be one of the following values.

ValueMeaning
IRF_ASYNC

Identical to WININET_API_FLAG_ASYNC.

IRF_SYNC

Identical to WININET_API_FLAG_SYNC.

IRF_USE_CONTEXT

Identical to WININET_API_FLAG_USE_CONTEXT.

IRF_NO_WAIT

Do not wait for data. If there is data available, the function returns either the amount of data requested or the amount of data available (whichever is smaller).

 

dwContext [in]

A caller supplied context value used for asynchronous operations.

Return value

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

Remarks

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wininet.h

Library

Wininet.lib

DLL

Wininet.dll

Unicode and ANSI names

InternetReadFileExW (Unicode) and InternetReadFileExA (ANSI)

See also

Common Functions
WinINet Functions

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
InternetReadFileExW not available prior to XP SP3
InternetReadFileExW() fails with error code 120 (not implemented on this OS) on systems prior to XP SP3 as the Unicode version is unimplemented on those systems. Use INTERNET_BUFFERSA and InternetReadFileExA() instead.