Licensing | ComponentOne
Additional Licensing Scenarios / License Visual C++ Applications
In This Topic
    License Visual C++ Applications
    In This Topic

    There is an issue in VC++ 2019, where the license file is ignored during the build process; therefore, the licensing information is not included in VC++ applications. Additionally, the licensing code cannot generate a resource for the entry application. In this case, we need lookup the plugin license from an assembly in current app domain. 

    To properly license WinForms and WPF controls referenced from a VC++ project, extra steps must be taken to generates the runtime license.

    If you are referencing WinForms or WPF controls version 2020 v2 (x.x.20202.xxx) or later, follow these steps: 

    1. Open the MESCIUS License Manager from the Visual Studio tools menu. 
    2. Select Create RunTime License 
    3. Select the WinForms or WPF module that is referencing the ComponentOne controls 
    4. Click Generate. This will generates a unique runtime license (.gclicx) that must be compiled as an embedded resource within this module.
    5. Rebuild the application to include the runtime license in the application.

    If you are referencing WinForms or WPF controls older than 2020 v2 (x.x.20202.xxx), follow these steps: 

    1. Build the C++ project as usual. This should create an .exe file and also a licenses.licx file with licensing information in it. 
    2. Copy the licenses.licx file from the app directory to the target folder (Debug or Release). 
    3. Copy the lc.exe utility and the licensed dlls to the target folder. 
    4. Use lc.exe to compile the licenses.licx file. The command line should look like this:
      lc /target:MyApp.exe /complist:licenses.licx /i:C1.Win.C1FlexGrid.dll 
    5. Link the licenses into the project. To do this, go back to Visual Studio, right-click the project, select Properties, and go to the Linker/Command Line  option. Enter the following:
      /ASSEMBLYRESOURCE:Debug\MyApp.exe.licenses 
    6. Rebuild the executable to include the licensing information in the application.