Using Automation Server

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Using Automation Server

Postby Francoisl » Wed Mar 03, 2010 5:49 pm

Hi,

I have been trying to use VPE with the automation server to use it in a web server environment (Progress webspeed). But the automation server seem to require a license and gives error 0x80040112 (Class is not licensed for use) .

How can we use the automation server in a production environment? How can i give it my license so it can be licensed?

P.S. I get the same error when using the create object equivalent of .Net

Thank you.
Francoisl
 
Posts: 2
Joined: Wed Mar 03, 2010 5:27 pm

Postby IDEAL Software Support » Thu Mar 04, 2010 9:47 am

I assume this happens on a machine where the VPE SDK is not installed.

The problem is with the COM licensing defined by Microsoft. We are using this technique.

The COM Licensing Mechanism works as follows:

As you enter your License Key in the VPE setup software in order to install the VPE SDK (Software Develeopment Kit) on your machine, the VPE ActiveX is automatically supplied with your License Key.

You can not call the method License() at runtime to override this mechanism. The reason is that the VPE DLL is loaded immediately in the moment the VPE ActiveX is loaded by your application. Since for each edition of VPE there is a different VPE DLL (named for example VPES3235.DLL for the Standard Edition, VPEX3235.DLL for the Enhanced Edition, etc.), the ActiveX must know at startup which DLL to load and license.

When you place a VPE ActiveX at design time on a form in your application - i.e. when you are developing your application - the server (your programming tool) requests your personal VPE License Key from the ActiveX client and stores it together with the form.

If you later build your executable or deliverable application for shipment to your clients, the encrypted VPE License Key is automatically stored by your development tool within your application. Furthermore, the License Key is marked as "executable only", this means the ActiveX can not be used on the target machine for development purposes.

If you get the demo banner in VPE or any OLE License error codes regarding VPE when running your application, then something with the COM Licensing went wrong.

Visual Basic has no such problems, but we experienced that VB.NET, Visual FoxPro, Progress and Centura request the License Key only once from a newly inserted ActiveX and then keep it. This means that if you use the VPE ActiveX with the trial-version or with a specific VPE Edition (Standard, Enhanced, Professional, etc.), and install later the full version or another Edition, you need to delete the ActiveX controls from your application and re-insert them, so the new License Key is updated by your development tool. This is solely a problem of the development tool you are using - as mentioned before, Visual Basic for example has no such problems.

Please note, that the VPE ActiveX needs to be registered on each client machine. This is done automatically by most installers. If you are not using an installer, call - for example from the command-line prompt - "regsvr32.exe VpeCtrl60.ocx" (regsvr32.exe is a tool, which is freely available from Microsoft).

In your case you have a windowless application and you are create the OCX object yourself. Therefore the automatic COM licensing is not performed and you need to perform it manually.

For example with the MFC (Microsoft Foundation Classes for C++), you can call code like (schematic):

vpe = CreateControl("VpeControl.6");

Then you can call:
key = vpe.QueryLicenseKey();
key.SaveTo Disk("mykey.key");

You do the above on the machine where the VPE SDK (Software Development Kit) is installed. Then you install the file "mykey.key" with your application on a customer's machine.

Then you do the following in your final application:
vpe = CreateControl("VpeControl.6");
key = vpe.LoadFromDisk("mykey.key");
vpe.License(key);

You only need to do the above for windowless applications (as in your case). The above is done automatically by the COM Server (in your case Progress), if you place VPE onto a form. The above key is a key which enables VPE to work in release mode (also called: "run-time mode", without demo banners), but it does not allow to use VPE for software development (which is called "design-time mode"). The terms "run-time mode" and "design-time mode" are from Microsoft. The whole technology for licensing of ActiveX and COM components is invented by Microsoft.

With .NET the licensing works equally, and .NET provides methods to query and store the license key from any .NET lanuage.

BUT: Progress - from our knowledge - does not offer such methods to work with the license key, and this is the problem.

We can provide a workaround for this, please contact us by e-mail for details.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 10 guests

cron