Hi,
Let me first explain how the licensing works for managed .Net applications (my libraries are using a standard .Net licensing mechanism):
When you embed license.licx file into the project, the compiler checks the file and creates an instances of the classes that are written in license.licx file. The instances are created with a special licensing context - so when the class is created it knows if it was created in compile time or in runtime.
When it is created in compile time than the licensing code creates a runtime license key (different from the installed license key) and uses a special .Net method to save the runtime license key. Saving the license key tells compiler to embed the license key into the embedded resources of the project. So when the project is compiled its dll or exe will contain a special *.licenses embedded resource with license keys. This can be checked with Reflector - see the attached image (example for ReaderSvg library)
When the project is run, the licensing code is instantiated in runtime context and then it checks if the runtime license is present in the embedded resources (if it cannot find it in the executing assembly, than it searches the resources in the assemblies present in the current App Domain).
When the embedded license is found it is checked and when the license is correct the library is licensed to run. This way the application can be distributed to clients that do not have the library installed.
If the embedded license is not found, the license needs to be installed on the computer.
NOTE: This only applies to using commercial license. When using evaluation license, the libraries will only work on computers where it is installed.
Now to your unmanaged solution:
I am almost sure that linking license.licx file will not invoke the licensing code and will therefore not embed the license code (but I am not an expert for unmanaged code so I cannot tell for sure).
I would advise you to create a new managed class library that is referencing Ab3d.PowerToys and Ab3d.Reader3ds and that is having an license.licx file. When you will compile the project it will contain the embedded license.
The new class library should than be ready to be used for your unmanaged ActiveX.
There is another issue that you should fix before it will work:
From the screenshot you have posted I see, that you are using an evaluation version of Reader3ds - it cannot use embedded licenses.
Note that when installing the commercial version, the evaluation version is not automatically uninstalled. If you have manually changed the folder of installations to the same folder, than you might have a wrong version installed.
I would advice you that you uninstall evaluation and commercial versions, just in case manually delete the folders from program files and than install the commercial version again.
I hope my recommendation will help you.
Let me first explain how the licensing works for managed .Net applications (my libraries are using a standard .Net licensing mechanism):
When you embed license.licx file into the project, the compiler checks the file and creates an instances of the classes that are written in license.licx file. The instances are created with a special licensing context - so when the class is created it knows if it was created in compile time or in runtime.
When it is created in compile time than the licensing code creates a runtime license key (different from the installed license key) and uses a special .Net method to save the runtime license key. Saving the license key tells compiler to embed the license key into the embedded resources of the project. So when the project is compiled its dll or exe will contain a special *.licenses embedded resource with license keys. This can be checked with Reflector - see the attached image (example for ReaderSvg library)
When the project is run, the licensing code is instantiated in runtime context and then it checks if the runtime license is present in the embedded resources (if it cannot find it in the executing assembly, than it searches the resources in the assemblies present in the current App Domain).
When the embedded license is found it is checked and when the license is correct the library is licensed to run. This way the application can be distributed to clients that do not have the library installed.
If the embedded license is not found, the license needs to be installed on the computer.
NOTE: This only applies to using commercial license. When using evaluation license, the libraries will only work on computers where it is installed.
Now to your unmanaged solution:
I am almost sure that linking license.licx file will not invoke the licensing code and will therefore not embed the license code (but I am not an expert for unmanaged code so I cannot tell for sure).
I would advise you to create a new managed class library that is referencing Ab3d.PowerToys and Ab3d.Reader3ds and that is having an license.licx file. When you will compile the project it will contain the embedded license.
The new class library should than be ready to be used for your unmanaged ActiveX.
There is another issue that you should fix before it will work:
From the screenshot you have posted I see, that you are using an evaluation version of Reader3ds - it cannot use embedded licenses.
Note that when installing the commercial version, the evaluation version is not automatically uninstalled. If you have manually changed the folder of installations to the same folder, than you might have a wrong version installed.
I would advice you that you uninstall evaluation and commercial versions, just in case manually delete the folders from program files and than install the commercial version again.
I hope my recommendation will help you.
Andrej Benedik

