CmLtImportUpdate
Description
This function imports update data into the license transfer target side. This call will decrypt the data, check signatures and import the transferred license into the system.
For more details see the respective knowledge base article on license transfer.
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmLtImportUpdate(
HCMSysEntry hcmse, CMULONG flCtrl, void* pUpdate, CMUINT cbUpdate);
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access, Entry Access or Firm Item Access). Principally, a Box Access handle is set.
flCtrl is currently not used since all required information is part of the update.
pUpdate points to a byte buffer containing the data to be imported (Update File *.WibuCmRaU format).
cbUpdate holds the size of the allocated memory in pUpdate.
Return
TRUE is returned on the successful operation. FALSE is returned, if an error occurred. The exact reason can be queried using CmGetLastErrorCode () or CmGetLastErrorText () / CmGetLastErrorText2 ().
Notes
If on calling CmLtImportUpdate() a license has not been properly imported, the transfer can be rolled back. To do so call CmLtCreateReceipt() which will create a receipt that states that the license has not been transferred successfully. This receipt can be used at the sender side to roll back this license transfer.
Available with CodeMeter Version 6.00 and higher.
Syntax
public bool CmLtImportUpdate(HCMSysEntry hcmse, CmLtFlags Ctrl, byte[] Update) |
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access, Entry Access or Firm Item Access). Principally, a Box Access handle is set.
CmLtFlags Ctrl is currently not used since all required information is part of the update.
Update contains the data to be imported (Update File *.WibuCmRaU format).
Return
This function returns true. If an error occurred, false will be returned. The exact reason can be queried using CmGetLastErrorCode2 () or CmGetLastErrorText () / CmGetLastErrorText2 ().
Notes
Available with CodeMeter Version 6.00 and higher.
Syntax
import cmapi
handleOfReceiver.CmLtImportUpdate(update: bytes) -> bool
throws CodeMeterApiFailedException()
Parameter
handleOfReceiver is the handle opened by CmAccess2 (can be Box Access, Entry Access or Firm Item Access). Principally, a Box Access handle is set.
Update is the byte buffer containing the data to be imported (Update File *.WibuCmRaU format).
Return
TRUE is returned on the successful operation. If an error occurs, the function throws an exception and the exact reason can be queried using CmGetLastErrorCode () or CmGetLastErrorText ().
Notes
If on calling CmLtImportUpdate() a license has not been properly imported, the transfer can be rolled back. To do so call CmLtCreateReceipt() which will create a receipt that states that the license has not been transferred successfully. This receipt can be used at the sender side to roll back this license transfer.
Available with CodeMeter Version 6.00 and higher.