IViewObject::GetAdvise

Retrieves the existing advisory connection on the object if there is one. This method simply returns the parameters used in the most recent call to the IViewObject::SetAdvise method.

HRESULT GetAdvise(

DWORD * pdwAspect,

//Pointer to where dwAspect parameter from previous SetAdvise call is returned

DWORD * padvf,

//Pointer to where advf parameter from previous SetAdvise call is returned

IAdviseSink ** ppAdvSink

//Indirect pointer to interface on an advise sink

);

Parameters

pdwAspect
[out] Pointer to where the dwAspect parameter from the previous SetAdvise call is returned. If this pointer is NULL, the caller does not permit this value to be returned.
padvf
[out] Pointer to where the advf parameter from the previous SetAdvise call is returned. If this pointer is NULL, the caller does not permit this value to be returned.
ppAdvSink
[out] Indirect pointer to an IAdviseSink interface on an advise sink. The connection to this advise sink must have been established with a previous SetAdvise call, which provides the pAdvSink parameter. If this pointer is NULL, there is no established advisory connection.

Return Values

This method supports the standard return values E_INVALIDARG and E_OUTOFMEMORY, as well as the following:

S_OK
The existing advisory connection was retrieved.

See Also

ADVF, IAdviseSink, IViewObject::SetAdvise