CmEmbedded_4c_transp CmGetInfo

Description

CmGetInfo returns data related to the opened entry.

  • C, C++

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:

nav_open CM_GEI_BOXCONTROL fills a hmtoggle_plus1 CMBOXCONTROL structure specified in pvDest.

nav_open CM_GEI_BOXINFO fills a hmtoggle_plus1 CMBOXINFO structure specified in pvDest.

nav_open CM_GEI_BOXTIME fills a hmtoggle_plus1 CMBOXTIME structure specified in pvDest.

nav_open CM_GEI_ENTRYINFO2 fills a hmtoggle_plus1 CMBOXENTRY2 structure specified in pvDest.

nav_open CM_GEI_ENTRYDATA fills a hmtoggle_plus1 CMENTRYDATA structure specified in pvDest. If more than one item is available, an array with matching or larger size must be passed.

nav_open CM_GEI_INTERNALENTRYINFO fills as many hmtoggle_plus1 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.

nav_open CM_GEI_SYSTEMSTATUS fills a hmtoggle_plus1 CMSYSTEMSTATUS structure specified in pvDest.

nav_open CM_GEI_SIGNEDLIST fills byte buffer with a signed list of an entry passed in pvDest.

nav_open CM_GEI_VERSION fills a hmtoggle_plus1 CMVERSION structure specified in pvDest.

nav_open CM_GEI_CHIPINFO fills a hmtoggle_plus1 CMCHIPINFO structure specified in pvDest.

Structure CMUSBCHIPINFO

CMUSBCHIPINFO stores the information about the USB chip of the CmDongle.

Syntax

typedef struct __CMUSBCHIPINFO {

CMUSHORT musFirmwareMajor;

CMUSHORT musFirmwareMinor;

CMULONG  mulFlashSize;

char mszNodeDescription[CM_MAX_STRING_LEN];

CMBYTE mszNodes[CM_MAX_STRING_LEN];

} CMUSBCHIPINFO;

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.

 

nav_open CM_GEI_BOXSTATUS fills a 32 bit value with following status flags.

nav_open CM_BOXSTATUS_LOWMEMORY specifies that the CmDongle has too low memory to replace damaged memory during normal usage.

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

nav_open CM_BOXSTATUS_HASFLASH specifies that the CmDongle contains an additional flash disc besides the CodeMeter chip.

nav_open CM_BOXSTATUS_ISCMACT specifies that this is a CmActLicense.

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

nav_open CM_BOXSTATUS_BATTERY_POWERED_CLOCK_USED specifies that the hardware (CmStick/T) has a working battery powered clock inside.

nav_open CM_BOXSTATUS_USES_HID_COMMUNICATION specifies that the CmDongle is configured as Human Interface Device (HID).

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

nav_open CM_BOXSTATUS_STATE_LOCKED specifies that the CmContainer is locked. This cannot be repaired. This CmContainer needs to be replaced.

Enabling status:

nav_open CM_BOXSTATUS_ENABLED specifies that the CmContainer is enabled.

nav_open CM_BOXSTATUS_DISABLED specifies that the CmContainer is disabled.

nav_open CM_BOXSTATUS_TEMPENABLED specifies that the CmContainer is temporarily enabled.

nav_open CM_BOXSTATUS_MASK specifies all flags for the enabling status.

CmActLicense status:

nav_open CM_ACTSTATUS_FILE specifies that a file is the base of this CmActLicense.

nav_open CM_ACTSTATUS_LOADED specifies that the CmActLicense is loaded and can be used. Used during the license creation on licensors side.

nav_open CM_ACTSTATUS_ACTIVATE_BY_CODE specifies that the CmActLicense can be activated by entering a code (phone activation).

nav_open CM_ACTSTATUS_ACTIVATE_BY_FILE specifies that the CmActLicense has to be activated by a file transmission of a Remote Update File.

nav_open CM_ACTSTATUS_ACTIVE specifies that the CmActLicense currently is valid and active.

nav_open CM_ACTSTATUS_PROGRAMMABLE specifies that this license can be programmed now. Used during the license creation on licensors side.

nav_open CM_ACTSTATUS_INVALID specifies that there occurred a problem with the security checks of the CmActLicense. The license cannot be used.

nav_open CM_ACTSTATUS_BROKEN specifies that the binding requirements are no longer fulfilled. The license cannot be used.

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

nav_open CM_ACTSTATUS_VM_DETECTED specifies that the license is invalid since it is running in a virtual environment which is not permitted.

nav_open CM_ACTSTATUS_BLACKLISTED specifies that the CmActLicense is blacklisted by CodeMeter Timeserver and can no longer be used.

nav_open CM_BOXSTATUS_CMACT_MASK specifies all flags for CmActLicense.nav_open CM_GEI_LISTALLPI serves to faster return an array of Product Items and Module Items contents using internal lists and fills a hmtoggle_plus1 CMPIENTRYBASE structure specified in pvDest.

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