CmGetBoxContents2
Description
This function returns the native representations of entries of a CmContainer, i.e. the programmed entries of Product Item Options (PIO). Any other call, such as, for example, CmGetInfo reads the effective representation, i.e. the actual properties of the Product Item Optons (PIO).
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmGetBoxContents2(HCMSysEntry hcmse, CMULONG flCtrl, CMULONG ulFirmCode, CMBOXINFO *pcmBoxInfo, CMBOXENTRY2 *pcmBoxEntry, CMUINT cbBoxEntry)
Parameter
hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access, Entry Access or Subsystem Access).
flCtrl contains one of the following commands:
CM_GBC_FI: All entries returned must match the Firm Item provided in ulFirmCode.
CM_GBC_BOX: All entries returned must match the CmContainer properties provided in pcmBoxInfo.
CM_GBC_ALLENTRIES: All entries of all connected CmContainers available at hcmse will be returned.
The above flags can be or'ed with
CM_GBC_USELOCALTIME: Returns the time values using the local time zone instead of UTC.
The flags CM_GBC_FI and CM_GBC_BOX can be combined. If the value of ulFirmCode or pcmBoxInfo is not relevant for the desired flag operation, the value is ignored.
ulFirmCode contains the Firm Code of the Firm Item the returned entries should have (used with CM_GBC_FI flag).
pcmBoxInfo contains the CmContainer information of the CmContainer the entries should be returned from (used with CM_GBC_BOX flag).
pcmBoxEntry contains an array of
CMBOXENTRY2 structure.
|
CMBOXENTRY2 contains data of one entry. An entry is containing one Firm Item and one Product Item. In this structure all static data are stored. The dynamic data must be read out of the CmContainer explicitly. Syntax
Parameter mflFiCtrl specifies the type of the Firm Item. The following flags can be set:
mulFirmCode contains the Firm Code of the Firm Item. musFirmAccessCounter contains the Firm Access Counter of the Firm Item. musReserve1 is reserved for future purposes. mulFirmUpdateCounter contains the Firm Update Counter of the Firm Item. mulFirmPreciseTime contains the FirmPreciseTime of the Firm Item. mausFirmItemText[CM_MAX_STRING_LEN] contains the Firm Item Text of the Firm Item. mulLicenseTransferUpdateCounter contains the Update Counter of the License Transfer. mabReserve1 is reserved for future purposes. mflSetNativePios specifies in the context of used Module Items the native representation of the PIOs as programmed. mflSetEffectivePios specifies in the context of used Module Items the effective representation, i.e including eventually inherited PIOs. mflSetPios specifies all available PIO's at this Product Item. The following flags can be set:
mulProductCode contains the Product Code of the Product Item. mulFeatureMap contains the Feature Map of the Product Item. mcmMaintenancePeriodStart contains the start date of the Maintenance Period of the Product Item, if available. mcmMaintenancePeriodEnd contains the end date of the Maintenance Period of the Product Item, if available. mulUnitCounter contains the Unit Counter of the Product Item, if available. mcmExpirationTime contains the Expiration Time of the Product Item, if available (see
mcmActivationTime contains the Activation Time of the Product Item, if available (see CMTIME). mulUsagePeriodLifeTime contains the period length of the Usage Period in seconds, if available. mcmUsagePeriodStartTime contains the start time of the Usage Period, if available (see CMTIME). mulLicenseQuantity contains the License Quantity of the Product Item, if available. mulLingerTime contains the Linger Time of the Product Item, if available. mulMinimumRuntimeVersion contains the Minimum Runtime Version of the Product Item, if available. Available since CodeMeter Version 5.20. If the current Runtime Version does not match the Minimum Runtime Version set, the error CMERROR_RUNTIME_VERSION_TOO_OLD displays. mflLicenseQuantityFlags contains the flags for license access options, i.e. local accesses (see the knowledgebase overview license (access) options).
mulLicenseTag contains information in the context of Triple Mode Redundancy feature if available. mflTransferStatus contains the flag of the transfer status. The following flags exist:
mabProductItemId contains an unique identifier for the Product Item. mabReserve2 is reserved for future purposes. musMaxEncryptionRate contains the Maximum Encryption Rate. mfbDependencyPC contains the dependency flags of the Product Code. mfbDependencyFM contains the dependency flags of the Feature Map. mfbDependencyUC contains the dependency flags of the Unit Counter. mfbDependencyET contains the dependency flags of the Expiration Time. mfbDependencyAT contains the dependency flags of the Activation Time. mfbDependencyUP contains the dependency flags of the Usage Period. mfbDependencyLQ contains the dependency flags of the License Quantity. mfbDependencyLT contains the dependency flags of the Linger Time. mfbDependencyMV contains the dependency flags of the Minimum Runtime Version. mabReserve3 is reserved for future purposes. musModuleRef contains the Product Item Reference of the super-ordinated Product Item of a Module Item. All items of a module then have the same ModulRef if available. musProductItemRef holds the Product Item Reference. musTransferBoxMask holds the box mask of the source CmContainer in the case of a transferred license if available. mulTransferSerialNumber holds the serial number of the source CmContainer in the case of a transferred license if available. mcmTransferBorrowExpirationTime holds the time at which a borrowed license (license transfer) expires if available. mabTransferId[10] holds the Id of the transfer (corresponds to the Id in the history item of the sender) if available. mabReserve4 is reserved for future purposes. Notes The dynamic data can be read out with GetInfo()/CM_GEI_ENTRYDATA. The dependency parameters (mfbDependencyXX) can have one or more of the following flags: •CM_GF_DATA specifies that the parameter depends on the contents of the data of the Firm Item. •CM_GF_FUC specifies that the parameter depends on the Firm Update Counter of the Firm Item. •CM_GF_SERIAL specifies that the parameter depends on the Serial Number of the CmContainer. On Windows the mausFirmItemText array can be simply converted via CmConvertString() into the specified character set. CMBOXENTRY2 is supported since CodeMeter Version 4.30. The member mulLingerTime is available since CodeMeter Version 4.40. The member mulMinimumRuntimeVersion is available since CodeMeter Version 5.20. The following flags of the mflSetPio are available since CodeMeter Version 6.00: •CM_BE_MODULE_ITEM •CM_BE_BORROWEXPIRATIONTIME •CM_BE_HISTORY •CM_BE_TRANSFEROPTIONS •CM_BE_RETURNINFO •CM_BE_ACCEPTSPULL •The flags CM_GF_TRANSFERBASED and CM_GF_FI_ALLOWED_TO_PULL of mflFiCtrl are available since CodeMeter Version 6.00; The members musModuleRef, musTransferBoxMask, mulTransferSerialNumber, mcmTransferBorrowExpirationTime, mabTransferId, mflLicenseQuantityFlags are available since CodeMeter Version 6.00: The member musMaxEncryptionRate is available since CodeMeter Version 6.50. The following flag of the mflSetPio is available since CodeMeter Version 6.30. For mflTransferStatus the flags CM_TRANSFER_STATUS_ENABLED, CM_TRANSFER_STATUS_DISABLED, CM_TRANSFER_STATUS_RETURNED, CM_TRANSFER_STATUS_EXPIRED: are available since CodeMeter Version 6.30. For mflSetPio the flag CM_BE_NAMEDUSER is available since CodeMeter Version 6.30. For mflSetPio the flags CM_BE_ACCESS_PASSWORD and CM_BE_MAX_ENCRYPTION_RATE are available since CodeMeter Version 6.50. |
cbBoxEntry contains the number of CMBOXENTRY2 elements stored in pcmBoxEntry.
Return
The number of found entries is returned. If the number is larger than cbBoxEntry, the array in pcmBoxEntry is too small. In this case only cbBoxEntry entries are stored in pcmBoxEntry. To get the rest call the function with the correct array length again. If the array is to small the error code CMERROR_BUFFER_OVERFLOW is set. If 0 is returned, then no entry was found and depending on flCtrl error code CMERROR_ENTRY_NOT_FOUND or CMERROR_BOX_NOT_FOUND is set.
Notes
CmGetBoxContents2() is supported since CodeMeter Version 4.30.
Syntax
public CmBoxEntry2[] CmGetBoxContents2(HCMSysEntry hcmse, CmGetBoxContentsOption Ctrl, uint FirmCode, CmBoxInfo BoxInfo)
|
Parameter
BoxEntry contains an array of the
CmBoxEntry2 class.
|
CmBoxEntry2 contains data of one entry. An entry is containing one Firm Item and one Product Item. In this structure all static data are stored. The dynamic data must read out of the CmContainer explicitly. Syntax
Parameter FiCtrl specifies the type of the Firm Item. The following flags using the global enum GlobalActionOption can be set:
FirmCode contains the Firm Code of the Firm Item. FirmAccessCounter contains the Firm Access Counter of the Firm Item. FirmUpdateCounter contains the Firm Update Counter of the Firm Item. FirmPreciseTime contains the FirmPreciseTime of the Firm Item. FirmItemText contains the Firm Item Text of the Firm Item. LicenseTransferUpdateCounter contains the Update Counter of the License Transfer. SetNativePios specifies in the context of used Module Items the native representation of the PIOs as programmed. SetEffectivePios specifies in the context of used Module Items the effective representation, i.e including eventually inherited PIOs. SetPios specifies all available PIO's at this Product Item. The following flags of the global enum GlobalEntryOption2 can be set:
ProductCode contains the Product Code of the Product Item. FeatureMap contains the Feature Map of the Product Item. MaintenancePeriodStart contains the start date of the Maintenance Period of the Product Item, if available (see class
MaintenancePeriodEnd contains the end date of the Maintenance Period of the Product Item, if available (see CmTime). UnitCounter contains the Unit Counter of the Product Item, if available. ExpirationTime contains the Expiration Time of the Product Item, if available (see CmTime). ActivationTime contains the Activation Time of the Product Item, if available (see CmTime). UsagePeriodLifeTime contains the period length of the Usage Period in seconds, if available. UsagePeriodStartTime contains the start time of the Usage Period, if available (see CmTime). LicenseQuantity contains the License Quantity of the Product Item, if available. LingerTime contains the Linger Time of the Product Item, if available. MinimumRuntimeVersion contains the minimum runtime version of the Product Item, if available. Available since CodeMeter Version 5.20. If the current Runtime Version does not match the Minimum Runtime Version set, the error CMERROR_RUNTIME_VERSION_TOO_OLD displays. LicenseQuantityFlag contains the flags for license access options, i.e. local accesses (see the knowledgebase overview license (access) options).
TransferStatus contains the flag of the transfer status. The following flags exist:
ProductItemId contains the Product Item ID. DependencyPC contains the dependency flags of the Product Code. DependencyFM contains the dependency flags of the Feature Map. DependencyMP contains the dependency flags of the Maintenance Period. DependencyUC contains the dependency flags of the Unit Counter. DependencyET contains the dependency flags of the Expiration Time. DependencyAT contains the dependency flags of the Activation Time. DependencyUP contains the dependency flags of the Usage Period. DependencyLQ contains the dependency flags of the License Quantity. DependencyLT contains the dependency flags of the Linger Time. DependencyMV contains the dependency flags of the Minimum Runtime Version. ModuleRef contains the Product Item Reference of the super-ordinated Product Item of a Module Item. All items of a module then have the same ModulRef if available. ProductItemRef holds the Product Item Reference. FiAllowedToPull specifies the license transfer can be actively performed. PioModuleItem specifies that the Product Item contains a Module Item. PioHistory specifies that the Product Item is part of a license transfer process and holds history data. PioAccessPassword specifies that the access to a Product Item contains a password (valid only for Universal Firm Codes). PioReturnInfo specifies that the Product Item contains a license return information. PioTransferOptions specifies that the Product Item contains license transfer options. PioAcceptsPull specifies that the Product Item can be pulled. PioStatus specified that the Product Item contains a license transfer status. PioMaxEncryptionRate specifies that the Product Item contains a Maximum Encryption Rate information (valid only for Universal Firm Codes). TransferBoxMask holds the box mask of the source CmContainer in the case of a transferred license if available. TransferSerialNumber holds the serial number of the source CmContainer in the case of a transferred license if available. TransferBorrowExpirationTime holds the time at which a borrowed license (license transfer) expires if available. TransferId holds the Id of the transfer (corresponds to the Id in the history item of the sender) if available.
Notes The dynamic data can be read out withGetInfo/CmGetInfoOption.EntryData of the GlobalProductCodeOptions. The dependency parameters (DependencyXX) can be have one or more of the following flags: •Data specifies that the parameter depends on the contents of the data of the Firm Item. •Fuc specifies that the parameter depends on the Firm Update Counter of the Firm Item. •Serial specifies that the parameter depends on the Serial Number of the CmContainer. CmBoxEntry2 is supported since CodeMeter Version 4.30. The member LingerTime is available since CodeMeter Version 4.40. The member MinimumRuntimeVersion is available since CodeMeter Version 5.20. The member LicenseQuantityFlag is available since the introducing Universal Firm Codes (Version 6.00). For TransferStatus the flags Enabled, Disabled, Returned, Expired are available since CodeMeter Version 6.30. The member NamedUser is available since CodeMeter Version 6.30. The parameter PioMaxEncryptionRate and PioAccessPassword are available since CodeMeter Version 6.50 and require Universal Firm Codes.
|
CmGetBoxContentsOption allows to set the following event flags:
AllEntries:All entries of all connected CmContainers available at hcmse will be returned.
FirmItem: All entries returned must match the Firm Item provided in FirmCode.
Box: All entries returned must match the CmContainer properties provided in BoxInfo.
UseLocalTime: Returns the time values using the local time zone instead of UTC.
FirmCode contains the Firm Code of the Firm Item the returned entries should have (used with CmGetBoxContentsOption FirmItem flag).
BoxInfo contains the CmContainer information of the CmContainer returned from (used with CmGetBoxContentsOption Box flag).
Return
The found entries are returned. If an empty array is returned, then no entry was found and depending on Ctrl error code Errors.EntryNotFound or BoxNotFound is set.
Notes
CmGetBoxContents2() is supported since CodeMeter Version 4.30.
Syntax
import cmapi
handle.CmGetBoxContents2(flCtrl: int, ulFirmCode: int,
pcmBoxInfo: cmapi.CMBOXINFO) -> List[cmapi.CMBOXENTRY2]
Parameter
handle is the opened by CmAccess2 (can be Box Access, Entry Access or Subsystem Access).
flCtrl contains one of the following commands:
cmapi.CM_GBC_FI: All entries returned must match the Firm Item provided in ulFirmCode.
cmapi.CM_GBC_BOX: All entries returned must match the CmContainer properties provided in pcmBoxInfo.
cmapi.CM_GBC_ALLENTRIES: All entries of all connected CmContainers available at the handle will be returned.
The above flags can be or'ed with
cmapi.CM_GBC_USELOCALTIME: Returns the time values using the local time zone instead of UTC.
The flags cmapi.CM_GBC_FI and cmapi.CM_GBC_BOX can be combined. If the value of ulFirmCode or pcmBoxInfo is not relevant for the desired flag operation, the value is ignored.
ulFirmCode contains the Firm Code of the Firm Item the returned entries should have (used with cmapi.CM_GBC_FI flag).
pcmBoxInfo contains the CmContainer information of the CmContainer the entries should be returned from (used with cmapi.CM_GBC_BOX flag).
Return
The list of found
cmapi.CMBOXENTRY2 entries are returned. If no entry was found, depending on flCtrl error code cmapi.CMERROR_ENTRY_NOT_FOUND or CMERROR_BOX_NOT_FOUND is set.
|
CMBOXENTRY2 contains data of one entry. An entry is containing one Firm Item and one Product Item. In this structure all static data are stored. The dynamic data must be read out of the CmContainer explicitly. Syntax
Parameter mflFiCtrl specifies the type of the Firm Item. The following flags can be set:
mulFirmCode contains the Firm Code of the Firm Item. musFirmAccessCounter contains the Firm Access Counter of the Firm Item. musReserve1 is reserved for future purposes. mulFirmUpdateCounter contains the Firm Update Counter of the Firm Item. mulFirmPreciseTime contains the FirmPreciseTime of the Firm Item. mausFirmItemText[cmapi.CM_MAX_STRING_LEN] contains the Firm Item Text of the Firm Item. To assign this field a valid value, DO NOT set it directly, call instead the set_mausFirmItemText() with the desired string as parameter. To retrieve the content of this field, DO NOT use it directly, call instead the get_mausFirmItemText(). mulLicenseTransferUpdateCounter contains the Update Counter of the License Transfer. mabReserve1 is reserved for future purposes. mflSetNativePios specifies in the context of used Module Items the native representation of the PIOs as programmed. mflSetEffectivePios specifies in the context of used Module Items the effective representation, i.e including eventually inherited PIOs. mflSetPios specifies all available PIO's at this Product Item. The following flags can be set:
mulProductCode contains the Product Code of the Product Item. mulFeatureMap contains the Feature Map of the Product Item. mcmMaintenancePeriodStart contains the start date of the Maintenance Period of the Product Item, if available. mcmMaintenancePeriodEnd contains the end date of the Maintenance Period of the Product Item, if available. mulUnitCounter contains the Unit Counter of the Product Item, if available. mcmExpirationTime contains the Expiration Time of the Product Item, if available (see
mcmActivationTime contains the Activation Time of the Product Item, if available (see cmapi.CMTIME). mulUsagePeriodLifeTime contains the period length of the Usage Period in seconds, if available. mcmUsagePeriodStartTime contains the start time of the Usage Period, if available (see cmapi.CMTIME). mulLicenseQuantity contains the License Quantity of the Product Item, if available. mulLingerTime contains the Linger Time of the Product Item, if available. mulMinimumRuntimeVersion contains the Minimum Runtime Version of the Product Item, if available. Available since CodeMeter Version 5.20. If the current Runtime Version does not match the Minimum Runtime Version set, the error cmapi.CMERROR_RUNTIME_VERSION_TOO_OLD displays. mflLicenseQuantityFlags contains the flags for license access options, i.e. local accesses (see the knowledgebase overview license (access) options).
mulLicenseTag contains information in the context of Triple Mode Redundancy feature if available. mflTransferStatus contains the flag of the transfer status. The following flags exist:
mabProductItemId contains an unique identifier for the Product Item. mabReserve2 is reserved for future purposes. musMaxEncryptionRate contains the Maximum Encryption Rate. mfbDependencyPC contains the dependency flags of the Product Code. mfbDependencyFM contains the dependency flags of the Feature Map. mfbDependencyUC contains the dependency flags of the Unit Counter. mfbDependencyET contains the dependency flags of the Expiration Time. mfbDependencyAT contains the dependency flags of the Activation Time. mfbDependencyUP contains the dependency flags of the Usage Period. mfbDependencyLQ contains the dependency flags of the License Quantity. mfbDependencyLT contains the dependency flags of the Linger Time. mfbDependencyMV contains the dependency flags of the Minimum Runtime Version. mabReserve3 is reserved for future purposes. musModuleRef contains the Product Item Reference of the super-ordinated Product Item of a Module Item. All items of a module then have the same ModulRef if available. musProductItemRef holds the Product Item Reference. musTransferBoxMask holds the box mask of the source CmContainer in the case of a transferred license if available. mulTransferSerialNumber holds the serial number of the source CmContainer in the case of a transferred license if available. mcmTransferBorrowExpirationTime holds the time at which a borrowed license (license transfer) expires if available. mabTransferId[10] holds the Id of the transfer (corresponds to the Id in the history item of the sender) if available. mabReserve4 is reserved for future purposes. Notes The dynamic data can be read out with GetInfo()/cmapi.CM_GEI_ENTRYDATA. The dependency parameters (mfbDependencyXX) can have one or more of the following flags: •cmapi.CM_GF_DATA specifies that the parameter depends on the contents of the data of the Firm Item. •cmapi.CM_GF_FUC specifies that the parameter depends on the Firm Update Counter of the Firm Item. •cmapi.CM_GF_SERIAL specifies that the parameter depends on the Serial Number of the CmContainer.
CMBOXENTRY2 is supported since CodeMeter Version 4.30. The member mulLingerTime is available since CodeMeter Version 4.40. The member mulMinimumRuntimeVersion is available since CodeMeter Version 5.20. The following flags of the mflSetPio are available since CodeMeter Version 6.00: •cmapi.CM_BE_MODULE_ITEM •cmapi.CM_BE_BORROWEXPIRATIONTIME •cmapi.CM_BE_HISTORY •cmapi.CM_BE_TRANSFEROPTIONS •cmapi.CM_BE_RETURNINFO •cmapi.CM_BE_ACCEPTSPULL •The flags cmapi.CM_GF_TRANSFERBASED and cmapi.CM_GF_FI_ALLOWED_TO_PULL of mflFiCtrl are available since CodeMeter Version 6.00; The members musModuleRef, musTransferBoxMask, mulTransferSerialNumber, mcmTransferBorrowExpirationTime, mabTransferId, mflLicenseQuantityFlags are available since CodeMeter Version 6.00: The member musMaxEncryptionRate is available since CodeMeter Version 6.50. The following flag of the mflSetPio is available since CodeMeter Version 6.30. For mflTransferStatus the flags cmapi.CM_TRANSFER_STATUS_ENABLED, cmapi.CM_TRANSFER_STATUS_DISABLED, cmapi.CM_TRANSFER_STATUS_RETURNED, cmapi.CM_TRANSFER_STATUS_EXPIRED: are available since CodeMeter Version 6.30. For mflSetPio the flag cmapi.CM_BE_NAMEDUSER is available since CodeMeter Version 6.30. For mflSetPio the flags cmapi.CM_BE_ACCESS_PASSWORD and cmapi.CM_BE_MAX_ENCRYPTION_RATE are available since CodeMeter Version 6.50. |
Notes
CmGetBoxContents2() is supported since CodeMeter Version 4.30.