IIOCancelInformation::SetCancelInformation method (shobjidl_core.h)
Sets information that is posted when a user selects Cancel from the progress UI. Allows the main object to tell the progress dialog thread about the process thread so that the progress dialog can send the process thread the message id when the user clicks Cancel.
Syntax
HRESULT SetCancelInformation(
[in] DWORD dwThreadID,
[in] UINT uMsgCancel
);
Parameters
[in] dwThreadID
Type: DWORD
The ID of the process thread to be canceled.
[in] uMsgCancel
Type: UINT
The cancel message to be posted to the thread.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
When the user selects Cancel from the progress UI, the dwThreadID will cancel any pending or future input/output (I/O) requests. Also the uMsgCancel message, received from the progress dialog, will be posted to the thread to tell it to exit a wait state, if asynchronous I/O is pending.
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) |
DLL | Shell32.dll |