ITransferDestination::Advise method

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

Syntax


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

Parameters

psink [in]

Type: ITransferAdviseSink*

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

pdwCookie [out]

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 codeDescription
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Show: