All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cmdinstaller.StubInitializer Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cmdinstaller;

import com.alachisoft.ncache.ncactivate.license.ActivationStatus;
import com.alachisoft.ncache.ncactivate.license.StubDll;
import com.alachisoft.ncache.ncactivate.utils.AppUtil;
import com.alachisoft.ncache.runtime.exceptions.LicensingException;

/**
 * @author taimoor_haider
 */
class StubInitializer {

    public static void InitializeStub(String installCode) throws Exception {

        if (installCode == null || installCode.isEmpty())
            throw new LicensingException("Edition is empty string");

        int editionId = AppUtil.getEditionID(installCode);// AppUtil.extractEditionid(installCode);


        if (editionId == -1)
            throw new LicensingException("Invalid installCode");

        //Initialze stub
        StubDll.InitializeStub(editionId, 0, 60, 0, 0, ActivationStatus.Eval);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy