Offline license valid check

Hi,
Now I am testing for offline license valid check.
I got the offline response file from web UI.
The following steps in my code would like to check license:

    int status;
    status = SetProductFile("./product.dat");
    std::cout << "SetProductFile:" << status << std::endl;
    status = SetProductId("PRODUCTID", LA_USER);
    std::cout << "SetProductId:" << status << std::endl;
    status = ActivateLicenseOffline("./offline-response.dat");
    std::cout << "ActivateLicenseOffline:" << status << std::endl;
    
    status = IsLicenseGenuine();
    std::cout << "IsLicenseGenuine:" << status << std::endl;
    status = IsLicenseValid();
    std::cout << "IsLicenseValid:" << status << std::endl;
    
    if (LA_OK == status || LA_EXPIRED == status || LA_SUSPENDED == status  || LA_GRACE_PERIOD_OVER == status)
    {
        std::cout << "License is genuinely activated:" << status << std::endl;
    }
    else
    {
        std::cout << "License is not activated:" << status << std::endl;
    }

I would like to know whether those steps are correct.
Thanks a lot.

Hi,

The steps are correct but

status = ActivateLicenseOffline("./offline-response.dat");

has to be executed only once. Once the license is activated this file is no more needed.