CmLtLiveTransfer
Description
This function performs a complete transfer in one go, if the sender and receiver CmContainer are connected to the same PC or are accessible via a local network (CmLAN) or wide area network (CMWAN).
For more details see the respective knowledge base article on license transfer.
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY (
HCMSysEntry hcmseFrom, HCMSysEntry hcmseTo, CMULONG flCtrl, CMLTTRANSFER* pcmltTransfer);
Parameter
hcmseFrom contains an Entry Access handle on the license to be transferred opened by CmAccess / CmAccess2.
hcmseTo contains a Box Access handle opened by CmAccess / CmAccess2.
flCtrl must contain one of the following flags describing the type of the transfer. The corresponding data is further processed and the transfer is performed.
CM_LT_PUSH specifies the push transfer type.
CM_LT_RETURN specifies the return transfer type
CM_LT_PULL specifies the pull transfer type.
CM_LT_RENEWBORROW renews a license already borrowed using CM_LTT_BORROWLOCALLICENSE . The extended time is set in mcmBorrowExpirationTime. All parameter are included in the structure CMLTTRANSFER.
pcmltTransfer contains the structure
CMLTTRANSFER depending on the flags set in mflCtr.
|
CMLTTRANSFER specifies the data of the license to be transferred. Syntax
Parameter mflCtrl contains one of the following flags describing the type of the transfer.
mcLicenseQuantityToTransfer contains the number of LicenseQuantities to be transferred. mcmBorrowExpirationTime contains the expiration time of borrowed licenses to be transferred. midPIOHistory contains the ID of the Product Item Option (PIO) History on which the current license transfer is based. •If this value is 0, the complete license transfer is performed. •This value is updated on the current value when the function returns. In the case of the error, that the buffer in pUpdate is too small, the function can be called again using a buffer having enough memory allocated. mabReserved[228] is reserved for future purposes.
|
Return
This function returns true. If an error occurred, false will be returned. The exact reason can be queried using CmGetLastErrorCode () or CmGetLastErrorText () / CmGetLastErrorText2 ().
Notes
Available with CodeMeter Version 6.?? and higher.
Syntax
public bool CmLtLiveTransfer(HCMSysEntry hcmseFrom, HCMSysEntry hcmseTo, CmLtFlags Ctrl, CmLtTransfer LtTransfer) |
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 must contain one of the following flags describing the programming / type of the transfer. The corresponding data is further processed and the transfer is performed.
|
The transfer or programming types are stored in the output data and remain across the protocol. Thus the flag must not be specified for the following API functions. |
Fsb specifies programming a license entry using a Firm Security Box (FSB).
InitPull specifies an initial pull transfer.
Push specifies the push transfer type.
Return specifies that the license is returned to the old sender:
Please note that in this case, the hcmse handle must be an Entry Access.
Pull specifies the pull transfer type.
RenewBorrow renews a license already borrowed using the flag BorrowLocalLicense of the transfer option enums.
The extended time is set in the field BorrowExpirationTime of the CmLtTransfer class.
CmdMaskLow specifies that all transfer types are valid excluding initial pull.
CmdMask specifies mask bit values for programming the transfer.
CmLtTransfer LtTransfer contains the following parameter:
CmLtTransfer.Option Ctrl contains one of the following options:
MoveLicenses specifies that additionally the field LicenseQuantityToTransfer is set, which describes the number of LicenseQuantities to be transferred from this license.
BorrowLocalLicense specifies that additionally the field BorrowExpirationTime is set. The time period here is not to be later than the defined MaxBorrowTime. The field LicenseQuantity 1 with LocalAccessOnly flag and a transfer depth of 1 are implicitely set.
CmdMask can be used to mask bits for specifying the type of the transfer.
and the following fields:
LicenseQuantityToTransfer contains the number of LicenseQuantities to be transferred.
BorrowExpirationTime contains the expiration time of borrowed licenses to be transferred.
PIOHistoryId contains the ID of the Product Item Option (PIO) History on which the current license transfer is based.
If this value is 0, the complete license transfer is performed.
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.?? and higher.
Currently not documented.