WasOperationCancelled method
If the most recent SearchFolder, OpenDoc, or RetrieveDoc operation was cancelled, the result variable is set to a nonzero value; otherwise, to zero.
- Method
- short WasOperationCancelled(
- Parameter
- pCancelled
- Points to a variable to receive the result. On return, this variable is set to type VT_I2.
- Description
- If the most recent SearchFolder, OpenDoc, or RetrieveDoc operation was cancelled, the result variable is set to a nonzero value; otherwise, to zero.
- Return Value
- Refer to return codes.
- See Also
- CancelOperation method
C/C + +
The following example searches a folder and determines whether the search was cancelled. CArsOle * pArsCtrl;
short rc;
VARIANT cancelled;
.
.
rc = pArsCtrl->SearchFolder( FALSE );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
rc = pArsCtrl->WasOperationCancelled( &cancelled );
if ( cancelled.iVal )
CANCELLATION LOGIC;
.
.
Visual Basic
Dim rc As Integer
Dim cancelled As Variant
.
.
rc = ArsOle.SearchFolder (False)
If rc <> ARS_OLE_RC_SUCCESS Then
MsgBox "ERROR"
End
End If
rc = ArsOle.WasOperationCancelled (cancelled)
If cancelled <> 0 Then
CANCELLATION LOGIC
End If
.
.