Communicating over the Internet

Much of the communication that takes place over the Internet involves the use of high-level protocols, such as HTTP. These protocols specify how the data contained in the packets must be structured.

The Windows CE Internet API, known as WinINET, provides a set of tools for developing Internet client applications, such as browsers, that use the FTP and HTTP Internet protocols. WinINET also simplifies the details of making and using socket connections. Use WinINET to:

The Windows CE version of WinINET is similar to WinINET for Windows-based desktop platforms, with two significant differences:

WinINET uses Internet handles that are passed to functions that offer specific Internet services, such as making an HTTP request. These handles are generally organized in a tree. The following illustration describes a hierarchy that you might use for HTTP communications.

    

Hierarchy of HTTP communications

The hInternetOpen handle is the root of the tree and is used by all HTTP sessions. The hInternetConnect handle identifies a particular site. It is used to open a connection to the site that is then represented by an hHttpOpen handle. This handle can then be used to send an HTTP request.

When a parent node handle is closed, all its child handles will be closed recursively. In the previous example, closing hInternetConnect2 also closes hHttpOpenA and hHttpOpenB.

For more information about how to use WinINET, see the Microsoft Platform SDK.