cookie 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.

tmr_02

Triple Mode Redundancy-related information (TMR)

 

  • C, C++
  • C#
  • Python

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 CmAccess / 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.

Syntax

This method is overloaded, i.e. the same method name is used with different type of parameters or different set of parameters.

Method 1:

public bool CmExecuteRemoteUpdate(HCMSysEntry hcmSubSystem, CmExecuteRemoteUpdateOption Ctrl, string Buffer, CmFas[] CmFasSelect, out CmFas[] CmFasResult)

This method overload returns true or false.

Method 2:

public bool CmExecuteRemoteUpdate(HCMSysEntry hcmSubSystem, CmExecuteRemoteUpdateOption Ctrl, byte[] Buffer, CmFas[] CmFasSelect, out CmFas[] CmFasResult)

This method overload returns true or false.

Parameter

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

CmExecuteRemoteUpdateOption contains one of the following commands:

nav_open CmdList: lists all updates and simulates the execution without any change on the licenses. The input structure CmFasSelect has to be null. This flag cannot be combined with any other flag. The simulated result can be found in CmFasResult.Result.

nav_open CmdUpdate: all updates are executed. Any set restriction in CmFasSelect is respected.

nav_open CmdUpdateExisting: only updates for existing CmContainer are executed. Any set restriction in CmFasSelect is respected. If the additional option OptAbortOnError is set, the command only aborts, if an update of an existing CmContainer fails.

nav_open CmdGetCount: returns the count of needed structures of class hmtoggle_plus1 CmFas for CmFasResult. All other parameters can be null resp. 0.

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

nav_open OptAbortOnError If more than one update is specified, the command aborts at the first error.

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

nav_open Buffer contains the data of the update.

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

CmFasResult contains an array of CmFas classes with output data, e.g. which updates were successful.

Return

Returns true, if all specified updates were successful, false otherwise.

If the option OptAbortOnError 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 CMERROR_UPDATE_FAILED is set, more than one update was specified and at least one failed; detailed information can be found in CmFasResult.

Notes

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

 

Syntax

import cmapi
 
handle.CmExecuteRemoteUpdate(flCtrl: int, pMemBuffer: bytes,
 pCmFasSelect: cmapi.CMFAS) -> List[cmapi.CMFAS]

Parameter

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

flCtrl contains one of the following commands:

nav_open cmapi.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 cmapi.CMFAS_CTL_CMD_UPDATE all updates are executed. Any set restriction in pCmFasSelect is respected.

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

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

To retrieve all the command options you can use cmapi.CMFAS_CTL_CMD_MASK.

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

•cmapi.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 cmapi.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.

Return

Returns an array of cmapi.CMFAS classes with output data, e.g. which updates were successful.

If the option cmapi.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.