CmGetInfo
Description
CmGetInfo returns data related to the opened entry.
Syntax
int CMAPIENTRY CmGetInfo(HCMSysEntry hcmse, CMULONG flCtrl, void *pvDest, CMUINT cbDest)
Parameter
hcmse contains the handle opened by CmAccess2.
flCtrl The following flags can be set:
CM_GEI_BOXCONTROL fills a
CMBOXCONTROL structure specified in pvDest.
|
The CmDongle controller chip may support some digital output and some digital input lines, generally named as Control Lines. The CmDongle architecture supports following lines store in the CMBOXCONTROL structure: •Up to 16 Indicator Control Lines are controlled (powered) by the chip. They may be set to 0 or 1, for example to supply a LED (Light Emitting Diode). •Up to 16 Switcher Control Lines are read by the chip. Their read value may be 0 or 1, for example controlled by a switcher or button. Syntax
Parameter musIndicatorFlags contains the current setting of the indicator control lines. musSwitchFlags contains the current setting of the switcher control lines. mulReserve is reserved for future purposes.
|
CM_GEI_BOXINFO fills a
CMBOXINFO structure specified in pvDest.
|
This structure contains information on a CmContainer. Syntax
Parameter mbMajorVersion contains the major version of the CmContainer. mbMinorVersion contains the minor version of the CmContainer. musBoxMask contains the box mask of the CmContainer. mulSerialNumber contains the serial number of the CmContainer. musBoxKeyId contains the ID of the used BoxKey of the CmContainer. musUserKeyId contains the ID of the used UserKey of the CmContainer. mabBoxPublicKey[CM_PUBLIC_KEY_LEN] contains the public Box Key of the CmContainer. mabSerialPublicKey[CM_PUBLIC_KEY_LEN] contains the public Serial Key of the CmContainer. mulReserve is reserved for future purposes. Notes The length of the mabBoxPublicKey and mabSerialPublicKey is 64 byte long. The used public key are currently 224 bits = 28 bytes long. In Elliptic Curve Cryptography the public key is a 2 dimensional point, so the x-value is stored in the first 28 bytes (0..27) and the y-value is store in byte 32..59.
|
CM_GEI_BOXTIME fills a
CMBOXTIME structure specified in pvDest.
|
CMBOXTIME returns the three values of time clocks: Certified, Box and System Time. Syntax
Parameter mcmCertifiedTime contains the Certified Time(see
mcmBoxTime contains the Box Time (see CMTIME). mcmSystemTime contains the System Time (see CMTIME).
|
CM_GEI_ENTRYINFO2 fills a
CMBOXENTRY2 structure specified in pvDest.
|
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 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. 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. 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. mflLicenseQuantityFlags contains the flags for license access options, i.e. local accesses.
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. 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. 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 in the case of a transferred license if available. mulTransferSerialNumber holds the serial number of the source 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. Notes The dynamic data can be read out with GetInfo()/CM_GEI_ENTRYDATA. The dependency parameters (mfbDependencyXX) can be 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 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. 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 is available since CodeMeter Version 6.50. |
CM_GEI_ENTRYDATA fills a
CMENTRYDATA structure specified in pvDest. If more than one item is available, an array with matching or larger size must be passed.
|
CMENTRYDATA contains a dynamic added data of a Product Item with all its properties. Syntax
Parameter mflCtrl specifies the type of the dynamic added entry. It can contain one of the following flags:
For the three entry types Extended Protected Data, Hidden Data and Secret Data the index of this data type is or'ed in the upper two bytes. See remarks for a sample. mflDependency contains the dependency of the dynamic added entry. It can be have one or more of the following flags:
mulReserve is reserved for future purposes. mcbData contains the length of mabData, for text entries (CM_GF_TEXT) the number of characters, for all other types the number of stored bytes. mabData[2 * CM_MAX_STRING_LEN] contains the data of the dynamic added entry with the length stored in mcbData. For text entries (CM_GF_TEXT) the byte array contains an UCS2-LE encoded null-terminated string. Notes To check the mflCtrl you can use the CM_GF_PIO_MASK to retrieve only the data type flag, e.g. mflCtrl & CM_GF_PIO_MASK. To retrieve the index of Extended Protected Data, Hidden Data or Secret Data you need to extract the upper two bytes of mflCtrl, e.g. by mflCtrl >> 16. For an easier conversion of mabData it may be helpful to use CmConvertString().
|
CM_GEI_INTERNALENTRYINFO fills as many
CMINTERNALENTRYINFO structures as specified in pvDest that are necessary to store the information of all Product Items of same Product Code of a Firm Code.
|
CMINTERNALENTRYINFO stores internal data of an entry. Syntax
Parameter musFirmItemReference contains the Firm Item Reference in the CmContainer of the Firm Item. musProductItemReference contains the Product Item Reference in the CmContainer of the Product Item. mulFirmItemType specifies the type of the Firm Item. The following flags can be set:
mulFirmUpdateCounter contains the Firm Update Counter of the Firm Item. mulReserve is reserved for future purposes.
|
CM_GEI_SYSTEMSTATUS fills a
CMSYSTEMSTATUS structure specified in pvDest.
|
CMSYSTEMSTATUS stores system specific data. Syntax
Parameter mflStatusFlags may contain the following bits set:
mulServerStartTimeInSecondsSince01_01_2000 contains the start time of CodeMeter server in seconds since 01.01.2000, 00:00 (UTC).
|
CM_GEI_SIGNEDLIST fills byte buffer with a signed list of an entry passed in pvDest.
CM_GEI_VERSION fills a
CMVERSION structure specified in pvDest.
|
CMVERSION stores the complete version of a CodeMeter module. Syntax
Parameter musVersion contains the major version of the CodeMeter module. musSubVersion contains the minor version of the CodeMeter module. musBuild contains the build number of the CodeMeter module. musCount contains the count of the CodeMeter module. musYear contains the year of creation of the CodeMeter module. musMonth contains the month of creation of the CodeMeter module. musDay contains the day of creation of the CodeMeter module.
|
CM_GEI_CHIPINFO fills a
CMCHIPINFO structure specified in pvDest.
|
CMCHIPINFO stores the information about the Chip of the CmDongle. Syntax
Parameter mulFirmwareBuild contains the build number of the currently stored Firmware version. mulFirmwareBuildTop contains the highest build number of the Firmware version ever stored. mulMdfaLba contains the start address of the File I/O communication. mulReserved is reserved for future purposes. musChipType contains the type of the chip. musSiliconRevision contains the revision of the chip mask. midFactory contains the identification of the chip fabric where it was manufactured. musProductYear contains the production year in number of years since 2000. musLotNumber contains the charge number of the produced wafer. midWafer contains the identification of the wafer within the charge. midChipOnWafer contains the identification of the chip within the wafer. musDowngradeCount
|
|
CMUSBCHIPINFO stores the information about the USB chip of the CmDongle. Syntax
Parameter musFirmWareMajor contains the major version of the USB chip Firmware. musFirmWareMinor contains the minor version of the USB chip Firmware. mulFlashSize contains the size of the flash memory part of the CmDongle. mszNodeDescription contains the description of the current USB node of the connected CmDongle. mszNodes contains a list of found CmDongle partitions. This feature requires a CodeMeter USB chip Firmware version >= 7.3.
|
CM_GEI_BOXSTATUS fills a 32 bit value with following status flags.
CM_BOXSTATUS_LOWMEMORY specifies that the CmDongle has too low memory to replace damaged memory during normal usage.
CM_BOXSTATUS_REPLUG specifies that the CmDongle has initiated a Plug Out/In event for itself to force the operating system to remount the flash drive.
CM_BOXSTATUS_HASFLASH specifies that the CmDongle contains an additional flash disc besides the CodeMeter chip.
CM_BOXSTATUS_ISCMACT specifies that this is a CmActLicense.
CM_BOXSTATUS_REMOVABLE specifies the configuration of the CmDongle. This can be either be a fixed disk device or a removable disk device. The configuration of the CmDongle can be altered with CmConfigDisk on Windows.
CM_BOXSTATUS_BATTERY_POWERED_CLOCK_USED specifies that the hardware (CmStick/T) has a working battery powered clock inside.
CM_BOXSTATUS_USES_HID_COMMUNICATION specifies that the CmDongle is configured as Human Interface Device (HID).
CM_BOXSTATUS_STATE_FUM specifies that the CmDongle is in Field Update Mode (FUM). In this intermediate state an update of the Firmware version needs to be executed.
CM_BOXSTATUS_STATE_LOCKED specifies that the CmContainer is locked. This cannot be repaired. This CmContainer needs to be replaced.
Enabling status:
CM_BOXSTATUS_ENABLED specifies that the CmContainer is enabled.
CM_BOXSTATUS_DISABLED specifies that the CmContainer is disabled.
CM_BOXSTATUS_TEMPENABLED specifies that the CmContainer is temporarily enabled.
CM_BOXSTATUS_MASK specifies all flags for the enabling status.
CmActLicense status:
CM_ACTSTATUS_FILE specifies that a file is the base of this CmActLicense.
CM_ACTSTATUS_LOADED specifies that the CmActLicense is loaded and can be used. Used during the license creation on licensors side.
CM_ACTSTATUS_ACTIVATE_BY_CODE specifies that the CmActLicense can be activated by entering a code (phone activation).
CM_ACTSTATUS_ACTIVATE_BY_FILE specifies that the CmActLicense has to be activated by a file transmission of a Remote Update File.
CM_ACTSTATUS_ACTIVE specifies that the CmActLicense currently is valid and active.
CM_ACTSTATUS_PROGRAMMABLE specifies that this license can be programmed now. Used during the license creation on licensors side.
CM_ACTSTATUS_INVALID specifies that there occurred a problem with the security checks of the CmActLicense. The license cannot be used.
CM_ACTSTATUS_BROKEN specifies that the binding requirements are no longer fulfilled. The license cannot be used.
CM_ACTSTATUS_PSN_REQUIRED specifies that the licensee has to set a Product Serial Number (PSN) at the time of creating a remote context file.
CM_ACTSTATUS_VM_DETECTED specifies that the license is invalid since it is running in a virtual environment which is not permitted.
CM_ACTSTATUS_BLACKLISTED specifies that the CmActLicense is blacklisted by CodeMeter Timeserver and can no longer be used.
CM_BOXSTATUS_CMACT_MASK specifies all flags for CmActLicense.
CM_GEI_LISTALLPI serves to faster return an array of Product Items and Module Items contents using internal lists and fills a
CMPIENTRYBASE structure specified in pvDest.
|
CMPIENTRYBASE returns all Product Items and Module Items of the Firm Item regardless whether the handle is a Firm Item or Product Item handle. Syntax
Parameter mulProductCode contains the Product Code of the Product Item. mulFeatureMap contains the Feature Map of the Product Item. mflSetEffectivePios specifies in the context of used Module Items the effective representation, i.e including eventually inherited PIOs. mflSetNativePios specifies in the context of used Module Items the native representation of the PIOs as programmed. mulMaintenancePeriodStartSecondsSince01_01_2000 contains the start date of the Maintenance Period of the Product Item in seconds since 01_01_2000, if available. mulMaintenancePeriodEndSecondsSince01_01_2000 contains the end date of the Maintenance Period of the Product Item in seconds since 01_01_2000, if available. mulUnitCounter contains the Unit Counter of the Product Item, if available. mulExpirationTimeSecondsSince01_01_2000 contains the start date of the Expiration Time of the Product Item in seconds since 01_01_2000, if available. mulActivationTimeSecondsSince01_01_2000 contains the end date of the Expiration Time of the Product Item in seconds since 01_01_2000, if available mulUsagePeriodLifeTime contains the period length of the Usage Period in seconds, if available. mulUsagePeriodStartTimeSecondsSince01_01_2000 contains the start date of the Usage Period of the Product Item in seconds since 01_01_2000, if available. mulLicenseQuantity contains the License Quantity of the Product Item, if available. mulMinimumRuntimeVersion contains the Minimum Runtime Version of the Product Item, if available. mflLicenseQuantityFlags contains the flags for license access options, i.e. local accesses.
mcmNamedUserEntry holds the data of the respective a
musProductItemRef holds the Product Item Reference. musReserved1 is reserved for future purposes. mflTransferStatus contains the flag of the transfer status. The following flags exist:.
|
pvDest contains pointer to a structure dependant to the flag set in flCtrl.
cbDest contains the length of pvDest in bytes.
Return
The return value contains the real number of bytes returned in pvDest. If an error occurred, the return value is 0. If pvDest does not contain enough memory, the number of needed bytes will be returned. In this case, the return value is larger than the cbDest parameter and error code CMERROR_BUFFER_OVERFLOW is set.
Notes
This function does not really scan all available or desired ports for connected CmContainers because of CodeMeter License Servers Plug&Play mechanism and the implementation of storing all CmContainers and their content in internal lists. The function call checks the internal lists only and returns the matching data.
Since CodeMeter 3.30 CMNETINFOCLUSTER and CMNETINFOUSER is also filled when CodeMeter is not running as a network server. In older versions the error CMERROR_NO_NETWORK_SERVER is set, if CodeMeter License Server is not running as a server.
The following flags (and the corresponding functionality) are only available since CodeMeter Version 4.30:
•
•CM_BOXSTATUS_BATTERY_POWERED_CLOCK_USED
The following flag (and the corresponding functionality) is only available since CodeMeter Version 5.00:
•CM_BOXSTATUS_USES_HID_COMMUNICATION
The following flags (and the corresponding functionality) are only available since CodeMeter Version 6.00:
•CM_GEI_LTHISTORY
•CM_GEI_LTTRANSFEROPTIONS
The following flag (and the corresponding functionality) is only available since CodeMeter Version 6.30:
•CM_GEI_NAMEDUSER
•CM_GEI_LISTALLPI and CMPIENTRYBASE structure