IOleLink interface
Enables a linked object to provide 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 provides 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 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.
Members
The IOleLink interface inherits from the IUnknown interface. IOleLink also has these types of members:
Methods
The IOleLink interface has these methods.
| Method | Description |
|---|---|
| BindIfRunning |
Activates the connection between the linked object and the link source if the link source is already running. |
| BindToSource |
Activates the connection to the link source by binding the moniker stored within the linked object. |
| GetBoundSource |
Retrieves a pointer to the link source if the connection is active. |
| GetSourceDisplayName |
Retrieves the display name of the link source of the linked object. |
| GetSourceMoniker |
Retrieves the moniker identifying the link source of a linked object. |
| GetUpdateOptions |
Retrieves a value indicating how often the linked object updates its cached data. |
| SetSourceDisplayName |
Sets the display name for the link source. |
| SetSourceMoniker |
Sets the moniker for the link source. |
| SetUpdateOptions |
Specifies how often a linked object should update its cached data. |
| UnbindSource |
Breaks the connection between a linked object and its link source. |
| Update |
Updates the compound document's cached data for a linked object. |
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IOleLink is defined as 0000011d-0000-0000-C000-000000000046 |
See also