interface is an extension of IAdviseSink
and was defined to prevent overloading the IAdviseSink::OnRename
method. Without IAdviseSink2
, embedded objects and link sources, upon being renamed, would both have to
notify their containers by calling IAdviseSink::OnRename
. In applications where different blocks of code might execute depending on
which of these two similar events has occurred, using the same method for both
events complicates testing and debugging. With IAdviseSink2
, embedded objects whose name has changed still call IAdviseSink::OnRename
, but the link object maps this notification to IAdviseSink2::OnLinkSrcChange
. Making this distinction explicit makes it easier to test and maintain your
When to Implement
If your application supports links, you should definitely implement IAdviseSink2
. Even if your application does not support links, it may do so in future
releases. Since the IAdviseSink2
interface inherits all the methods of IAdviseSink
without additional overhead, it makes sense to implement IAdviseSink2
in all cases.
When to Use
When a link source is renamed, the link object should notify its container by
Methods in Vtable Order
||Returns pointers to supported interfaces.
||Increments reference count.
||Decrements reference count.
||Advises that data has changed.
||Advises that view of object has changed.
||Advises that name of object has changed.
||Advises that object has been saved to disk.
||Advises that object has been closed.
||Advises that link source has changed.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages