ITransferSource::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 notification interface ITransferAdviseSink 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 ITransferSource::Unadvise method. If the connection was not successfully established, this value is zero.
Return value
Type: HRESULT
Any HRESULTs other than listed indicate a failure.
Return code | Description |
---|---|
|
The Interface successfully associated. |
|
The handler can only handle one sink interface. |
Remarks
Call ITransferSource::Advise before calling any other methods in this interface to enable an advisory session. If not set, the handler should consider it an indication that no feedback is available and to do the "default" operation without consulting the calling application.
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) |