TWinWrap:Delphi Wrapper for WinInet

Nearly every computer on the planet that runs Microsoft Windows has Microsoft Internet Explorer installed by default. This also means that WinInet.DLL - Microsoft's API for communicating on the Internet using a range of protocols such as HTTP, HTTPS etc - is available on most computers. This makes it very easy to leverage Internet access functionality into a Delphi application by simply using WinInet. Very easy - provided you understand the intricacies of the WinInet API. Enter TWinWrap, a simple wrapper for WinInet. TWinWrap makes it easy to use the HTTP and HTTPS protocols to launch GET and POST requests without having to understand WinInet. The principal properties of TWinWrap are listed below:

TWinWrap exposes two events

  1. OnCallBack is triggered as a WinInet transaction progresses. It can be used to provide feedback the user.
  2. OnSized is triggered while a server response is being received. Use it to provide the user with feedback when the server response is slow or lengthy - e.g. when downloading a large file.

The principal methods of TWideStrings are listed below

Usage: Create an instance of TWinWrap to manage HTTP(S) communications in your application. Configure the object by assigning its properties, define the nature of the WinInet communication you desire in a TWinWrapInfo structure and call the Execute method. Retrieve the results of a successful communication using the Content and Response properties. Remember to call CleanUp to release resources used immediately after the Execute method terminates.
The source code for TWinWrap is costs just $9.99.
Download
Jump To...

Colophon