Hello,
LexActivator.IsProductActivated () is executed at startup.
If it is online, this method is completed in about 1 second.
However, in case of offline, it may take more than 3 seconds each time.
Why does it behave like this?
Communication at startup is every number of days specified by LexActivator.SetDayIntervalForServerCheck (), during which we do not communicate.
It takes time only at least at the first startup.
If you use it incorrectly, please tell me how to use it properly.
The program at startup we created below is below(C# program).
var status = LexActivator.SetProductFile(m_ProductFilePath);
if (status != LexActivator.LA_OK)
{
return false;
}
status = LexActivator.SetVersionGUID(m_VersionGuid, LexActivator.PermissionFlags.LA_USER);
if (status != LexActivator.LA_OK)
{
return false;
}
status = LexActivator.SetUserLock(true);
if (status != LexActivator.LA_OK)
{
return false;
}
status = LexActivator.SetDayIntervalForServerCheck(14);
if (status != LexActivator.LA_OK)
{
return false;
}
// this method is too late!
status = LexActivator.IsProductActivated();
switch (status)
{
case LexActivator.LA_EXPIRED:
case LexActivator.LA_GP_OVER:
case LexActivator.LA_REVOKED:
return false;
case LexActivator.LA_OK:
return true;
default:
return false;