After activatelicense() can only success once

Hi.
I am testing for hosted-floating license.
I run activatelicense() to create license once.
The license was created success.
In my source code, I only check the following steps:
status = SetProductFile( whole_product_file.c_str());
if( status != 0)
{
std::cout << “Error license status:” << status << std::endl;
exit(0);
}
std::cout << “LA_USER:” << LA_USER << std::endl;
status = SetProductId(“1b7de5a1-3c26-4f68-ac88-01b2f601e30f”, LA_USER);

    if( status != 0)
    {
        std::cout << "Error license status:" << status << std::endl;
        exit(0);
    }

    std::cout << "LA_USER:" << LA_USER << std::endl;

    status = IsLicenseGenuine();

    if( status != 0)
    {
        std::cout << "Error license status:" << status << std::endl;
        exit(0);
    }

it can be only success once.
after that it will show error:1

Hi @lab9_delta,

In the context of a hosted floating license, it is compulsory to invoke the ActivateLicense() function at the start of each application session, as the automatic deletion of activation occurs upon the expiration of the lease duration. Error code 1, in this scenario, denotes the absence of the activation.

Furthermore, SetProductFile() has been deprecated, you should instead use SetProductData().