cookie 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.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

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.

nav_open CM_LTCU_DELETED cleans all returned licenses used for the specified Entry Access handle.

nav_open 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.

nav_open CM_LTCU_HIDDENHISTORY cleans all stored TransferIds of deleted or pulled licenses (all HistoryItems with HIDDEN status of the selected Product Item / entry handle).

nav_open 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.

nav_open Deleted cleans all returned licenses used for the specified Entry Access handle.

nav_open 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.

nav_open HiddenHistory cleans all stored TransferIds of deleted or pulled licenses (all HistoryItems with HIDDEN status of the selected Product Item / entry handle).

nav_open 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.

nav_open cmapi.CM_LTCU_DELETED cleans all returned licenses used for the specified Entry Access handle.

nav_open 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.

nav_open 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).

nav_open 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.