IHlinkFrame::GetBrowseContext
Reference

IHlinkFrame::GetBrowseContext


HRESULT GetBrowseContext(
    IHlinkBrowseContext * ppihlbc    //Buffer to receive the interface of the current browse context
   );

Retrieves the browse context of the hyperlink frame.

ppihlbc
[out] Location to return the browse context interface's pointer.

See also HlinkCreateBrowseContext, IHlinkBrowseContext, IHlinkFrame::SetBrowseContext, IHlinkTarget

IHlinkFrame::Navigate

HRESULT Navigate(
    DWORD grfHLNF,    //Navigation flags
    LPBC pbc,        //Bind context interface pointer
    IBindStatusCallback * pibsc,    //Bind-status callback  interface pointer
    IHlink * pihlNavigate           //Hyperlink target interface pointer
   );

Navigates to the hyperlink target.

grfHLNF
[in] Flags describing how the navigation is to proceed. The value of the flag can be any valid HLNF enumeration value.
pbc
[in, unique] Address of the bind context interface to use for any moniker binding during this operation. Must not be NULL.
pibsc
[in, unique] Address of the IBindStatusCallback object interface to use for any asynchronous moniker binding performed during the navigation. If NULL, the caller is not interested in progress notification, cancellation, pausing, or low-level binding information.
pihlNavigate
[in, unique] Address of the IHlink object interface to the hyperlink target.

See also HLNF, IHlink::Navigate

IHlinkFrame::OnNavigate

HRESULT OnNavigate(
    DWORD grfHLNF,            //Navigation flags
    IMoniker * pimkTarget,    //Moniker interface pointer of the hyperlink target
    LPCWSTR pwzLocation,      //Location within the hyperlink target of new hyperlink
    LPCWSTR pwzFriendlyName   //Friendly name of the hyperlink
   );

Notifies the hyperlink frame that a hyperlink has been navigated to.

grfHLNF
[in] Flags describing how the navigation is to proceed. The value of the flag can be any valid HLNF enumeration value.
pimkTarget
[in, unique] Address of an IMoniker interface on the hyperlink target.
pwzLocation
[in, unique] A string identifying the location within the hyperlink target that was navigated to. Must not be NULL.
pwzFriendlyName
[in, unique] The friendly name of the location within the hyperlink target that has been navigated to. Must not be NULL.

See also HlinkOnNavigate, HLNF, IHlinkBrowseContext::OnNavigateHlink, IHlinkSite::OnNavigationComplete

IHlinkFrame::SetBrowseContext

HRESULT SetBrowseContext(
    IHlinkBrowseContext * phlbc    //Interface pointer of the current browse context
   );

Sets the browse context of the hyperlink frame.

phlbc
[in] The browse context interface's pointer.

See also HlinkCreateBrowseContext, IHlinkBrowseContext, IHlinkFrame::GetBrowseContext, IHlinkTarget::SetBrowseContext

IHlinkFrame::UpdateHlink

HRESULT UpdateHlink(
    ULONG uHLID,              //Hyperlink to retrieve
    IMoniker * pimkTarget,    //Moniker interface pointer of the hyperlink target
    LPCWSTR pwzLocation,      //Location within the hyperlink target of new hyperlink
    LPCWSTR pwzFriendlyName   //Friendly name of the hyperlink
   );

Updates the hyperlink frame.

uHLID
[in] Used to identify the hyperlink to retrieve. Can be a value taken from the HLID constants to indicate a logically identified hyperlink, such as HLID_PREVIOUS or HLID_NEXT.
pimkTarget
[in, unique] Address of an IMoniker interface on the hyperlink target.
pwzLocation
[in, unique] A string identifying the location within the hyperlink target that was navigated to. Must not be NULL.
pwzFriendlyName
[in, unique] The friendly name of the location within the hyperlink target that has been navigated to. Must not be NULL.

This method is called before navigation, typically by the IHlinkSite::ReadyToNavigate method. An application that does not implement the IHlinkSite interface can call this method before calling the navigation function.

See also HlinkOnNavigate, HLID, IHlinkBrowseContext::OnNavigateHlink, IHlinkSite::OnNavigationComplete

IHlinkSite

The IHlinkSite interface provides methods for a hyperlink to retrieve the moniker or the interface on its hyperlink container. The navigation process that resolves a hyperlink uses this information to efficiently handle internal (within the same container) and external (to a different container) hyperlink references.

Implementing IHlinkSite

