ConnectToNewObject hanging on EA server 4.2.3/PB8

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
alps0875
Posts: 5
Joined: Thu Jun 02 2005

ConnectToNewObject hanging on EA server 4.2.3/PB8

Post by alps0875 » Thu Jun 02 2005

I am trying to execute following code on EA server, but it hangs at line 2. FYI I have registered cdintf.dll successfully and same code works fine on client server. We are using Amyuni PDF Converter version 2.0. We also tried enclosing this code in try .. catch block, however it does not throw any exception.


1. pdfPrint = Create OleObject
2. li_ret = pdfPrint.ConnectToNewObject("CDIntf.CDIntf")

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Thu Jun 02 2005

Hello,

As you are using the ActiveX interface under EA Server from Sybase, you will need to and mark CDINTF as "Apartment Threaded" by adding the following entries in the registry:
For CDINTF:
HKEY_CLASSES_ROOT\CDIntf.CDIntf Key Name: ThreadingModel Key Value: Apartment (String)
HKEY_CLASSES_ROOT\CDIntf.Document Key Name: ThreadingModel Key Value: Apartment (String)

Hope this helps

alps0875
Posts: 5
Joined: Thu Jun 02 2005

Post by alps0875 » Fri Jun 03 2005

Yes we are using Sybase EA server, I have added entries in registry as suggested by you, then also problem remains same, hangs at connectnewobject line.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Mon Jun 06 2005

Hello,

Is CDintf.dll registered in your system directory? If not please register it using Regsvr32.

Also is a reference to CDintf added to your application? If not please add the reference to the ActiveX control.

Please note that we have on our webiste a Powerbuilder sample on using the PDF Converter and PDF Creator, feel free to download it and check it. (Our sample however uses version 2.10 of the driver and not 2.0, this version register CDintfEx and not CDIntf).

Hope this helps.

alps0875
Posts: 5
Joined: Thu Jun 02 2005

Post by alps0875 » Mon Jun 06 2005

Still our probelm not solved. Please help

Environment : EA server 4.2.3, PowerBuilder 8.0 , Amyuni PDF Converter 2.0(Developer version), Window NT

Below is steps I followed

1.
Regsvr32 c:\winnt\system32\cdintf.dll

Successfully registered

2.
Added entries (String) in registry as below
HKEY_CLASSES_ROOT\CDIntf.CDIntf Key Name: ThreadingModel Key Value: Apartment HKEY_CLASSES_ROOT\CDIntf.Document Key Name: ThreadingModel Key Value: Apartment

3.
in non visual user object below is code

1. pdfPrint = Create OleObject
2. li_ret = pdfPrint.ConnectToNewObject("CDIntf.CDIntf")

Probelm :
Program still hang up at pdfPrint.ConnectToNewObject("CDIntf.CDIntf") . It does not move to next line at all

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Tue Jun 07 2005

Hello,

I tried myself to use the PDF Converter version 2.0, 2.10 and 2.50 in Powerbuilder 7 and 9 and it works perfectly.

In the 'Declare' section of the application I declared cdi:
oleobject cdi

In the 'Open' script of my main Window sheet I called:
cdi = create oleobject
cdi.ConnectToNewObject("cdintf.cdintf")

And I didn't get any problem when running my application.

If you are using version 2.0, I advise you to try version 2.09. Otherwise you can try our latest version 2.50 of the PDF Converter and check if you will still have the same problem.

Using version 2.50 you need to call:
cdi.ConnectToNewObject("cdintfEx.cdintfEx")

If your application was working with Powerbuilder 7 and know it is hanging with PB8 than you may want to try PB9.

Please note that to use the ActiveX interface of CDIntf, the 'Common Driver Interface' should appear in the list of ActiveX controls in your application.

Finally, you can try to use the DLL interface of CDIntf instead of the ActiveX one.

If you wish please feel free to download our Powerbuilder 7 technical note (it uses version 2.10 of the PDF Converter) from our site.

If you are still facing problems then you need to submit a support request to support@amyuni.com so we can debug your application and check what is going wrong.

Best Regards,

alps0875
Posts: 5
Joined: Thu Jun 02 2005

Post by alps0875 » Tue Jun 07 2005

We face this problem on EA server . This code successfully work on client server. Did you tried on EA server????

Post Reply