Brought to you by the |
The Microsoft® Win32® Internet functions provide Win32-based 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 independent software vendors (ISVs) and software developers, and that 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 Wininet.dll.
The Win32 Internet functions facilitate access to the Internet by:
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.
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 Wininet.dll needs to be changed. In addition, advanced protocols, such as HTTP version 1.1, 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.
Occasionally, applications need to access extended features of the Internet protocols. The Win32 Internet functions help provide this access.
The Win32 Internet functions are fully "reentrant" 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 protocols, so the application developer can concentrate on obtaining the data and not worrying about managing the cache. For more information about how Win32 Internet functions use 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.