cookie CmGetRemoteContext

Description

CmGetRemoteContext stores the contents of a CmContainer into an encrypted and compressed remote Context File (*.WibuCmRaC).

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmGetRemoteContext(const char *pszRacFile, CMUINT flCtrl, HCMSysEntry hcmBox, CMUINT *pulFirmCodes, CMUINT cbFirmCodes)

Parameter

pszRacFile contains a pointer to the NULL-terminated filename of the Context File *.WibuCmRaC.

flCtrl contains one of the following flags:

nav_open CM_RMT_OVERWRITE overwrites the Context File *.WibuCmRaC, if it already exists.

nav_open CM_RMT_APPEND appends the context data to the Context File *.WibuCmRaC, if it already exists.

If the *.WibuCmRaC file does not exist yet, it will be created independently of these flags.

hcmBox contains a handle to the CmContainer of which the context is to be stored (can be Box Access or Entry Access).

pulFirmCodes contains a pointer to a list of Firm Codes to be stored.

cbFirmCodes contains the number of Firm Codes in pulFirmCodes.

Return

Returns the number of Firm Items stored in the Context File *.WibuCmRaC.

Notes

If a Firm Item with the specified Firm Code does not exist in the CmContainer, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC.

Syntax

public bool CmGetRemoteContext(HCMSysEntry hcmse, string RacFile, CmGetContextFileOption Ctrl, uint[] FirmCodes)

Parameter

RacFile contains the filename of the Context File *.WibuCmRaC.

CmGetContextFileOption contains one of the following flags:

nav_open Overwrite overwrites the Context File *.WibuCmRaC, if it already exists.

nav_open Append appends the context data to the Context File *.WibuCmRaC, if it already exists.

If the *.WibuCmRaC file does not exist yet, it will be created independently of these flags.

hcmse hcmse contains a handle to the CmContainer of which the Context is to be stored (can be Box Access or Entry Access).

FirmCodes contains a list of Firm Codes to be stored.

Return

Returns the number of Firm Items stored in the Context File *.WibuCmRaC.

Notes

If a Firm Item with the specified Firm Code does not exist in the CmContainer, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC.

 

Syntax

import cmapi
 
handle.CmGetRemoteContext(pszRacFile: str, flCtrl: int,
 pulFirmCodes: List[int]) -> int
throws CodeMeterApiFailedException()

Parameter

handle is the handle of which the context is to be stored (can be Box Access or Entry Access).

pszRacFile contains a pointer to the NULL-terminated filename of the Context File *.WibuCmRaC.

flCtrl contains one of the following flags:

nav_open cmapi.CM_RMT_OVERWRITE overwrites the Context File *.WibuCmRaC, if it already exists.

nav_open cmapi.CM_RMT_APPEND appends the context data to the Context File *.WibuCmRaC, if it already exists.

If the *.WibuCmRaC file does not exist yet, it will be created independently of these flags.

pulFirmCodes contains a pointer to a list of Firm Codes to be stored.

Return

Returns the number of Firm Items stored in the Context File *.WibuCmRaC.

Notes

If a Firm Item with the specified Firm Code does not exist in the CmContainer, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC.