Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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.
IOleLinkalso 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 IOleLinkthat is suitable for all situations. This implementation is used automatically whenever you create or load a linked object.
When to Use
You must use IOleLinkif you are writing a container application that allows its documents to contain linked objects.
You primarily call IOleLinkmethods to implement the Linksdialog box.
Some IOleLinkmethods do not have to be called directly. Instead, you call methods of IOleObject; the default linked object provides an implementation of IOleObjectthat often calls methods of IOleLink.
For example, a container application typically activates a linked object by calling the IOleObject::DoVerbmethod, which in turn calls the IOleLink::BindToSourcemethod.
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 IUnknowninterface.
IUnknown method | Description |
---|---|
Returns pointers to supported interfaces. |
|
Increments reference count. |
|
Decrements reference count. |
IOleLink method | Description |
---|---|
Sets the update options. |
|
Returns the update options. |
|
Sets the moniker for the link source. |
|
Returns the moniker for the link source. |
|
Sets the display name for the link source. |
|
Returns the display name for the link source. |
|
Binds the moniker to the link source. |
|
Binds the moniker if the source is running. |
|
Returns a pointer to the link source if it is running. |
|
Breaks the connection to the link source. |
|
Updates the cached views of the link source. |
Remarks
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | Oleidl.h, oleidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |