VPE 3.5 Prof ActiveX and Visual FoxPro

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

VPE 3.5 Prof ActiveX and Visual FoxPro

Postby IDEAL Software Support » Tue Nov 23, 2004 4:19 pm

Hi,

I am using Visual FoxPro 7.0 and have noticed that when I deploy my app I
get "control not licensed" error at runtime. I use CREATEOBJECT call to
create VPE object. However, when I drop ActiveX control on the form and then
deploy the app. I don't get this error message. Is there a way to create VPE
object using CREATEOBJECT call and not get the error at runtime on the none
development machines? Another words is there a way to register the control
"runtime only"?

Thank you for your help in advance.


Manjit
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 4:20 pm

See the FAQ in this forum, search for "COM Licensing".

We don't know, if it is possible - and how to - license an ActiveX by code via VFP. Maybe someone else in this group has made some experience.

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

Postby IDEAL Software Support » Tue Nov 23, 2004 4:21 pm

Yes, I saw that message in the help file as well. I am not changing VPE versions. I am only trying to create VPE object by using the CREATEOBJECT call:

oVPE = CreateObject("VpeControl.VpeControl.35")

instead of dragging and dropping the ActiveX on my form. The dragging and dropping of the ActiveX on the form work fine. Dist. app run without any errors on the client machine. I don’t think the problem is related to VFP only.

Please advise.

Manjit Basra
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 4:21 pm

Hello Manjit,
I use VFP7 also, but I always drop the control on the form, works good for
me...
I do have code that will register an OCX file, give it a gry and see if it
works for you.
I think the problem is that the OCX has to be licensed from the machine
where it is developed.
You can create a class with the VPE OLEcontrol object and the use the
createobject() from your class.

function RegisterOCX
* This function registers/unregisters an OCX/ActiveX control
*-- Parameters:
* tcFileName = the name of the file that contains
* the control(s), including the path.
*-- Returns:
* Logical TRUE if successful, FALSE otherwise.
*-- Call sample:
* llRegistered = RegisterOCX("c:\windows\system\comctl32.ocx",.T.)
LParameters tcFileName, tlOnOff
Local llSuccess
If File(tcFileName)
If tlOnOff
Declare Integer DllRegisterServer In (tcFileName) As
__DllRegisterServer__
*-- This function returns 0 if successful
Store __DllRegisterServer__() = 0 To llSuccess
Else
Declare Integer DllUnRegisterServer In (tcFileName) As
__DllUnRegisterServer__
*-- This function returns 0 if successful
Store __DllUnRegisterServer__() = 0 To llSuccess
Endif
Else
llSuccess = .F.
Endif
Return llSuccess

HTH,
Kent
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 4:22 pm

Thank you Kent. I will try the sub-classing VPE OLEControl. That is
something I have not tried yet. As far as the OCX begin register, that is
not a problem. The installer takes care of that. Also, I tried manually
registering the OCX file, even that did not help.

Manjit Basra
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 13 guests

cron