Partager via


IOleLink:IUnknown (Windows CE 5.0)

Send Feedback

This interface provide 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.

IOleLink also provides functions for binding to link sources and for activating the connection to the document that stores the linked object's data.

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 to implement the Links dialog box.

If you use the OleUIEditLinks function to display the Links dialog box, your calls to IOleLink methods take place in your implementation of the IOleUILinkContainer interface.

Some IOleLink methods do not 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 the IOleObject::DoVerb method, which in turn calls the IOleLink::BindToSource method.

Methods

The following table shows the methods for this interface in the order that the compiler calls the methods. Like all COM interfaces, this interface inherits the methods for the IUnknown interface.

IUnknown method Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.
IOleLink method Description
SetUpdateOptions Sets the update options.
GetUpdateOptions Returns the update options.
SetSourceMoniker Sets the moniker for the link source.
GetSourceMoniker Returns the moniker for the link source.
SetSourceDisplayName Sets the display name for the link source.
GetSourceDisplayName Returns the display name for the link source.
BindToSource Binds the moniker to the link source.
BindIfRunning Binds the moniker if the source is running.
GetBoundSource Returns a pointer to the link source if it is running.
UnbindSource Breaks the connection to the link source.
Update Updates the cached views of the link source.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IOleObject | IOleLink::BindToSource | IOleObject::DoVerb

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.