IAdviseSink2::OnLinkSrcChange method (objidl.h)

Notifies the container that registered the advise sink that a link source has changed (either name or location), enabling the container to update the link's moniker.

Syntax

void OnLinkSrcChange(
  [in] IMoniker *pmk
);

Parameters

[in] pmk

A pointer to the IMoniker interface identifying the source of a linked object.

Return value

None

Remarks

A container of linked objects implements this method to receive notification in the event of a change in the moniker of its link source.

OnLinkSrcChange is called by the OLE link object when it receives the OnRename notification from the link-source (object) application. The link object updates its moniker and sends the OnLinkSrcChange notification to containers that have implemented IAdviseSink2.

Notes to Implementers

Nothing prevents a link object from notifying its container of the moniker change by calling OnRename instead of OnLinkSrcChange. In practice, however, overloading OnRename to mean either that a link object's moniker has changed or that an embedded object's server name has changed makes it difficult for applications to determine which of these events has occurred. If the two events trigger different processing, as will often be the case, calling a different method for each makes the job of determining which event occurred much easier.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidl.h

See also

IAdviseSink2

IAdviseSink::OnRename