IAdviseSink2::OnLinkSrcChange method

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

pmk [in]

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

Return value

This method does not return a value.

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IAdviseSink2 is defined as 00000151-0000-0000-C000-000000000046

See also

IAdviseSink::OnRename
IAdviseSink2

 

 

Show: