VSFlexGrid 8.0 Runtime License Distribution

Posted by: melgev on 22 March 2018, 6:57 pm EST

    • Post Options:
    • Link

    Posted 22 March 2018, 6:57 pm EST

    Hi Support,

    I’ve created VB6 EXE project that adds VSFlexGrid dynamically to Form using a sample from your forum. It works fine on the development PC where VSFlexGrid control is licensed.

    Now, I tried to distribute this EXE file to the client PC where no VSFlexGrid control installed yet. I’ve copied the VSFlexGrid control to the client PC with the same location as it exists on the development PC and registered the control using regsvr32 utility.

    It seams that the control registered but not licensed on the client PC, because when running EXE file it shows Evoluation screen of VSFlexGrid control.

    Any advise, how I should distribute EXE that uses runtime licensing of VSFlexGrid?

    Best Regards,

    Gevorg

  • Posted 22 March 2018, 9:01 pm EST

    https://www.grapecity.com/en/blogs/embedding-license-key-for-activex-controls-created-at-run-time/

    Please note:

    I’ve used this link for help, and the COMLicenceFinder does not show the same License Key on the client PC as I see on the development PC.

  • Posted 25 March 2018, 6:01 pm EST

    Hi Gevorg,

    There may be certain reasons for the license nag screen to appear on client machines:

    1. Is the license properly activated on your development and build machines? You can confirm this by running C1LicenseDeactivation utility from the following location on your machine:

      C:\Program Files\ComponentOne\C1StartMenu

    and, clicking on ‘?’ in front of the serial number field. If any license is activated, it will be displayed in the list.

    1. Since you are dynamically adding VSFlexGrid to the Form, it is needed to embed the license key for ActiveX controls created at run time as explained in the following blog article:

      http://our.componentone.com/2011/03/04/embedding-license-key-for-activex-controls-created-at-run-time/

    Or, you may place an invisible VSFlexGrid control on Form designer. This would automatically embed the licensing info.

    1. The issue may also be related to the distribution of wrong controls. We ship both a 32bit and 64bit version of our ActiveX controls. The 64bit controls are geared towards C++ developers as VB6 never went beyond 32bit. I’m assuming you’r using the 32bit controls in your application.

    With 64-bit versions of windows, the 32bit controls are stored in the C:\Windows\SysWow64 folder and the 64bit controls are stored in the C:\Windows\System32 folder. This is reverse of what seems logical but this is the way Microsoft has done it.

    I would suggest try deploying the versions of the controls from the C:\Windows\SysWow64 folder along with your application and see if that resolves the issue. Below is a link with more information about registering the ActiveX controls.

    http://our.componentone.com/2012/02/10/registration-of-64-bit-activex-controls/

    1. There may be different versions of VSFlexGrid 8.0 related ocx files (on client machine) which do not match the version against which you compiled your application. Please make sure that the version for which you are observing the nag screen is the one against which you compile your application.

    If you have access to the client machine, you may try scanning the hard drive to check if there are multiple copies of VSFlexGrid 8.0 related ocx files in it. If so, you need to remove the other versions and keep only the version against which your application is compiled.

    In addition to this, you may want to go through the “License Nag on Client Machine” section in the following blog article:

    http://our.componentone.com/2012/08/17/troubleshooting-activex-licensing/

    Thanks,

    Pragati

  • Posted 26 March 2018, 7:30 pm EST

    Hi Pragati,

    Many thanks for the detailed reply. I’ve checked all the steps you have suggested above, but could not find out yet what causes the issue.

    Let me introduce you my case:

    1. I am using only one version of vsFlex8l.ocx, no other versions exist;

    2. It is definitely 32-bit edition, and placed in SysWOW64;

    3. The early binding option, that is placing invisible control on the Form, will work, but this is not a solution for me. I must use the late binding option;

    4. I’ve already added License Key using Licenses.Add “…”, “…” method before Controls.Add method;

    5. Everything works perfect on the Development PC, but it does not on the Client PC;

    6. For Client PC, I’m using Virtual PC. VPC is created from the scratch, no other instances of vsFlex8l.ocx could exist there;

    7. I do my test every time by rolling back to the clean VPC stage.

    Here is how I solved the issue:

    1. On the Development PC, I run Regshot utility to shot Windows Registry before and after vsFlex8l.ocx activation;

    2. After comparing the results, I found several registry keys which refer to the VSFlexGrid 8.0 License (HKEY_CLASSES_ROOT\Licenses);

    3. I’ve created a registry file to import these registry keys to the Client PC;

    4. After importing the registry keys to the Client PC, the Evaluation screen disappeared.

    Can you please confirm, if VSFlexGrid 8.0 is added to the Form dynamically then, for VSFlexGrid 8.0 distribution, I need also import these registry keys?

    Regards,

    Gevorg

  • Posted 26 March 2018, 9:03 pm EST

    Hi Gevorg,

    You should not import registry keys to the client machine. It is neither recommended nor needed. Are you using two different machines for developing and compiling this application at your end? If this is the case, both the machines should be licensed.

    Since you are using 64 bit machine at your end, please follow the below mentioned blog article for registering the 64 bit controls on this machine:

    http://our.componentone.com/2012/02/10/registration-of-64-bit-activex-controls/

    If you need 32 and 64 bit ocx files of the grid, please share the version that you are using currently.

    In case the problem persists, please share the version of VSFlexGrid 8.0 build used in your application and a screenshot of the nag screen at client’s end.

    Thanks,

    Pragati

  • Posted 27 March 2018, 5:13 pm EST

    Hi Pragati,

    I’m using the only one Development PC to develop and compile the application and the only one client PC to test the application.

    Please find below a link from MSDN that confirms that the only way to make the licensed control work on the non-development PC (having the late binding), is to have License Key imported to the Windows Registry of this PC.

    https://msdn.microsoft.com/en-us/library/aa242137(v=vs.60).aspx

    According to this material, the License Keys are embedding to the application only if the control is added to the Form in design time. Basically, the License Keys are embedding during compilation of the EXE application on the Development PC. After distributing and running the application on the Client PC, the Visual Basic runtime library creates the control using the embedded License Keys, so that we do not need import the License Keys to Windows Registry.

    In case of the dynamic creation of the control, nothing related to the control is added to the application during compilation, everything will be happen during running of the application. It is definitely required to have the License Keys imported to Windows Registry.

    Does it make sense?

    Regards,

    Gevorg

  • Posted 27 March 2018, 7:28 pm EST

    Hi Gevorg,

    The licensing mechanism used by VSFlexGrid is the “standard” Microsoft ActiveX licensing mechanism:

    https://msdn.microsoft.com/en-us/library/aa751973(v=vs.85).aspx

    Actually, the runtime licensing is not affected by the registry. The runtime license is embedded in the application EXE itself.

    Please note, VB requests a runtime license from the control and embeds it into the EXE - this is a compile time only thing. If the grid control is licensed on the machine while building the EXE, a valid runtime license will be given to the VB compiler and that runtime license will be embedded in the EXE. If

    the grid control is not licensed when the EXE is built, then an evaluation

    license is added to the EXE.

    I would also ask you to check that the grid control is registered properly

    on the client machines. Please try creating a new simple project containing grid and distribute it to your clients. Check if that runs properly on client machines.

    Thanks,

    Pragati

  • Posted 27 March 2018, 9:17 pm EST

    Hi Pragati,

    Thank you for quick respons to my questions that I’ve asked up to now. I’m marking my question as Answered, because we achieved to the end of thread cycle. Later attempts to continue just only will make cycling on the same question again. I had already the solution of my case, what I just needed to get a confirmation from you.

    Thanks again,

    Gevorg

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels