Skip to content

Latest commit

 

History

History
105 lines (81 loc) · 5.29 KB

nf-oleidl-iolelink-getsourcemoniker.md

File metadata and controls

105 lines (81 loc) · 5.29 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:oleidl.IOleLink.GetSourceMoniker
IOleLink::GetSourceMoniker (oleidl.h)
Retrieves the moniker identifying the link source of a linked object.
GetSourceMoniker
GetSourceMoniker method [COM]
GetSourceMoniker method [COM]
IOleLink interface
IOleLink interface [COM]
GetSourceMoniker method
IOleLink.GetSourceMoniker
IOleLink::GetSourceMoniker
_ole_iolelink_getsourcemoniker
com.iolelink_getsourcemoniker
oleidl/IOleLink::GetSourceMoniker
com\iolelink_getsourcemoniker.htm
com
ef447726-7aef-45c4-a522-a8de9a3e6b74
12/05/2018
GetSourceMoniker, GetSourceMoniker method [COM], GetSourceMoniker method [COM],IOleLink interface, IOleLink interface [COM],GetSourceMoniker method, IOleLink.GetSourceMoniker, IOleLink::GetSourceMoniker, _ole_iolelink_getsourcemoniker, com.iolelink_getsourcemoniker, oleidl/IOleLink::GetSourceMoniker
oleidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
OleIdl.Idl
Windows
19H1
IOleLink::GetSourceMoniker
oleidl/IOleLink::GetSourceMoniker
c++
APIRef
kbSyntax
COM
OleIdl.h
IOleLink.GetSourceMoniker

IOleLink::GetSourceMoniker

-description

Retrieves the moniker identifying the link source of a linked object.

-parameters

-param ppmk [out]

Address of an IMoniker pointer variable that receives the interface pointer to an absolute moniker that identifies the link source. When successful, the implementation must call AddRef on ppmk; it is the caller's responsibility to call Release. If an error occurs the implementation must set ppmk to NULL.

-returns

This method returns S_OK on success. Other possible return values include the following.

Return code Description
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::GetDisplayName method to get the display name of the moniker. If you would rather get the display name directly, your container can call IOleLink::GetSourceDisplayName instead of IOleLink::GetSourceMoniker.

If you use the OleUIEditLinks function to display the Links dialog box, you must implement the IOleUILinkContainer interface. The dialog box calls your implementations of IOleUILinkContainer::GetLinkSource to get the string it should display. Your implementation of that method can call IOleLink::GetSourceMoniker.

Notes to Implementers

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 functions to create a link. The application can call IOleLink::GetSourceMoniker or IOleLink::GetSourceDisplayName to change the absolute moniker. In addition, the linked object automatically updates the monikers whenever it successfully binds to the link source, or when it is bound to the link source and it receives a rename notification through the IAdviseSink::OnRename method.

-see-also

IOleLink

IOleLink::GetSourceDisplayName

IOleLink::GetSourceMoniker