Sets the advisory connection between an object and its container.
Syntax
HRESULT Advise( IDispatch *pdisp, DWORD *pdwCookie );
Parameters
- pdisp
- [in] Address of the IDispatch interface on the client's advise sink. The client's sink receives outgoing calls from the connection point.
- pdwCookie
- [out] Address of an unsigned long integer value that contains the returned token that uniquely identifies this connection. The caller uses this token later to delete the connection by passing it to the ISimpleConnectionPoint::Unadvise method. If the connection is not successfully established, this value is 0.
Return Value
Returns S_OK if successful, or an error code otherwise.