Implement IHlinkSite when you want to hyperlink to other documents. For each hyperlink object provided by the system, a third party, or that you create, you provide an IHlinkSite object. One site object can support multiple hyperlinks.

IHlinkSite Methods in Vtable Order

IHlinkSite methods Description
QueryService Queries any service or other interface from the hyperlink site object.
GetMoniker Retrieves the moniker to the hyperlink target.
ReadyToNavigate Notifies the hyperlink site that the hyperlink navigation is about to occur.
OnNavigationComplete Notifies the hyperlink site that hyperlink navigation is complete.

IHlinkSite::GetMoniker

HRESULT GetMoniker(
    DWORD dwSiteData,    //Site data for the new hyperlink object
    DWORD dwAssign,      //Whether or not to create a moniker if one not found
    DWORD dwWhich,       //Which moniker to retrieve
    IMoniker * ppimk     //Buffer to receive the requested moniker interface pointer
   );

Returns the relative moniker of the hyperlink's container.

dwSiteData
[in] Used to identify the hyperlink to the hyperlink site. The hyperlink site initializes the hyperlink with this value as part of IHlink::SetHlinkSite.
dwAssign
[in] A value from the OLEGETMONIKER enumeration. This is typically either OLEGETMONIKER_ONLYIFTHERE, indicating the function should not force a moniker to be created if one does not already exist, or OLEGETMONIKER_FORCEASSIGN, indicating that the function should create a moniker if one does not exist.
dwWhich
[in] A value from the OLEWHICHMK enumeration. This is typically OLEWHICHMK_CONTAINER, indicating that the site should return the moniker of the hyperlink container.
ppimk
[out] Location to return the IMoniker interface.

See also IHlink::GetMonikerReference, IHlinkTarget::GetMoniker

IHlinkSite::OnNavigationComplete

HRESULT OnNavigationComplete(
    DWORD dwSiteData,    //Site data for the hyperlink object
    DWORD dwReserved,    //Reserved for future use
    HRESULT hrError,     //Result of the hyperlink navigation
    LPCWSTR pwzError     //Description of the failure, if any
   );

Notifies the hyperlink site that a hyperlink navigation has been successful.

dwSiteData
[in] Used to identify the hyperlink to the hyperlink site. The hyperlink site initializes the hyperlink with this value as part of IHlink::SetHlinkSite.
dwReserved
[in] Reserved for future use; must be set to zero by the caller. To ensure compatibility with future use, the callee must not check for zero.
hrError
[in] Result of the hyperlink navigation. Either S_OK for success, or E_ABORT or E_FAIL for failure.
pwzError
[in] Address of the string describing the failure that occurred.

This notification is particularly useful if the hyperlink has been navigated asynchronously, because it is the only notification the hyperlink receives to realize that hyperlinking has completed.

See also HlinkOnNavigate, IHlinkBrowseContext::OnNavigateHlink, IHlinkFrame::OnNavigate

IHlinkSite::QueryService

HRESULT QueryService(
    DWORD dwSiteData,        //Site data to identify the hyperlink its site
    REFGUID guidService,    //TBD
    REFIID riid,             //Location to return the riid interface
    IUnknown* ppiunk         //Location to receive the unknown interface pointer of service query
   );

Allows querying of any service or other interface from the hyperlink site object. This is similar to IServiceProvider::QueryService.

dwSiteData
[in] Used to identify the hyperlink to the hyperlink site. The hyperlink site initializes the hyperlink with this value as part of IHlink::SetHlinkSite.
guidService
[in] Not currently implemented.
riid
[in] Location to return the riid interface.
ppiunk
[iid_is, out] Location to return the IUnknown interface of the service query.

See also IHlinkSite::GetMoniker

IHlinkSite::ReadyToNavigate

HRESULT ReadyToNavigate(
    DWORD dwSiteData,    //Site data for the hyperlink object
    DWORD dwReserved     //Reserved for future use
   );

Notifies the hyperlink site that the hyperlink navigation is about to occur. To back out of the operation, return E_ABORT.

dwSiteData
[in] Used to identify the hyperlink to the hyperlink site. The hyperlink site initializes the hyperlink with this value as part of IHlink::SetHlinkSite.
dwReserved
[in] Reserved for future use; must be set to zero by the caller. To ensure compatibility with future use, the callee must not check for zero.

See also HlinkOnNavigate, IHlinkBrowseContext::OnNavigateHlink, IHlinkFrame::OnNavigate

IHlinkTarget

A hyperlink target implements the IHlinkTarget interface and gives out hyperlink references to its contents.

