IOleLink  2JQEZ_K

The IOleLink interface is the means by which a linked object provides its container with functions pertaining to linking. The most important of these functions is binding to the link source, that is, activating the connection to the document that stores the linked object s native data. IOleLink also defines functions for managing information about the linked object, such as the location of the link source and the cached presentation data for the linked object.

A container application can distinguish between embedded objects and linked objects by querying for IOleLink; only linked objects implement IOleLink.

When to Implement

You do not have to implement this interface yourself; the system supplies an implementation of IOleLink that is suitable for all situations. This implementation is used automatically whenever you create or load a linked object.

When to Use

You must use IOleLink if you are writing a container application that allows its documents to contain linked objects. You primarily call IOleLink methods in order to implement the Links dialog box. If you use the OleUIEditLinks_WWWDZ function to display the Links dialog box, your calls to IOleLink methods take place in your implementation of the IOleUILinkContainer interface.

Some IOleLink methods don t have to be called directly. Instead, you call methods of IOleObject; the default linked object provides an implementation of IOleObject that often calls methods of IOleLink. For example, a container application typically activates a linked object by calling IOleObject::DoVerb, which in turn calls IOleLink::BindToSource.

Methods in VTable Order

IUnknown Methods

Description

QueryInterface2Y54585

Returns pointers to supported interfaces.

AddRef1SHW0SS

Increments the reference count.

ReleaseDUW01A

Decrements the reference count.

 

IOleLink Methods

Description

SetUpdateOptions1DMZAWD

Sets the update options.

GetUpdateOptions1QRLOVC

Returns the update options.

SetSourceMonikerO4.JCE

Sets the moniker for the link source.

GetSourceMoniker118YXBD

Returns the moniker for the link source.

SetSourceDisplayName23YU__P

Sets the display name for the link source.

GetSourceDisplayName2N679GV

Returns the display name for the link source.

BindToSource2X4L9P3

Binds the moniker to the link source.

BindIfRunning1RQUZYF

Binds the moniker if the source is running.

GetBoundSourceX_DYA1

Returns a pointer to the link source if it s running.

UnbindSourceM21J3Y

Break connection to the link source.

Update4.PM_YU

Update the cached views of the link source.

 

See Also

IOleObject, IOleUILinkContainer, OleUIEditLinks