SetResourceCacheMode method

The requested mode is set.

Method
short SetResourceCacheMode(
short Mode )
Parameters
Mode
Specifies the new resource cache mode. This must be one of the following mode values found in ARSOLEEX.H:
ARS_OLE_RES_MODE_RETAIN
ARS_OLE_RES_MODE_ERASE_AFTER_RETRIEVE

ARS_OLE_RES_MODE_RETAIN specifies that any resource group retrieved during execution of a RetrieveDoc method be retained for use by subsequent RetrieveDoc or OpenDoc methods. Files containing these resource groups are not erased until all instances of the control have been terminated. This is the default mode.

ARS_OLE_RES_MODE_ERASE_AFTER_RETRIEVE specifies that the file for any resource group retrieved during execution of a RetrieveDoc method be erased before returning to the caller. If subsequent RetrieveDoc or OpenDoc methods require access to the same resource group, another retrieval is required.

Description
The requested mode is set.
Return Value
Refer to return codes.
See Also
RetrieveDoc method

C/C++

The following example sets the resource cache mode to retain.
CArsOle * pArsCtrl;
short rc;
.
.
rc = pArsCtrl->SetResourceCacheMode( ARS_OLE_RES_MODE_RETAIN );
if ( rc != ARS_OLE_RC_SUCCESS )
  ERROR;
.
.

Visual Basic

Dim rc As Integer
.
.
rc = ArsOle.SetResourceCacheMode (ARS_OLE_RES_MODE_RETAIN)
if rc <> ARS_OLE_RC_SUCCESS Then
   MsgBox "ERROR"
   End
End If
.
.