Possible compilation problem

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Possible compilation problem

Postby bkagan » Wed Jan 18, 2006 1:12 am

I have an application in VB6 and VPE 3.6R4 (standard edition), environment is Win 2000 SP4. It runs fine on developer's pc, but when I install it on the client pc and trying to run I am getting this error:

Run-time error '429'
You do not have an appropriate license to use this functionality.

What is my problem? Thanks.
bkagan
 
Posts: 7
Joined: Mon Nov 14, 2005 5:54 pm
Location: Westwood, MA USA

Postby IDEAL Software Support » Wed Jan 18, 2006 6:20 pm

This error is caused, when trying to use the VPE ActiveX without supplying a valid runtime-license key.

Please see our help file / PDF document titled "Programmer's Manual" in the section "Redistributing VPE", chapter "Installing the VPE ActiveX - The Demo Banners Are Still Shown".

There it is written:

>>
Q: I use the VPE ActiveX and it works fine. But when I install my application on my end user's client machines, the demo banners are shown or I get OLE / COM Licensing errors.

A: 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. For the VPE ActiveX the License() method can only be used, to register add-on modules. 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 VpeCtrl36.ocx" (regsvr32.exe is a tool, which is freely available from Microsoft).
<<

The above text describes how the standard COM Licensing works. It also says "Visual Basic has no such problems...", but you have.

There are two possible reasons:
1) You did not call "regsvr32.exe VpeCtrl36.ocx" on the target machine.

2) You have not placed the VPE ActiveX on a form, but you are using the "CreateObject()" function of Visual Basic instead. As far as we know, when using this function, the mechanism of the COM licensing is not performed by Visual Basic itself.

Solution: Implement the COM licensing mechanism yourself, or place the VPE ActiveX on a form. We recommend the latter.

If you wish to implement the COM Licensing yourself, we must honestly say that we don't know how to do this in Visual Basic. You should consult your VB manuals or ask in newsgroups. We are not VB experts. The only hint we can give is how to perform the COM licensing by code in C++ using the MFC. The following is an excerpt from the VPE help file / PDF document titled ".NET / ActiveX / VCL Reference":

>>
If you didn't place the VPE ActiveX as Resource into a Dialog, you need to implement the COM licensing mechanism of Microsoft by yourself (see the according documentation from Microsoft).

In short:
Call CWnd::CreateControl() - in the last parameter you must specify the license key generated by the control. In order to get the generated key, you once need to create during development a project with the VPE ActiveX and call the methods:

lpU = CWnd::GetControlUnknown()

lpU -> QueryInterface(IID_IClassFactory2, &pClassFactory2)
pClassFactory2->RequestLicKey(NULL, pBstrKey)

pBstrKey will contain the generated key, which is the coded License Key.
Use this key in all other calls to CWnd::CreateControl() in your projects.

If you place the VPE ActiveX in VC++ as resource in a dialog you will have no problems and you don't need to get the key, etc. because Visual-C does everything for you.
<<

Regards
Thorsten Radde
IDEAL Software GmbH
Last edited by IDEAL Software Support on Wed Jan 18, 2006 6:25 pm, edited 1 time in total.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby bkagan » Wed Jan 18, 2006 6:34 pm

I did placed vpe object on my form, and regsvr32 was called by setup program when I install on client pc.
bkagan
 
Posts: 7
Joined: Mon Nov 14, 2005 5:54 pm
Location: Westwood, MA USA

Postby IDEAL Software Support » Wed Jan 18, 2006 6:44 pm

If this is really true, we have difficulties in understanding the cause for the problem, something like this has never been reported before.

Are you *really* sure that this problem is caused by VPE?

To solve the problem:
1) Make sure that regsvr32.exe is really called.
2) Determine the line in your source code which causes the error message to appear, and post this line into the forum.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby bkagan » Thu Jan 26, 2006 6:32 pm

You are right. This problem was not with VPE object, but another one which we using in application. Sorry and thanks for your help.
bkagan
 
Posts: 7
Joined: Mon Nov 14, 2005 5:54 pm
Location: Westwood, MA USA


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 65 guests