Hyperlink Target Object

A hyperlink target is a destination of hyperlink navigation. This can be a persisted OLE object that exposes IHlinkTarget, a persisted OLE object that exposes IOleObject, or any file that is viewed when its viewer application is launched by using ShellExecute.

A hyperlink target can be a top-level container document, an embedded object of arbitrary nesting, or generally any object that can be referenced by using a moniker.

Implementation

If an object (document) wants to be targeted by hyperlinks, it can integrate tightly with OLE hyperlinks by implementing the IHlinkTarget interface. If the object does not support IHlinkTarget, it can still act as a hyperlink target, but it won't be able to support internal navigation, and it will not have access to the common browse context that holds the navigation stack.

An existing OLE document application which supports OLE Linking need only implement the IHlinkTarget interface on the same object that implements IPersistFile and IOleItemContainer. The application may also implement IPersistMoniker to support incremental rendering or asynchronous download as a persistence mechanism, rather than IPersistFile. Supporting IHlinkTarget from an OLE Document Object is the recommended way to make sure your document is viewable by browsers and participates in hyperlinking smoothly.

Creation/Access API Functions

In a document, hyperlink objects implement the IHlink interface. When a user clicks on a hyperlink, the application calls IHlink::Navigate, using a helper api function if preferred. The IHlink::Navigate implementation calls BindMoniker to get the pointer of the target object, requests the IHlinkTarget interface and calls IHlinkTarget::Navigate.

Interfaces

IHlinkTarget A hyperlink target object implements this interface because it provides for navigation to locations within the target's objects.
IOleObject Allows an embedded object to communicate with and provide basic functionality to its container.