Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 15 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 7.2

FEATURE

Implementing WinHTTP in REALBasic

Navigating through proxy-servers using Windows native API

Issue: 7.2 (January/February 2009)
Author: Mattias Sandström
Author Bio: Intermediate
Article Description: No description available.
Article Length (in bytes): 47,892
Starting Page Number: 24
Article Number: 7210
Related Web Link(s):

http://delphi.about.com/od/windowsshellapi/l/aa101303a.htm
http://msdn.microsoft.com
http://msdn.microsoft.com/en-us/library/aa384240.aspx
http://www.aaronballman.com/programming/
http://www.charlesproxy.com/
http://www.ietf.org/rfc/rfc1738.txt
http://www.wireshark.org/
http://wpad.company.com/wpad.dat

Excerpt of article text...

During my years programming in REALbasic I have always been able to achieve my goals using the native framework or third-party plugins. Commercial plugins from Monkeybread Software or Einhugur have provided functionality to many of my projects and delivered functionality not available in the REALBasic framework. Investing in third-party plugins has been an economical way to focus your most valuable asset -- time -- on those things that makes your product a success and to leverage the knowledge of others.

Background

My company is developing a companion product to a Windows-only application and the rationale of using REALbasic for Windows-only software is to avoid the problems of installation and relying on other runtimes and frameworks. (Unfortunately, the current version of REALbasic no longer creates single-EXE applications, but discussing the single-EXE approach is opening a big can of worms and I will close this debate for this article by saying that during the last two years our users have been able to run our software on more than 25,000 computers without any problems.) The software itself is used to get certified and shows hands-on questions requiring the use of the main product to answer. Our application is a simple fire-and-forget app only used when taking the certification questions and you should ideally only need to use it once (see Figure 1 for a screenshot of the app).

About 18 months ago some of the users started to ask why the software did not support certain kind of proxies when connecting over the Internet. (See the "What is a proxy?" sidebar for more on proxies.) Our software was then using the standard HTTPSecureSocket from the REALbasic framework to communicate with a central server located on the Internet and the communication needs to pass the customers' proxy-solutions. When the HTTPSecureSocket finally supported proxies using the HTTPProxyAddress and HTTPProxyPort properties we were able to include proxy support in the software, supporting proxies that are either transparent to the user or using basic user-authentication. Some problems with the AuthenticationRequired event not firing properly required some workarounds, but the implementation was rather clean despite this.

...End of Excerpt. Please purchase the magazine to read the full article.