Implementing IHlinkTarget

Implement this interface when you have an application that can be the target for a hyperlink. In other words, hyperlinks from other applications use this interface to determine how to find, display, and navigate to your target.

An existing OLE document application that supports OLE linking need only implement the IHlinkTarget interface on the same object that implements IPersistFile and IOleItemContainer. The application can also implement IPersistMoniker to support incremental rendering or asynchronous download as a persistence mechanism, rather than IPersistFile.

Note that an Active Document object need not implement this interface if hyperlink navigation is only occuring within a document object container such as Microsoft Internet Explorer. In such a situation, IHlinkTarget provides the capability to navigate to a location within the document, but it is not necessary for navigation to be completed.

Using IHlinkTarget

You do not normally call these methods directly. When an end user selects a hyperlink through an application's user interface, the implementation of IHlink::Navigate calls these methods to determine how to display, locate, and navigate to the target.

IHlinkTarget Methods in Vtable Order

IHlinkTarget methods Description
SetBrowseContext Establishes the current browse context for this hyperlink target.
GetBrowseContext Retrieves the current browse context within which this hyperlink target is currently running.
Navigate If the given location is not visible, navigates to and shows that position within the target.
GetMoniker Returns a moniker to the hyperlink target object.
GetFriendlyName Returns a friendly name for the given hyperlink location within this target.

IHlinkTarget::GetBrowseContext

HRESULT GetBrowseContext(
    IHlinkBrowseContext * ppihlbc    //Buffer to receive the current browse context's interface pointer
   );

Retrieves the browse context in which this hyperlink target is currently running.

ppihlbc
[out] Address of the location to return the browse context object's interface pointer.

See also HlinkCreateBrowseContext, IHlinkBrowseContext, IHlinkFrame::GetBrowseContext, IHlinkTarget::SetBrowseContext

IHlinkTarget::GetFriendlyName

HRESULT GetFriendlyName(
    LPCWSTR pwzLocation,     //Hyperlink location within this target
    LPWSTR * ppwzFriendlyName    //Buffer to receive the friendly name
   );

Retrieves a friendly name for the given hyperlink destination within this target.

pwzLocation
[in, unique] String that indicates the position of the hyperlink destination within this hyperlink target.
ppwzFriendlyName
[out] Address of the buffer to return the friendly name. This string must be allocated using CoTaskMemAlloc. It is the caller's responsibility to free this string using CoTaskMemFree.

See also IHlink::GetFriendlyName

IHlinkTarget::GetMoniker

HRESULT GetMoniker(
    LPCWSTR pwzLocation,     //Hyperlink destination within this target
    DWORD dwAssign,     //Whether or not to create a moniker if one not found
    IMoniker * ppimkLocation    //Buffer to receive this moniker
   );

Returns a moniker to the hyperlink target object for the given hyperlink destination szLocation.

pwzLocation
[in, unique] Used to identify the hyperlink destination within this target.
dwAssign
[in] A value from the OLEGETMONIKER enumeration. This is typically either OLEGETMONIKER_ONLYIFTHERE, indicating the function should not force a moniker to be created if one does not already exist, or OLEGETMONIKER_FORCEASSIGN, indicating that the function should create a moniker if one does not exist.
ppimkLocation
[out] Address of location to return the IMoniker interface pointer to the hyperlink target object for this szLocation.

See also HlinkSimpleNavigateToMoniker, IHlink::GetMonikerReference, IHlinkSite::GetMoniker

IHlinkTarget::Navigate

HRESULT Navigate(
    DWORD grfHLNF,    //Value from the HLNF enumeration
    LPCWSTR * pwzJumpLocation    //Location within the hyperlink target to navigate to
   );

If the given location is not visible, navigates to and shows the location position within the object/document.

grfHLNF
[in] Flags describing how the navigation is to proceed. The value of the flag can be any valid HLNF enumeration value.
pwzJumpLocation
[in, unique] The string location portion of the hyperlink reference.

See also HlinkNavigate, HlinkNavigateToStringReference, HLNF, IHlinkFrame::Navigate, IHlink::Navigate

IHlinkTarget::SetBrowseContext

HRESULT SetBrowseContext(
    IHlinkBrowseContext * pihlbc    //Browse context interface pointer to set for the hyperlink target
   );

Establishes the current browse context for this hyperlink target.

pihlbc
[in, unique] Address of the browse context object's interface.

See also HlinkCreateBrowseContext, IHlinkBrowseContext, IHlinkFrame::SetBrowseContext, IHlinkTarget::GetBrowseContext

