UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NN:shobjidl_core.IFileOperationProgressSink |
IFileOperationProgressSink (shobjidl_core.h) |
Exposes methods that provide a rich notification system used by callers of IFileOperation to monitor the details of the operations they are performing through that interface. |
|
shell\IFileOperationProgressSink.htm |
shell |
24b20e05-d8be-4060-a966-7b32d9225403 |
12/05/2018 |
IFileOperationProgressSink, IFileOperationProgressSink interface [Windows Shell], IFileOperationProgressSink interface [Windows Shell],described, _shell_IFileOperationProgressSink, shell.IFileOperationProgressSink, shobjidl_core/IFileOperationProgressSink |
shobjidl_core.h |
Shobjidl.h |
Windows |
Windows Vista [desktop apps only] |
Windows Server 2008 [desktop apps only] |
Shobjidl.idl |
Windows |
19H1 |
|
|
|
|
|
|
Exposes methods that provide a rich notification system used by callers of IFileOperation to monitor the details of the operations they are performing through that interface.
The IFileOperationProgressSink interface inherits from the IUnknown interface. IFileOperationProgressSink also has these types of members:
Applications must implement IFileOperationProgressSink themselves. Windows does not provide a default implementation. IFileOperationProgressSink are essentially handlers for particular events. They are used normally to display information about the specific action being processed at that time, such as the name of a file, source and destination, and the new name of the item at the destination. Post methods receive the HRESULT of each part of the operation so that the caller can determine specifically where the process fails if it does. IFileOperation method parameter values are passed to the appropriate IFileOperationProgressSink methods so that they have access to the same information.To attach an implementation of IFileOperationProgressSink to a call to IFileOperation, you have two options:
- To be advised of all operations performed by the call to IFileOperation, use the IFileOperation::Advise method.
- To be notified only of progress for specific operations, pass IFileOperationProgressSink to one or more of these individual IFileOperation methods:
If you choose to pass IFileOperationProgressSink only to select methods, the same instance of IFileOperationProgressSink can be used for them all.
The following example passes IFileOperationProgressSink to an instance of IFileOperation by calling the Advise method.IFileOperation *pfo;
CoCreateInstance(CLSID_FileOperation, NULL, CLSCTX_ALL, IID_IFileOperation, (void **)&m_pFO)
HRESULT hr = SHCreateFileOperation(hwnd, 0, IID_PPV_ARGS(&pfo));
if (SUCCEEDED(hr))
{
// Advise to get notifications
DWORD dwCookie;
hr = pfo->Advise(SAFECAST(this, IFileOperationProgressSink*), &dwCookie);
}