CmGetRemoteContext2
Description
CmGetRemoteContext2 stores the contents of a CmContainer into an encrypted and compressed remote Context File (*.WibuCmRaC).
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmGetRemoteContext2(HCMSysEntry hcmBox, CMUINT flCtrl, void *pvRacFile, CMUINT *pulFirmCodes, CMUINT cbFirmCodes)
Parameter
hcmBox contains a handle to the CmContainer of which the context is to be stored (can be Box Access or Entry Access).
flCtrl contains one of the following flags:
CM_RMT_OVERWRITE overwrites the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
CM_RMT_APPEND appends the context data to the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
If the *.WibuCmRaC file does not exist yet, it will be created independently of the above flags.
CM_RMT_LOCAL_ENCODING uses local encoding for the given filename.
CM_RMT_UTF8_ENCODING uses UTF8 encoding for the given filename.
CM_RMT_WCHAR_ENCODING uses wchar encoding for the given filename.
If no encoding flag is set, the local encoding is used.
pvRacFile contains a pointer to the NULL-terminated filename of the Context File *.WibuCmRaC in the encoding that is defined in flCtrl.
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 CmDongle, 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
hcmse hcmse contains a handle to the CmContainer of which the context is to be stored (can be Box Access or Entry Access).
CmGetContextFileOption contains one of the following flags:
Overwrite overwrites the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
Append appends the context data to the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
If the Context File *.WibuCmRaC does not exist yet, it will be created independently of the above flags.
If no encoding flag is set, the local encoding is used.
RacFile contains the Context File *.WibuCmRaC.
FirmCodes contains a list of Firm Codes to be stored.
Return
Returns true, if the operation has been successful, otherwise false.
Notes
If a Firm Item with the specified Firm Code does not exist in the CmDongle, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC.
Syntax
import cmapi
handle.CmGetRemoteContext2(flCtrl: int, pvRacFile: str,
pulFirmCodes: List[int]) -> int
throws CodeMeterApiFailedException()
Parameter
handle is the handle to the CmContainer of which the context is to be stored (can be Box Access or Entry Access).
flCtrl contains one of the following flags:
cmapi.CM_RMT_OVERWRITE overwrites the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
cmapi.CM_RMT_APPEND appends the context data to the Context File *.WibuCmRaC / Modified Context File *.WibuCmRaM, if it already exists.
If the *.WibuCmRaC file does not exist yet, it will be created independently of the above flags.
cmapi.CM_RMT_LOCAL_ENCODING uses local encoding for the given filename.
cmapi.CM_RMT_UTF8_ENCODING uses UTF8 encoding for the given filename.
cmapi.CM_RMT_WCHAR_ENCODING uses wchar encoding for the given filename.
If no encoding flag is set, the local encoding is used.
pvRacFile contains a pointer to the NULL-terminated filename of the Context File *.WibuCmRaC in the encoding that is defined in flCtrl.
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 CmDongle, CmReserveFirmItem() will be called implicitly. The result will then be stored in the Context File *.WibuCmRaC.