IFileOperation::Advise method (shobjidl_core.h)

Enables a handler to provide status and error information for all operations.

Syntax

HRESULT Advise(
  [in]  IFileOperationProgressSink *pfops,
  [out] DWORD                      *pdwCookie
);

Parameters

[in] pfops

Type: IFileOperationProgressSink*

Pointer to an IFileOperationProgressSink object to be used for progress status and error notifications.

[out] pdwCookie

Type: DWORD*

When this method returns, this parameter points to a returned token that uniquely identifies this connection. The calling application uses this token later to delete the connection by passing it to IFileOperation::Unadvise. If the call to Advise fails, this value is meaningless.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Several individual methods have the ability to declare their own progress sinks, which are redundant to the one set here. They are used when you only want to be given progress and error information for a specific 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)

See also

IFileOperation

IFileOperation::Unadvise