EvoCorp Home    Delphi::Advance

 

 

   

 

Active Internet Documents

This section, Active Internet Documents, is a continuation of ActiveX Document Servers.

Update
September 15, 2006: Because a lot of people have been asking for an Active Document sample, I have finally included one, here. This sample provides a basic active document server that allows you to display your own user interface when a document of type "*.axdoc" is opened from within Internet Explorer. This sample implements TActiveDocServer, not TInternetDocServer, however modifying the sample class to use TInternetDocServer is as simple as, well, that.

Creating active documents for Internet Explorer provides a more interesting challenge than a standard active document server. Internet Explorer is designed to access information on a global scale, providing you with the perfect opportunity to deliver your information to nearly every user on planet Earth without requiring each user to physically activate a third party application outside of Internet Explorer just to view whatever it is that you're offering.

Now the ActiveX Document Server classes presented in ActiveX Document Servers already enable you to present your information from within Internet Explorer, so why expand this class any further?

First and foremost, the basic ActiveX Document Server class TActiveDocServer doesn't provide the mechanics required to load or save information, or to persist information across separate Internet Explorer sessions. Secondly Internet Explorer offers a number of interfaces that enable your document server to request and react to navigational changes interactively within your document. The TInternetDocServer class addresses this through the implementation of the following interfaces:

IHLinkSite and IHLinkTarget   These interfaces enable our document to reference hyperlinks with our document's container, and to provide references to the documents content.
IOleContainer and IOleItemContainer   These interfaces allow our document to support links and links to embedded objects, enabling object enumeration and name parsing, and referencing of objects and links via monikers.
IPersistFile and IPersistMoniker   These interfaces provide the mechanics require for the persistent loading and saving of information.

It is important to note that whilst this code provides the basic entry points for using HLINK functionality and information persistence, it doesn't physically implement those functions (for example, whilst I have defined load and save functions, those functions do nothing as the format of the information to be persisted is up to you, not me).

If you are having trouble implementing HLINK functionality, MSDN have some information which you might find useful which is available here (if this link fails, please contact me).

Requirements

Download Code

September 15, 2006: The ActiveX Document Server sample can be downloaded, here.

InternetDocumentServer.pas can be downloaded here.

ActiveX is a registered trademark of Microsoft Corporation.
Microsoft Internet Explorer is a registered trademark of Microsoft Corporation.