WinInet API

The Microsoft Win32 Internet (WinInet) API provides stand-alone applications with easy access to standard Internet protocols such as Gopher, FTP, and HTTP by abstracting the protocols into a high-level interface that is familiar to Win32 developers. You can call WinInet API functions from almost any language, including Visual Basic. You do not have to know much about TCP/IP, Windows Sockets, or the inner workings of HTTP to use this API. Also, because this API offers an abstraction from the actual implementation, you will not have to rewrite applications as protocols evolve ; only the WinInet DLL will need to be upgraded.

Advantages of WinInet API

Advantages of the WinInet API include:

  • No need to know TCP/IP and Windows Sockets.

    By converting the Internet protocols into task-oriented functions, you don't need to write Windows Sockets code or be familiar with the TCP/IP protocol.

  • No need to know Internet protocols.

    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 to parse these listings you need 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.

  • Constant set of functions in an environment of rapidly changing and evolving protocols.

    The set of functions is designed to remain constant, so you no longer need to update your applications every time the underlying protocol changes. In addition, advanced protocols, such as HTTP version 1.1, can also be implemented without changing applications.

  • Win32 function standards.

    The Win32 Internet functions are similar to the traditional Win32 functions in the way they handle elements such as buffer management and error returns. If you are familiar with the Win32 function set, you will find that the Win32 Internet functions return information in a familiar format.

  • Full access to Internet protocols.

    Occasionally, applications need to access extended features of the Internet protocols. The Win32 Internet functions help provide this access.

  • High-performance, multithreaded Internet applications.

    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.

  • Persistent caching support built in.

    The Win32 Internet functions provide persistent caching for all protocols, so you can concentrate on obtaining data, rather than managing the cache.

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.



Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net