This topic has not yet been rated - Rate this topic

IOleObject::Unadvise method

Applies to: desktop apps only

Deletes a previously established advisory connection.

Syntax

HRESULT Unadvise(
  [in]  DWORD dwConnection
);

Parameters

dwConnection [in]

Contains a token of nonzero value, which was previously returned from IOleObject::Advise through its pdwConnection parameter.

Return value

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

Return codeDescription
E_FAIL

The operation failed.

OLE_E_NOCONNECTION

dwConnection does not represent a valid advisory connection.

 

Remarks

Normally, containers call IOleObject::Unadvise at shutdown or when an object is deleted. In certain cases, containers can call this method on objects that are running but not currently visible as a way of reducing the overhead of maintaining multiple advisory connections. The easiest way to implement this method is to delegate the call to IOleObject::Unadvise.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

OleIdl.h

IDL

OleIdl.Idl

IID

IID_IOleObject is defined as 00000112-0000-0000-C000-000000000046

See also

IOleObject
IOleObject::Advise
IOleObject::EnumAdvise
IOleAdviseHolder::Unadvise

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