CmEmbedded_4c_transp CmGetBoxes

Description

CmGetBoxes returns all connected CmContainers of the given licensing system.

  • C, C++

Syntax

int CMAPIENTRY CmGetBoxes(HCMSysEntry hcmse, CMULONG idPort, CMBOXINFO *pcmBoxInfo, CMUINT cbBoxInfo)

Parameter

hcmse contains the handle opened by CmAccess2 (must be Subsystem Access).

idPort contains one of the following commands:

nav_open CM_GB_ALLPORTS: All CmContainers will be scanned.

nav_open CM_GB_DONGLE: All CmDongles (CodeMeter hardware) will be scanned. Old naming: CM_GB_USB.

nav_open CM_GB_ACT: All CmActLicenses will be scanned.

pcmBoxInfo contains an array of hmtoggle_plus1 CMBOXINFO structure.

cbBoxInfos contains the number of CMBOXINFO elements stored in pcmBoxInfo.  

Return

The number of found CmContainers is returned. If the number is larger than cbBoxInfo, the array in pcmBoxInfo was too small. In this case, only cbBoxInfo elements were stored in pcmBoxInfo. To get the remaining call the function with the correct array length again. If the array is too small, error code CMERROR_BUFFER_OVERFLOW is set. If 0 is returned,then no entry was found and error code CMERROR_BOX_NOT_FOUND is set.

Notes

This function does not really scan all available or desired ports for connected CmDongles 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.