Functions

This section describes the following functions:

HlinkCreateBrowseContext

HRESULT HlinkCreateBrowseContext(
    IUnknown *piunkOuter,    //Controlling unknown for possible aggregation
    REFIID riid,        //Interface identifier to return on the new browse context
    void **ppvObj       //Receives the requested interface's pointer
   );

Creates an empty, default instance of the system browse context object.

piunkOuter
[in] Address of the controlling IUnknown interface for the new browse context. Typically NULL, in which case the new browse context is not aggregated. This interface must be derived from IUnknown.
riid
[in] Used to identify the interface to return on the new browse context. Typically IID_IHlinkBrowseContext, although it must be IID_IUnknown when punkOuter is non-NULL so that the aggregator can retrieve the new browse context's inner IUnknown for future delegation of QueryInterface. See the COM aggregation documentation for details.
ppvObj
[out] Location to return the riid interface.

This helper function is identical to calling the following:

coCreateInstance(CLSID_StdHlinkBrowseContext, punkOuter, CLSCTX_SERVER, riid, ppv)

See also IHlinkBrowseContext, IHlinkFrame::GetBrowseContext, IHlinkTarget::GetBrowseContext

HlinkCreateFromData

HRESULT HlinkCreateFromData(
    IDataObject* piDataObj,    //Interface on target data from which to create the hyperlink
    IHlinkSite* pihlsite,      //Interface on hyperlink site
    DWORD dwSiteData,          //Additional site data
    IUnknown *piunkOuter,      //Interface that controls aggregation
    REFIID riid,       //Interface identifier on new hyperlink object
    Void ** ppvObj     //Receives the requested interface's pointer
   );

Creates a standard hyperlink object from a COM object that supports the IDataObject interface.

piDataObj
[in] Address of the IDataObject interface on the data object of interest. Used to access the methods to retrieve the data from the object.
pihlsite
[in] Address of the IHlinkSite interface for the new hyperlink within its container.
dwSiteData
[in] Additional site data associated with the hyperlink site.
piunkOuter
[in] Address of the controlling IUnknown interface for the new hyperlink object. If NULL, the new hyperlink object is not aggregated.
riid
[in] Used to identify the interface to return on the new hyperlink. Typically IID_IHlink, or IID_IUnknown when punkOuter is non-NULL.
ppvObj
[out] On return, indirect pointer to the requested interface.

Typically, this object originates from a data transfer operation, such as copying to and pasting from the clipboard, or through a drag-and-drop operation.

HlinkCreateFromData is one of three helper functions that you can use to create a hyperlink. HlinkCreateFromData creates a hyperlink from a COM object that supports both the IDataObject interface and a hyperlink format CF_HYPERLINK on that IDataObject interface. HlinkQueryCreateFromData is typically called before the call to HlinkCreateFromData to determine if both these conditions are met. To create a hyperlink from a COM object for which you know the moniker, use HlinkCreateFromMoniker. To create a hyperlink from a COM object for which you have the name but not the moniker, use HlinkCreateFromString.

HlinkCreateFromData is typically used by a hyperlink container as part of a user interface that creates new hyperlinks through the clipboard or a drag-and-drop operation.

See also HlinkCreateFromMoniker, HlinkCreateFromString, HlinkQueryCreateFromData

HlinkCreateFromMoniker

HRESULT HlinkCreateFromMoniker(
    IMoniker * pimkTrgt,    //Interface on hyperlink target moniker
    LPCWSTR pwzLocation,    //Named location of hyperlink reference within target
    LPCWSTR pwzFriendlyName,     //Display name of hyperlink
    IHlinkSite * pihlsite,       //Interface on hyperlink site
    DWORD dwSiteData,       //Additional site data
    IUnknown * piunkOuter,       //Whether or not object is part of an aggregate
    REFIID riid,        //Interface identifier on new hyperlink object
    Void * ppvObj       //Receives the requested interface's pointer
   );

Creates a new system hyperlink object from a moniker, a location string, and a friendly name string (used for displaying the hyperlink).

pimkTrgt
[in] Address of the moniker to the hyperlink target for the new hyperlink. Must not be NULL.
pwzLocation
[in] Address of a named location within the hyperlink target that resolves to the hyperlink reference.
pwzFriendlyName
[in] Address of a string to use as the display name for the hyperlink.
pihlsite
[in] Address of the IHlinkSite object for the new hyperlink within the hyperlink container.
dwSiteData
[in] Additional site data for the new hyperlink object.
piunkOuter
[in] Address of the controlling IUnknown interface for the new hyperlink object. If NULL, the new hyperlink object is not aggregated.
riid
[in] Used to identify the interface to return on the new hyperlink. Typically IID_IHlink, or IID_IUnknown when punkOuter is non-NULL.
ppvObj
[out] On return, indirect pointer to the requested interface.

