![]() |
ImFusion SDK 4.3
|
Interfaces and examples for interacting with the license system.
Interfaces and examples for interacting with the license system.
Standalone applications using the framework require an active ImFusion license on the system they are running on. The simplest way to achieve this is by leveraging the framework's default behavior for license activation: If no active license is found on the system, the value of the environment variable IMFUSION_LICENSE_KEY
is used to activate the license at application startup.
It is possible to change this default behavior by replacing it with your own logic. Do this by setting InitConfig::licenseInitFunction to your own implementation when calling Framework::init:
In the background the framework regularly checks if the active ImFusion license is still valid. If for some reason this check fails the framework will be forcefully deinitialized after some seconds of grace period. You can use this time to save the current state of your application and shut it down gracefully to avoid data loss for your users and inform them. In order to do this, register your own InitConfig::licenseExpirationHandler.
Example code for a Qt application: