WinInet (HTTP, FTP, Gopher)

HomeOverviewHow Do I

The Microsoft Win32 Internet functions (WinInet) assist you in making the Internet an integral part of any application. The new functions, contained in WININET.DLL, simplify accessing the Internet using HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), and gopher.

Features of WinInet

You can use WinInet to:

For all three protocols, you establish a connection, make requests to the server, and close the connection.

Advantages of WinInet

The MFC WinInet classes make it easy to:

Many operations that can be performed by your computer as a client to other computers on the Internet can take a long time. The speed of these operations is usually limited by the speed of your network connection, but they can also be affected by other network traffic and the complexity of the operation. Connecting to a remote FTP server, for example, requires that your computer first look up the name of that server to find its address. Your application will then attempt to connect to the server at that address. Once the connection is opened, your computer and the remote server will initiate a conversation with the file transfer protocol before you can actually use the connection to retrieve files.

MFC WinInet Classes

The WinInet support classes are convenient because they do all of this work for you, regardless of what protocol you're using to connect to the remote server. For example, connecting to an FTP server still requires several steps at a low level, but as an MFC developer, you only need to make one call to CInternetSession::GetFTPConnection to create that connection.

As an MFC programmer, you may have used CStdio to manage your data. The new MFC WinInet classes provide the same functionality for data that is transferred across the Internet. These classes abstract the Internet protocols for HTTP, FTP, and gopher into a high-level application programming interface, providing a fast and straightforward path to making applications Internet-aware.

What do you want to do?

What do you want to know more about?

See Also   Internet: Where Is..., FTPTREE Sample, TEAR Sample