RegisterServer( )
RegisterServer( )
Hi, All !
I tryed to do exapmle RibbonBar.prg (FWH 9.4) but RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" ) is not work and I got error GPF
(file Codejock.CommandBars.v12.1.1.ocx exist in pholder of this example). What it ?
I tryed to do exapmle RibbonBar.prg (FWH 9.4) but RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" ) is not work and I got error GPF
(file Codejock.CommandBars.v12.1.1.ocx exist in pholder of this example). What it ?
- Antonio Linares
- Site Admin
- Posts: 42529
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Re: RegisterServer( )
Yes, I tried with 13 and 12 and 11 versions - it is not work. But if I istalled before full Codejock ActiveX then work fine
Re: RegisterServer( )
Hi,
I am also having similiar problem. With CodeJock ver 12.1.1, I am getting GPF. But with ver 13 Demo I am not getting the GPF. Everything works fine if CodeJock Setup.exe is run on the PC
viewtopic.php?f=3&t=15102&start=91
Everything works fine if CodeJock Setup.exe is run. But if you try to run the FWH application on a different PC (On a PC where CodeJock Setup is NOT installed), then I find the problem described as above
In both the version IsActivex("Codejock.CommandBars.v12.1.1.ocx") returns .F.
As I was busy with some other project, I did not investigate further. I just wanted to experience and learn the process of using a third party ocx in our application and the problems which we may face while distributing the application.
CodeJock Site says
You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file. The LIC file is located in the same location as the OCX file. By default, the location of the OCX and LIC file is the "..\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006 Q2\bin" for the Xtreme Suite installation. This code should be included before any controls are created, for example, in the Form_Initialize event of the main form for Visual Basic 6.0. For simplicity, the code below demonstrates how to embed the license information for the CommandBars only, you will need to do this for each control you use.
VB 6.0
But I don't know how to access those properties thru FWH's Activate Window oWnd ON INIT ( )
Regards
Anser
I am also having similiar problem. With CodeJock ver 12.1.1, I am getting GPF. But with ver 13 Demo I am not getting the GPF. Everything works fine if CodeJock Setup.exe is run on the PC
viewtopic.php?f=3&t=15102&start=91
Everything works fine if CodeJock Setup.exe is run. But if you try to run the FWH application on a different PC (On a PC where CodeJock Setup is NOT installed), then I find the problem described as above
In both the version IsActivex("Codejock.CommandBars.v12.1.1.ocx") returns .F.
Code: Select all | Expand
If IsActivex("Codejock.CommandBars.v12.1.1.ocx")
MsgInfo("Activex is already Registerd")
else
MsgInfo("Activex is NOT Registerd, Now it will Register")
RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" )
Endif
As I was busy with some other project, I did not investigate further. I just wanted to experience and learn the process of using a third party ocx in our application and the problems which we may face while distributing the application.
CodeJock Site says
You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file. The LIC file is located in the same location as the OCX file. By default, the location of the OCX and LIC file is the "..\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX 2006 Q2\bin" for the Xtreme Suite installation. This code should be included before any controls are created, for example, in the Form_Initialize event of the main form for Visual Basic 6.0. For simplicity, the code below demonstrates how to embed the license information for the CommandBars only, you will need to do this for each control you use.
VB 6.0
Code: Select all | Expand
Private Sub Form_Initialize()
CommandBarsGlobalSettings.License = "CommandBars Control Copyright (c) " & _
"2003-2006 Codejock Software" & vbCrLf & "PRODUCT-ID: " & _
"Codejock.CommandBars.ActiveX.v10.20" & vbCrLf & _
"VALIDATE-CODE: XXX-XXX-XXX-XXX"
End Sub
But I don't know how to access those properties thru FWH's Activate Window oWnd ON INIT ( )
Regards
Anser
Re: RegisterServer( )
Hi,
I do regsvr32 Codejock.CommandBars.v12.1.1.ocx - is sucsessfull, but ribbonbar not work
Yes, if CodeJock Setup.exe(any versions) is run then everything works fine
I do regsvr32 Codejock.CommandBars.v12.1.1.ocx - is sucsessfull, but ribbonbar not work
Yes, if CodeJock Setup.exe(any versions) is run then everything works fine
Re: RegisterServer( )
Hi Mr.Natter
Yes the same with me. I manualy registered the OCX successfully using the below given command
regsvr32 Codejock.CommandBars.v12.1.1.ocx
I beleive that it should be a licence issue, we may have to somehow set the licence key thru GlobalSettings, before the control is created as said in the website. But I don't know how to access CommandBar properties in FWH just before the control is created.
I even tried using the ON INIT, but no results
Regards
Anser
Yes the same with me. I manualy registered the OCX successfully using the below given command
regsvr32 Codejock.CommandBars.v12.1.1.ocx
Code: Select all | Expand
MsgInfo("About to call TActivex")
// Program gives GPF at the next line.
oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 100, 100 )
I beleive that it should be a licence issue, we may have to somehow set the licence key thru GlobalSettings, before the control is created as said in the website. But I don't know how to access CommandBar properties in FWH just before the control is created.
I even tried using the ON INIT, but no results
Code: Select all | Expand
ACTIVATE WINDOW oWnd ;
ON INIT (oSettings = oAct:GetProp( "CommandBarsGlobalSettings" ),;
oSettings:License = "CommandBars Control Copyright (c) " + ;
"2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
"Codejock.CommandBars.ActiveX.v12.1" + CRLF +;
"VALIDATE-CODE: xxx-xxx-xx-xxx")
Regards
Anser
Re: RegisterServer( )
I think that find solution:
files Codejock.CommandBars.v12.1.1.ocx and Codejock.CommandBars.v12.1.1.lic have to exist into one pholder
That all !!
files Codejock.CommandBars.v12.1.1.ocx and Codejock.CommandBars.v12.1.1.lic have to exist into one pholder
That all !!
Re: RegisterServer( )
Hi Mr.Natter,
Good to know that you solved the problem. So how do we distribute the application on client PC's. CodeJockCommandBars.lic file is a simple text file containing the licence key, which means that anybody can read the licence key. I believe that there should be someother way to solve this issue.
Regards
Anser
Good to know that you solved the problem. So how do we distribute the application on client PC's. CodeJockCommandBars.lic file is a simple text file containing the licence key, which means that anybody can read the licence key. I believe that there should be someother way to solve this issue.
Regards
Anser
Re: RegisterServer( )
You can distributed for users files Codejock.CommandBars.v12.1.1.ocx and Codejock.CommandBars.v12.1.1.lic.
Then, for first run you application, do :
regsvr32 /s Codejock.CommandBars.v12.1.1.ocx
Then, for first run you application, do :
regsvr32 /s Codejock.CommandBars.v12.1.1.ocx
Re: RegisterServer( )
You can distributed for users files Codejock.CommandBars.v12.1.1.ocx and Codejock.CommandBars.v12.1.1.lic.
Hi Mr.Natter,
If we distribute the license key file (that too in a plain text Ascii file), then if somebody has access to the license key at our client PC's then we don't have any control on the CodeJock's License. I am looking for a solution to set the license key programatically so that nobody else can use the CodeJock Control other than the one who knows/purchased the license key.
Then, for first run you application, do :
regsvr32 /s Codejock.CommandBars.v12.1.1.ocx
I don't know why IsActivex() always returning .F. in my PC, eventhough it is registered
Code: Select all | Expand
CoInitialize()
If IsActivex("Codejock.CommandBars.v12.1.1.ocx")
MsgInfo("Activex is already Registerd")
else
MsgInfo("Activex is NOT Registerd yet, Now FWH is going to Register this Activex")
RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" )
Endif
// See the next statements. IsActivex() always returns .F.
CoInitialize()
If IsActivex("Codejock.CommandBars.v12.1.1.ocx")
MsgInfo("Activex is Successful")
else // Not Registered
MsgInfo("Unable to register the Activex")
Endif
Anser
- Antonio Linares
- Site Admin
- Posts: 42529
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Re: RegisterServer( )
Anser,
FWH IsActiveX() checks if a CLSID exists for a given PROGID:
http://en.wikipedia.org/wiki/ProgID
if not found, then .F. is returned.
The question is: why sometimes the CLSID is not found for a certain PROGID ?
I don't know why IsActivex() always returning .F. in my PC
FWH IsActiveX() checks if a CLSID exists for a given PROGID:
http://en.wikipedia.org/wiki/ProgID
if not found, then .F. is returned.
The question is: why sometimes the CLSID is not found for a certain PROGID ?

