CmEmbedded_4c_transp CmExecuteRemoteUpdate

Description

CmExecuteRemoteUpdate executes the given updates and applies them as specified. This function allows the same handling for CmDongles and CmActLicenses regarding the update process. It allows also to apply several updates in one step but getting feedback for each update.

With CmExecuteRemoteUpdate you can execute the contents of Update Files (*.WibuCmRaU) and of license information files (*.wbb). If you have files you need to read, the files by yourself and store the contents in the memory buffer.

  • C, C++

Syntax

int CMAPIENTRY CmExecuteRemoteUpdate(HCMSysEntry hcmse, CMULONG flCtrl, void* pMemBuffer, CMUINT cbMemBuffer, CMFAS *pCmFasSelect, CMUINT cbCmFasSelect, CMFAS *pCmFasResult, CMUINT cbCmFasResult, CMUINT *pcbCmFasResultCount)

Parameter

hcmse contains the handle opened by CmAccess2 (must be Subsystem Access).

flCtrl contains one of the following commands:

nav_open CMFAS_CTL_CMD_LIST lists all updates and simulates the execution without any change on the licenses. The input structure pCmFasSelect has to be null. This flag cannot be combined with any other flag. The simulated result can be found in pCmFasResult.mulResult.

nav_open CMFAS_CTL_CMD_UPDATE all updates are executed. Any set restriction in pCmFasSelect is respected.

nav_open CMFAS_CTL_CMD_UPDATE_EXISTING only updates for existing CmContainer are executed. Any set restriction in pCmFasSelect is respected. If the additional option CMFAS_CTL_OPT_ABORT_ON_ERROR is set, the command only aborts, if an update of an existing CmContainer fails.

nav_open CMFAS_CTL_CMD_GET_COUNT returns the count of needed structures of structure hmtoggle_plus1 CMFAS for pCmFasResult. All other parameters can be null resp. 0.

To retrieve all the command options you can use CMFAS_CTL_CMD_MASK.

These flags can be or'ed with one of the following flags:

•CMFAS_CTL_OPT_ABORT_ON_ERROR: If more than one update is specified, the command aborts at the first error.

To retrieve all the command options you can use CMFAS_CTL_OPT_MASK specifies all flags of the optional command options.

pMemBuffer contains the data of the update.

cbMemBuffer contains the length of pMemBuffer.

pCmFasSelect contains an array of structures with input data, e.g. the definition which updates should be applied.

cbCmFasSelect contains the count of CMFAS structures contained in pCmFasSelect.

pCmFasResult contains an array of CMFAS structures with output data, e.g. which updates were successful.

cbCmFasResult contains the count of CMFAS structures contained in pCmFasResult.

pcbCmFasResultCount retrieves the count of filled CMFAS structures in pCmFasResult.

Return

Returns TRUE, if all specified updates were successful, FALSE otherwise.

If the error code CMERROR_BUFFER_OVERFLOW is set, the count of CMFAS structures in pCmFasResult was too small; the needed count can be found in pcbCmFasResultCount.

If the option CMFAS_CTL_OPT_ABORT_ON_ERROR was set and the command aborted due to an error, the error code is set to the specific error code of the update that has failed.

If the error code CMERROR_UPDATE_FAILED is set, more than one update was specified and at least one failed; detailed information can be found in pCmFasResult.

Notes

Detailed information about the results of the update execution can be found in pCmFasResult.