The Microsoft Win32 Internet functions provide Win32 applications with easy access to common Internet protocols. These functions abstract the Internet's Gopher, File Transfer Protocol (FTP), and HyperText Transfer Protocol (HTTP) protocols into a high-level application programming interface (API) that is familiar to Win32 independent software vendors (ISVs) and software developers, and which provides a fast and straightforward path to making applications Internet-aware.
NOTE Initially, the Win32 Internet functions will be shipped as redistributables independent of operating systems through the Microsoft Developer Network (MSDN), CompuServe, and the Internet. ISVs can redistribute WININET.DLL with their applications, following the model of Win32s. In the future, the functions described in this documentation will be folded into all Microsoft operating systems. The Win32 Internet functions are exported from the WININET.DLL.
The Win32 Internet functions facilitate access to the Internet in the following ways:
By converting the Internet protocols into task-oriented functions, application developers do not need to write Windows Sockets code or be familiar with the TCP/IP protocol. One or several Windows Sockets functions can be executed by each call to an Internet function.
While the concepts supported by the Internet protocols such as FTP and HTTP are simple, the actual implementation of these protocols can be complex. For example, FTP servers return ASCII text file directory listings, but parsing these listings requires specific knowledge of the format returned by each FTP server. By encapsulating this functionality within the Internet functions, directory parsing is solved once for all applications using the FTP protocol. This provides consistent behavior across applications.
Keeping pace with the changes in Internet protocols is a challenge when writing applications. With the set of functions designed to remain constant, application developers no longer need to update their applications every time the underlying protocol changes. Now, only the WININET.DLL needs to be changed. In addition, advanced protocol features, such as firewall-friendly FTP and Gopher+, can also be implemented without changing applications.
The Win32 Internet functions are similar to the traditional Win32 functions in the way they treat elements such as buffer management and error returns. Application developers familiar with the Win32 function set will find that the Win32 Internet functions return information in a familiar format. Furthermore, application developers will find it easy to use the returned information in other Win32 functions.
Internet protocols use Latin 1 character sets; however, Latin 1 and ANSI differ in a few character mappings. The ANSI versions of the Win32 Internet functions do not perform any mappings between ANSI and Latin 1--they return what they receive from the server, and pass to the server exactly what they receive from the application. The Win32 Internet functions provide both ANSI and Unicode entry points to facilitate Unicode-only applications.
Occasionally, applications will need to access extended features of the Internet protocols. The Win32 Internet functions help provide this access.
The Win32 Internet functions are fully "re-entrant" and multithread safe. Multithreaded applications can make simultaneous calls into the functions from different threads without adverse effects. The Internet functions themselves complete any necessary synchronization.
The Win32 Internet functions provide persistent caching for all of the protocols so the application developer concentrate on obtaining the data and not worrying about managing the cache. For more information about how WinInet uses the cache functions to get proper web behavior, see Persistent URL Cache Functions.
The Win32 Internet functions are intended to make Internet client applications easier to write; they are not intended to facilitate writing Internet servers. This is because servers must be able to control how the protocol is accessed and how I/O is performed in order to achieve the high performance necessary for high-traffic servers. In addition, the Win32 Internet functions are not intended to solve the general issue of access to mail and news servers.