CmLtCleanup
Description
This function cleans up all license data no longer required, for example, if a license has been borrowed and in the meantime has been returned or expired.
For more details see the respective knowledge base article on license transfer.
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmLtCleanup(HCMSysEntry hcmse, CMULONG flCtrl);
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access, Entry Access or Firm Item Access).
flCtrl contains one of the following flags describing the elements to be cleaned up.
CM_LTCU_DELETED cleans all returned licenses used for the specified Entry Access handle.
CM_LTCU_DISABLED cleans all licenses with Status CM_TRANSFER_STATUS_DISABLED used for the specified Entry Access handle.
A license with the status DISABLED is per se almost not operative, but it may obstruct the eventual return. Included are also licenses which were moved or completely moved and allow a return.
CM_LTCU_HIDDENHISTORY cleans all stored TransferIds of deleted or pulled licenses (all HistoryItems with HIDDEN status of the selected Product Item / entry handle).
CM_LTCU_CONTAINER cleans the complete content of the selected CmActLicense Container using a local Box Access.
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
Available with CodeMeter Version 6.00 and higher.
Syntax
public bool CmLtCleanup(HCMSysEntry hcmse, CmLtCleanupOption Ctrl) |
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.
Ctrl of CmLtCleanupOption must contain one of the following flags describing the elements to be cleaned up.
Deleted cleans all returned licenses used for the specified Entry Access handle.
Disabled cleans cleans all licenses with TransferStatus Disabled used for the specified Entry Access handle.
A license with the status Disabled is per se almost not operative, but it may obstruct the eventual return. Included are also licenses which were moved or completely moved and allow a return.
HiddenHistory cleans all stored TransferIds of deleted or pulled licenses (all HistoryItems with HIDDEN status of the selected Product Item / entry handle).
Container cleans the complete content of the selected CmActLicense Container using a local Box Access.
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
handle.CmLtCleanup(ctrl: int)
Parameter
handle is the handle opened by CmAccess2 (can be Box Access, Entry Access or Firm Item Access).
flCtrl contains one of the following flags describing the elements to be cleaned up.
cmapi.CM_LTCU_DELETED cleans all returned licenses used for the specified Entry Access handle.
cmapi.CM_LTCU_DISABLED cleans all licenses with Status CM_TRANSFER_STATUS_DISABLED used for the specified Entry Access handle.
A license with the status DISABLED is per se almost not operative, but it may obstruct the eventual return. Included are also licenses which were moved or completely moved and allow a return.
cmapi.CM_LTCU_HIDDENHISTORY cleans all stored TransferIds of deleted or pulled licenses (all HistoryItems with HIDDEN status of the selected Product Item / entry handle).
cmapi.CM_LTCU_CONTAINER cleans the complete content of the selected CmActLicense Container using a local Box Access.
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
Available with CodeMeter Version 6.00 and higher.