IOleLink::GetSourceMoniker
Retrieves the
moniker identifying the link source of a linked object.
HRESULT GetSourceMoniker(
IMoniker
**ppmk |
//Indirect pointer to a moniker identifying link
source |
); |
|
Parameter
ppmk
[out] When
successful, indirect pointer to the IMoniker interface on an absolute
moniker that identifies the link source. In this case, the implementation must
call IUnknown::AddRef
Return Values
S_OK
The moniker
was returned successfully.
MK_E_UNAVAILABLE
No moniker is
available.
Remarks
Notes to Callers
Your
container application can call IOleLink::GetSourceMoniker to display the
current source of a link in the Links dialog box. Note that this requires your
container to use the IMoniker::GetDisplayName2BE2_IB method to get the display name of the
moniker. If you d rather get the display name directly, your container can call
IOleLink::GetSourceDisplayName instead of IOleLink::GetSourceMoniker.
If you use
the OleUIEditLinks
Notes on Provided Implementation
The linked
object stores both an absolute and a relative moniker for the link source. If
the relative moniker is non-NULL and a moniker is available for the compound
document, IOleLink::GetSourceMoniker returns the moniker created by
composing the relative moniker onto the end of the compound document s moniker.
Otherwise, it returns the absolute moniker or, if an error occurs, NULL.
The container specifies
the absolute moniker when it calls one of the OleCreateLink
See Also