HlinkCreateFromMoniker is one of three helper functions that you can use to create a hyperlink. HlinkCreateFromData creates a hyperlink from a COM object that supports both the IDataObject interface and a hyperlink format CF_HYPERLINK on that IDataObject interface. HlinkQueryCreateFromData is typically called before the call to HlinkCreateFromData to determine if both these conditions are met. To create a hyperlink from a COM object for which you know the moniker, use HlinkCreateFromMoniker. To create a hyperlink from a COM object for which you have the name but not the moniker, use HlinkCreateFromString.

HlinkCreateFromMoniker creates new hyperlinks from an existing target moniker, a location string within the target, and a friendly name string used to identify how to display the hyperlink. This method's typical use is as part of a user interface for creating new hyperlinks from existing hyperlinks, or for editing existing hyperlinks, using a dialog box or form to prompt for the strings. This function is significantly faster than HlinkCreateFromString.

See also HlinkCreateFromData, HlinkCreateFromString, HlinkQueryCreateFromData

HlinkCreateFromString

HRESULT HlinkCreateFromString(
    LPCWSTR pwzTarget,    //String helping to identify the hyperlink target
    LPCWSTR pwzLocation,        //Location within the hyperlink target of new hyperlink object
    LPCWSTR pwzFriendlyName,    //Friendly name of the hyperlink
    IHlinkSite * pihlsite,      //Site for the new hyperlink object
    DWORD dwSiteData,     //Additional site data for the new hyperlink object
    IUnknown * piunkOuter,      //Whether or not object is part of an aggregate
    REFIID riid,     //Interface identifier on new browse context object
    Void * ppvObj    //Location of the requested interface's pointer
   );

Creates a new hyperlink object from strings representing the hyperlink target, the location within the target, and a friendly name.

pwzTarget
[in] Address of the string to help identify the hyperlink target. This string is resolved into a moniker through MkParseDisplayNameEx.
pwzLocation
[in] Address of the string representing the location within the hyperlink target for the new hyperlink. Must not be NULL.
pwzFriendlyName
[in] Address of the string to use as the friendly name for the hyperlink. This is typically a display name referenced by the user interface.
pihlsite
[in] Address of the IHlinkSite object for the new hyperlink within the hyperlink container.
dwSiteData
[in] Additional site data for the new hyperlink object.
piunkOuter
[in] Address of the controlling IUnknown interface for the new browse context. If NULL, the new browse context is not aggregated.
riid
[in] Used to identify the interface to return on the new hyperlink. Typically IID_IHlink, or IID_IUnknown when punkOuter is non-NULL.
ppvObj
[out] On return, indirect pointer to the requested interface.

HlinkCreateFromString is one of three helper functions that you can use to create a hyperlink. HlinkCreateFromData creates a hyperlink from a COM object that supports both the IDataObject interface and a hyperlink format CF_HYPERLINK on that IDataObject interface. HlinkQueryCreateFromData is typically called before the call to HlinkCreateFromData to determine if both these conditions are met.

To create a hyperlink from a COM object for which you know the moniker, use HlinkCreateFromMoniker. To create a hyperlink from a COM object for which you have the name but not the moniker, use HlinkCreateFromString.

HlinkCreateFromString is typically used by hyperlink containers as part of the user interface for creating brand new hyperlinks, where the user fills in a form or dialog box of items—target, location, friendly name—that are used to construct the hyperlink.

See also HlinkCreateFromData, HlinkCreateFromMoniker, HlinkQueryCreateFromData

HlinkGetSpecialReference

HRESULT HlinkGetSpecialReference(
    ULONG uReference,    //Special reference flags
    LPWSTR * ppwzReference    //Buffer to return special reference string
   );

For a given value from the HLSR enumeration, this function returns the current user's default global home, search, or history page for browsing as a string.

uReference
[in] A value taken from the HLSR enumeration.
ppwzReference
[out] Indirect pointer to the location to return the special reference string. Must not be NULL.

See also HlinkSetSpecialReference, HLSR

HlinkGoBack

HRESULT HlinkGoBack(
    IUnknown *pUnk    //IUnknown pointer to the initiating document or object
   );

Executes a hyperlink jump backward within the navigation stack.

pUnk
[in] Address of the IUnknown interface on the document or object that is initiating the hyperlink. Must not be NULL.

The HlinkGoBack helper function should be used by all applications, documents, and objects that have simple navigational needs. This single function call will "do the right thing" depending on whether the navigation is originating from within a hyperlink frame or within a hyperlink-unaware application.

The specified pointer pUnk must point to an object that is hosted within a hyperlink-aware container, such as Microsoft Internet Explorer or an ActiveX hyperlink frame.

Note that this function will work only if the object calling the function is the current object in the navigation stack. In HTML pages with frame sets, HlinkGoBack only affects the current frame.

See also HlinkGoForward

HlinkGoForward

HRESULT HlinkGoForward(
    IUnknown *pUnk    //IUnknown pointer to the initiating document or object
   );

Executes a hyperlink jump forward within the navigation stack.

pUnk
[in] Address of the IUnknown interface on the document or object that is initiating the hyperlink. Must not be NULL.

The HlinkGoForward helper function should be used by all applications, documents, and objects that have simple navigational needs. This single function call will "do the right thing" depending on whether the navigation is originating from within a hyperlink frame or within a hyperlink-unaware application.

The specified pointer pUnk must point to an object that is hosted within a hyperlink-aware container, such as Microsoft Internet Explorer or an ActiveX hyperlink frame.

Note that this function will work only if the object calling the function is the current object in the navigation stack. In HTML pages with frame sets, HlinkGoForward only affects the current frame.

See also HlinkGoBack

HlinkNavigate

HRESULT HlinkNavigate(
    IHlink * pihl,    //The target hyperlink
    IHlinkFrame * pihlframe,    //The hyperlink frame of the hyperlink container
    DWORD grfHLNF,    //Navigation flags
    LPBC pbc,    //Bind context object interface pointer
    IBindStatusCallback * pibsc,    //Bind status callback object interface pointer
    IHlinkBrowseContext * pihlbc    //Browse context object interface pointer
   );

Navigates to a hyperlink, given a hyperlink object and an optional hyperlink frame object.

pihl
[in] Address of the IHlink interface on the target hyperlink.
pihlframe
[in] Address of the IHlinkFrame interface of the hyperlink container. Can be NULL if the hyperlink container does not have a hyperlink frame.
grfHLNF
[in] Value taken from the HLNF enumeration.
pbc
[in] Address of the IBindCtx interface on the bind context to use for any moniker binding performed during the navigation. Must not be NULL.
pibsc
[in] Address of the IBindStatusCallback interface on the bind status context to use for any asynchronous moniker binding performed during the navigation. Can be NULL, in which case the caller is not interested in progress notification, cancellation, pausing, or low-level binding information.
pihlbc
[in] Address of the IHlinkBrowseContext interface pointer to use for this navigation. The browse context includes history information in which this navigation is logged, if !(grfHLNF & HLNF_CREATENOHISTORY).

HlinkNavigate encapsulates the following common sequence of calls:

if (phlFrame)
    phlFrame->Navigate(grfHLNF, pbc, pbsc, phl);
else if (phl)
    phl->Navigate(grfHLNF, pbc, pbsc, phlbc);

See also IHlinkBrowseContext, IHlink::Navigate, IHlinkFrame::Navigate, IHlinkTarget::Navigate

HlinkNavigateMoniker

HRESULT HlinkNavigateMoniker(
    IUnknown * pUnk,        //IUnknown pointer to the initiating document or object
    IMoniker * pmkTarget    //Moniker of the hyperlink target
   );

Executes a hyperlink jump to a new document or object (specified in pmkTarget).

pUnk
[in] Address of the IUnknown interface on the document or object that is initiating the hyperlink. If NULL, it is assumed the hyperlink originates from an ActiveX-unaware application.
pmkTarget
[in] Address of the moniker that identifies the hyperlink target. If NULL, the navigation is within a document.

HlinkNavigateMoniker is implemented as a simple macro that calls the HlinkSimpleNavigateToMoniker function, passing it NULL for most parameters.

The HlinkNavigateMoniker helper function should be used by all applications, documents, and objects that have simple navigation needs. This single function call will "do the right thing" depending on whether the navigation is originating from within a hyperlink frame or within a hyperlink-unaware application.

See also HLNF, HlinkNavigateString, HlinkNavigateToStringReference, HlinkSimpleNavigateToMoniker, IHlink::Navigate

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.