cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Powerbuilder application through OLE

Former Member
0 Kudos

Hi,

I am interested to know the below thing....

As like accessing Excel and word application from Powerbuilder, is it possible to access powerbuilder application through OLE control?

(i.e. accessing PB application from PB via OLE). It should be.... am I right?. If so what all will be the functionalities which we can access from calling PowerBuilder application!. Please share some sample code if possible.

Thanks & Regards

Babin A B

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Using the Send function would require knowing the handle of the other apps main window. Chris mentioned winsock. I have a winsock example app you can download. All you need to know is the port which you can set to the same value in both.

Topwiz Software - Winsock

Former Member
0 Kudos

We have used both the database table method & Rolands TCP/IP for communication between applications. I think to replace DDE you would be better off with the TCP/IP approach. You should use a high port over 1024 and listen/connect to localhost to avoid Windows firewall issues. Make the port number configurable via the registry for both applications just in case you have a clash with another service listening on tcp/ip.

On the listening process I would choose a default port, check to see if that is available and if not add 1 and try again till you get a free port. Then open the listener on that port number and update the registry with the active port number.

The client process would get the port number from the registry.

Hope that helps.

David

Former Member
0 Kudos

As someone said before you can use Send() to send messages / trigger events from one application to another. However I believe you are limited in what types of data you can send, basically a number - could be a key in a database table.

Or you could just simply program the applications in such a way that they check for messages in a database / file / registry every now and then, and then process them as required, marking them as processed when done. This is the safest way as I believe sometimes messages can get dropped if too many get sent at the same time.

Former Member
0 Kudos

Thanks for the tip Aron. I'll try 'em both. Appreciate your help!

Former Member
0 Kudos

Hello All,

The DDE is working in Windows 8 with Power Builder 12.5 and it was flawless.

but now Client has updated the Windows 8 to windows 10; from that day we are also facing the Application freezing Issue.

if anyone have sample code please share if possible.


Thanks for the time!

Brijesh Soni

Former Member
0 Kudos

Hi Brijesh;

  Have you tried running both programs in ADMIN mode?

Regards ... Chris

Former Member
0 Kudos

Hello Chris,

Our all the application are on Server and Server path was mapped in one of drive when we running the Application with ADMIN mode. the mapped Drive is not found and its give message that "No Client Application found."

Thanks and Regards,

Brijesh Soni

Former Member
0 Kudos

Ahhh... I didn't realize that you were running the applications from a server. Running in Admin mode can affect drive mappings depending on your MS-Windows configuration and/or security policy settings.

Former Member
0 Kudos

Yes, running with elevated privileges uses a different user context. User mapped drives, printers etc will not be available.

Just for diagnostic purposes, you could copy the files locally and run as admin to see if your problem is a permissions issue. If it is then you will have to work out what permission to give the user in order to work around the problem.

HTH

David

Former Member
0 Kudos

Hello David,

Thanks you for reply.

We have also observe that when we kill the process Splwow64.exe the DDE call is working, so that we have provide the RUN (taskkill /f /im wowspl64.exe) was working on the Test Servers but the same is giving trouble on Live servers.

so customer wants Replacement of DDE's with the best option.

Please suggest as we know that The OLEAutomation project was deprecated in PB 11.5.

Thanks and Regards,

Brijesh Soni

Former Member
0 Kudos

I refer to my Post below in response to Rolands TCP/IP.

"We have used both the database table method & Rolands TCP/IP for communication between applications. I think to replace DDE you would be better off with the TCP/IP approach. You should use a high port over 1024 and listen/connect to localhost to avoid Windows firewall issues. Make the port number configurable via the registry for both applications just in case you have a clash with another service listening on tcp/ip.

On the listening process I would choose a default port, check to see if that is available and if not add 1 and try again till you get a free port. Then open the listener on that port number and update the registry with the active port number.

The client process would get the port number from the registry."


I believe the TCP/IP method would be best for you.

Regards

David

Former Member
0 Kudos

Babin - Just wondering if you found an alternate solution? We are having the same issue as our app freezes during a openchannel. Not sure which way to go.

We use the DDE channel for just a one time communication and i don't want to take a super exhaustive measure for this sake.

We are on PB12.0.

Thanks for your time!

~Balu

Former Member
0 Kudos

The OLEAutomation project was deprecated in PB 11.5.

What are you trying to do?  Maybe there's a better architecture than OLE.  You could use web services, or open a socket...  Lots of different ways to accomplish interprocess communication.

-Paul-

Former Member
0 Kudos

Hi Paul,

I have an application which is using DDE concepts. it uses the DDE to send and received data between two applications. But recently we are seeing issue with DDE in win 7 OS. Hence I was looking for some alternatives. Clients are not interested in code rewriting, hence was looking for some alternatives which is feasible.

If anyione have any suggestions. Let me know.

Regards

Babin A B

Former Member
0 Kudos

Hi Babin;

  Can you tell us what issues you encountered in W7?

Regards .. Chris

Former Member
0 Kudos

Hi Chris,

The Powerbuilder application which uses DDE concept simply hungs. And the funny part is its not always the application hangs. Its happens sporadically, not sure what needs to be done.

Thanks & Regards

Babin A B

Former Member
0 Kudos

Hi Babin;

  As Paul mentioned earlier - the DDE feature was deprecated in PB version 11.5. Since that feature is no longer being updated (or tested), I am not sure what to advise you further other than the suggestions I made earlier.

  BTW: What version of PB are you using?

Regards ... Chris

Former Member
0 Kudos

PB 12.0- Classic

Former Member
0 Kudos

Hi Babin;

  PowerBuilder used to have the ability to build an OLE server - but, Sybase removed that feature in more recent versions .... for what ever reason, I have no idea. The same reasons I guess why they removed the C++ User object, Distributed PB Server,  and other great features (OTL IMHO).

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

I have an application, which uses DDE concepts. But we are facing some issues in DDE recently. Also Clients are nt interested in code re-writing of application. Hence I was looking for any other feasible solutions which I can use to replace the DDE concept.

Any suggestions to this issue will be appreciated.

Regards

Babin A B

Former Member
0 Kudos

Hi Babin;

Alternatives:

1) If this is simple messaging, you could use the SEND ( ) command in PB.

2) For more complex data exchange you could also use WinSock (TCIP) between applications.

Regards ... Chris