Re: RegisterServer( )
Dear Mr.Antonio,
Thankyou for clearing my confusion regarding the IsActivex()
Regards
Anser
The question is: why the CLSID is not found for a certain PROGID ?
Thankyou for clearing my confusion regarding the IsActivex()

Regards
Anser
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: RegisterServer( )
Anser,
in my tests
or
is working and returns .t. if registered. It seems, there is more than one control in the .ocx file (is that possible ? )
in my tests
Code: Select all | Expand
IsActiveX("Codejock.CommandBars.12.1.1")
Code: Select all | Expand
IsActiveX ("Codejock.CommandBarsFrame.12.1.1")
is working and returns .t. if registered. It seems, there is more than one control in the .ocx file (is that possible ? )
kind regards
Stefan
Stefan
Re: RegisterServer( )
Dear Mr.Stefan,
I have tested only on Windows XP SP3. What is the OS used in your PC ?
Regards
Anser
I have tested only on Windows XP SP3. What is the OS used in your PC ?
Regards
Anser
Re: RegisterServer( )
Dear Mr.Antonio,Mr.Stephan & Mr.Natter
IsActivex() is working now as expected. I found out my mistake
The Parameter to IsActivex which I used was wrong
IsActivex("Codejock.CommandBars.v12.1.1.ocx") // wrong one
The parameter should be
IsActivex("Codejock.CommandBars.12.1.1")
or you can use the class id of Activex
IsActivex("{D696C90D-2836-4CEA-A1A5-F9C7ADCA5BF2}")
To find out the right parameter to be used with IsActivex() you can check the Registery path.
Eg.1
HKEY_CLASSES_ROOT\Codejock.CommandBars.12.1.1
Eg.2 - ClassID
HKEY_CLASSES_ROOT\Codejock.CommandBars.12.1.1\CLSID
Has anybody here used CodeJock in your FWH app. and distributed it in your client PC's. I still have not found a solution to activate the licence through code. ( For the time being, it is working, if I distribute the .lic license file along with the OCX control. Thanks to Mr.Natter) But using VB and other prog.lang we can access the members of the control even before the control is initialised. I don't know how to do that using FWH.
It appears that the problem I'm having is that you can't access the public members of CommandBars until after the control is fully initialized. Trying to access them before full initialization throws an error. However, when you finalize the control, it looks for the license. It appears I'm stuck! I can't set the license before initialization without throwing an error, and I can't initialize the control without a license.
Regards
Anser
IsActivex() is working now as expected. I found out my mistake
The Parameter to IsActivex which I used was wrong
IsActivex("Codejock.CommandBars.v12.1.1.ocx") // wrong one
The parameter should be
IsActivex("Codejock.CommandBars.12.1.1")
or you can use the class id of Activex
IsActivex("{D696C90D-2836-4CEA-A1A5-F9C7ADCA5BF2}")
To find out the right parameter to be used with IsActivex() you can check the Registery path.
Eg.1
HKEY_CLASSES_ROOT\Codejock.CommandBars.12.1.1
Eg.2 - ClassID
HKEY_CLASSES_ROOT\Codejock.CommandBars.12.1.1\CLSID
Has anybody here used CodeJock in your FWH app. and distributed it in your client PC's. I still have not found a solution to activate the licence through code. ( For the time being, it is working, if I distribute the .lic license file along with the OCX control. Thanks to Mr.Natter) But using VB and other prog.lang we can access the members of the control even before the control is initialised. I don't know how to do that using FWH.
It appears that the problem I'm having is that you can't access the public members of CommandBars until after the control is fully initialized. Trying to access them before full initialization throws an error. However, when you finalize the control, it looks for the license. It appears I'm stuck! I can't set the license before initialization without throwing an error, and I can't initialize the control without a license.
Regards
Anser
Last edited by anserkk on Tue Apr 28, 2009 7:42 am, edited 2 times in total.