ITransferDestination::Advise method (shobjidl_core.h)

Sets up an advisory connection for notifications on the status of file operations.

Syntax

HRESULT Advise(
  [in]  ITransferAdviseSink *psink,
  [out] DWORD               *pdwCookie
);

Parameters

[in] psink

Type: ITransferAdviseSink*

A pointer to an ITransferAdviseSink notification interface to update the calling application using methods on this interface.

[out] pdwCookie

Type: DWORD*

A pointer to a returned token that uniquely identifies this connection. The calling application uses this token later to delete the connection by passing it to the ITransferDestination::Unadvise method. If the connection is not successfully established, this value is zero.

Return value

Type: HRESULT

Any HRESULTs other than listed indicate a failure.

Return code Description
S_OK
The Interface successfully associated.
E_UNEXPECTED
The handler can only handle one sink interface.

Remarks

Call ITransferDestination::Advise before calling any other ITransferDestination methods so the handler can callback for any errors that might occur. If not set, the handler should consider it an indication that no feedback is available and do the "default" operation.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)