Export (0) Print
Expand All

IFileOperation::Advise method

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

Syntax


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

Parameters

pfops [in]

Type: IFileOperationProgressSink*

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

pdwCookie [out]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IFileOperation
IFileOperation::Unadvise

 

 

Community Additions

ADD
Show:
© 2014 Microsoft