CmEmbedded_4c_transp CmSetSystemTime

Description

Using time specifications on implementing time-limited license models

Since embedded systems may often have no real-time clock, CmEmbedded features the function CmSetSystemTime to implement time-based license models. If time-limited license options, e.g. Expiration Time or Usage Period, are to be considered, previous to calling API functions, e.g. CmCrypt2, the current time must be set using the API function CmSetSystemTime.

CmSetSystemTime sets the internal clock of a CmContainer to the time transferred by the structure CMTIME.

This internal time cannot be set back, i.e. in the case of such an attempt, the call is ignored.

  • C, C++

Syntax

int CMAPIENTRY CmSetSystemTime( HCMSysEntry hcmse, CMTIME * newSystemTime )

Parameter

hcmse contains a handle opened by CmAccess2.

newSystemTime holds the new time. The member 'mulSecondsSince01_01_2000' of the structure hmtoggle_plus1 CMTIME is used.

Notes

information_weiss_klein26

When using time-dependent license options, e.g. Usage Period, you must call this function before using other essential functions, e.g. CmCrypt2.

If you use CmDongle, it is sufficient to repeat this call every hour.

If you use CmActLicense, Wibu-Systems recommends to call this function more often, e.g. before each CmCrypt2 call, if the time is not forwarded by internal mechanisms. You test internal forwarding on a platform by repeated detecting the time every other minute using the function CmGetInfo(CM_GEI_BOXTIME) to prove the correct time.