Help with Chilkat

This forum is for eXpress++ general support.
Post Reply
Message
Author
bobvolz
Posts: 114
Joined: Sun Jan 31, 2010 11:25 am

Help with Chilkat

#1 Post by bobvolz »

I've purchased Chilkat and am attempting to use it. I downloaded the activex and ran the msi and it all looks like it is installed and registered.
I added code to include 'Activex.ch' and I added the chilkat dll to my project file-( not sure if I needed to do that.

I cannot create the object using the below code. It returns oGlob as a nil. I have oGlob as a local.

oGlob:= CreateObject('Chilkat_9_5_0.Global') /// this is in the registry. I also tried the CLSID - no good

nSuccess:= oGlob:UnlockBundle("MDOW.CB1032025_uthWzzA7BR1g")



IF (nSuccess <> 1)
? oGlob:LastErrorText()
ENDIF
Any ideas what to do or look for?

Bob Volz

User avatar
rdonnay
Site Admin
Posts: 4753
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Help with Chilkat

#2 Post by rdonnay »

I don't know why this isn't working for you.

I have never used .Global.
I only have experience with .JsonObject and .Sftp.

However CreateObject('Chilkat_9_5_0.Global') does return an Automation object for me.

You don't need to add their DLL to your project file.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1197
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Help with Chilkat

#3 Post by Tom »

You must first unlock chilkat. The DLL must be visible from your app (same path). Check the version numbering. If you once unlocked Chilkat in your app, you can use it as often as you want.

It CreateObject doesn't return an object, check ComLastError().
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
PedroAlex
Posts: 234
Joined: Tue Feb 09, 2010 3:06 am

Re: Help with Chilkat

#4 Post by PedroAlex »

Bob,

Try This:

loGlob = CreateObject('Chilkat_9_5_0.Global')

IF Valtype( loGlob ) != 'O'
MsgBox( 'Object not Created!' )
MsgBox( 'Error : ' + Var2Char( ComLastError() ) , ComLastMessage() )
Return Nil
Endif

Note:
This type of problems occurs more frequently with Chilkat 64-bit.
If you install the 32-bit version it will run better.
Last edited by PedroAlex on Sat Mar 18, 2023 11:00 am, edited 1 time in total.
Pedro Alexandre

skiman
Posts: 1195
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Help with Chilkat

#5 Post by skiman »

Hi Bob,

I always use it the following way:

Code: Select all

oGlobal := CreateObject("Chilkat_9_5_0.Global")
oRec := CreateObject("Chilkat_9_5_0.JsonObject")
oGlobal:UnlockBundle(CHILKAT_CODE)
I don't have the DLL in my project file and the DLL isn't in my application directory. The directory where the msi file is available isn't in the PATH of the PC. After installing the Chilkat can be used everywhere.

Have you installed the Chilkat as administrator?

PS. I wouldn't post the Chikkat licence. It is valid for all versions untill Mars 2025. You should keep this secret.
Best regards,

Chris.
www.aboservice.be

bobvolz
Posts: 114
Joined: Sun Jan 31, 2010 11:25 am

Re: Help with Chilkat

#6 Post by bobvolz »

Thank you all. I'll keep trying. Thanks Chris, that's not my actual Chilkat code.:)

Bob Volz

bobvolz
Posts: 114
Joined: Sun Jan 31, 2010 11:25 am

Re: Help with Chilkat

#7 Post by bobvolz »

Now here's a dumb question. I originally installed the 64 bit version forgetting that xBase is a 32 bit language. It did not work. I then also installed the 32 bit version. Now it works!

But... it will not work unless both the 64 bit and 32 bit dlls are in my path. I shouldn't need both correct? I'm going to start from scratch and recompile everything.

Thanks, Bob Volz

bobvolz
Posts: 114
Joined: Sun Jan 31, 2010 11:25 am

Re: Help with Chilkat

#8 Post by bobvolz »

Hi All:

I followed and reinterpreted the FoxPro examples to get an OAuth2 token for the Google Calender See below function:

I am able to get a returned cUrl string but when I paste that into a Chrome Browser I get the attached GoogleResponse,png. Client missing project ID Authorization error

This is cUrl
https://accounts.google.com/o/oauth2/v2 ... ethod=S256


My Code: the dll is already unlocked:

Function Googletest()
LOCAL oOAuth2,nSuccess,cUrl,nNumsWaited,oSbJson,oHttp,oResp,cResponse,aHeaders
oOAuth2:=createobject('Chilkat_9_5_0.OAuth2')
oOAuth2:AuthorizationEndpoint:="https://accounts.google.com/o/oauth2/v2/auth"
oOAuth2:ListenPort:= 55568
oOauth2:TokenEndpoint:= "https://www.googleapis.com/oauth2/v4/token"
oOAuth2:ClientId:="bvolz3850@gmail.com"
oOauth2:ClientSecret:="https://calendar.google.com/calendar/ic ... /basic.ics"
oOauth2:CodeChallenge = 1
oOauth2:CodeChallengeMethod = "S256"
oOauth2:Scope = "https://www.google.com/m8/feeds"
cUrl = oOauth2:StartAuth()
IF oOauth2:LastMethodSuccess <> 1
wtf oOauth2:LastErrorText
ENDIF
wtf oOAuth2:lastmethodSuccess
wtf cUrl pause // paste cUrl into Chrome get error message
return nil


Any ideas would be helpful. I don't see any specs for Project ID in the FoxPro examples.

Bob Volz
Attachments
GoogleResponse.PNG
GoogleResponse.PNG (17.03 KiB) Viewed 6621 times

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Help with Chilkat

#9 Post by reganc »

bobvolz wrote: Sun Mar 19, 2023 8:57 am Hi All:

I followed and reinterpreted the FoxPro examples to get an OAuth2 token for the Google Calender See below function:

I am able to get a returned cUrl string but when I paste that into a Chrome Browser I get the attached GoogleResponse,png. Client missing project ID Authorization error

This is cUrl
https://accounts.google.com/o/oauth2/v2 ... ethod=S256


My Code: the dll is already unlocked:

Function Googletest()
LOCAL oOAuth2,nSuccess,cUrl,nNumsWaited,oSbJson,oHttp,oResp,cResponse,aHeaders
oOAuth2:=createobject('Chilkat_9_5_0.OAuth2')
oOAuth2:AuthorizationEndpoint:="https://accounts.google.com/o/oauth2/v2/auth"
oOAuth2:ListenPort:= 55568
oOauth2:TokenEndpoint:= "https://www.googleapis.com/oauth2/v4/token"
oOAuth2:ClientId:="bvolz3850@gmail.com"
oOauth2:ClientSecret:="https://calendar.google.com/calendar/ic ... /basic.ics"
oOauth2:CodeChallenge = 1
oOauth2:CodeChallengeMethod = "S256"
oOauth2:Scope = "https://www.google.com/m8/feeds"
cUrl = oOauth2:StartAuth()
IF oOauth2:LastMethodSuccess <> 1
wtf oOauth2:LastErrorText
ENDIF
wtf oOAuth2:lastmethodSuccess
wtf cUrl pause // paste cUrl into Chrome get error message
return nil


Any ideas would be helpful. I don't see any specs for Project ID in the FoxPro examples.

Bob Volz
Bob,

We use the Chilkat ActiveX library a lot here. I have used Google Feeds before (never had need to / don't know what they are) but we do send email using the Gmail API.

The ClientId and ClientSecret you have put above do not look normal. They are usually hexadecimal strings and they would normally be picked up from some page in your Google Feed account.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Post Reply