PB Application to PB Application communication

I need to have 2 powerbuilder application be able to communicate with one 
another.  A string is all I need to pass between the two applications.

I tried creating a com object that I could connect to from both 
applications.  This com object would basically store the information I want 
to pass between the two applications in an instance variable.  One 
application would populate that instance variable, then notify the other 
application(through the send command) to go read the information in the com 
object.

I created the com object fine and can call a function on the com object 
fine.  My problem is each application has a separate instance of the com 
object.  How can I get both applications to share the same com object?

In each application I am using the ConnnectToNewObject function to connect 
to the com object.  Is there another function I need to use?

Is there a way to get two applications to use the same com object instance?

Is there a better way to accomplish this problem?

Thanks for you help!
Pat 


0
Patrick
2/21/2006 7:54:33 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

6 Replies
727 Views

Similar Articles

[PageSpeed] 2

Pat,
 We use socket programming to send messages between machines (don't 
necessarily need both to even be running PB).  You can setup the app to 
listen on a port.  Roland Smith has a nice winsock utility.  I believe the 
url is http://www.topwizprogramming.com/freecode_winsock.html .  It's great 
for doing the sending, but had some trouble setting up the "listening" part. 
We found another utilty ($250) from Dart - PowerTCP Winsock tool which has a 
TCP Active X that's great for sending to a port, and a Deamon Active X 
that's easy to use for listening on a port.  I'm pretty sure you can have 
one PB app get a Handle to another and send messages that way, but port to 
port seems alot cleaner.

HTH,
Kevin

"Patrick Scott" <pats@sfmic.com> wrote in message 
news:43fb6ff9$1@forums-1-dub...
>I need to have 2 powerbuilder application be able to communicate with one 
>another.  A string is all I need to pass between the two applications.
>
> I tried creating a com object that I could connect to from both 
> applications.  This com object would basically store the information I 
> want to pass between the two applications in an instance variable.  One 
> application would populate that instance variable, then notify the other 
> application(through the send command) to go read the information in the 
> com object.
>
> I created the com object fine and can call a function on the com object 
> fine.  My problem is each application has a separate instance of the com 
> object.  How can I get both applications to share the same com object?
>
> In each application I am using the ConnnectToNewObject function to connect 
> to the com object.  Is there another function I need to use?
>
> Is there a way to get two applications to use the same com object 
> instance?
>
> Is there a better way to accomplish this problem?
>
> Thanks for you help!
> Pat
> 


0
KR
2/21/2006 9:23:18 PM
Thanks KR, but the applications are on the same machine.  I don't need to 
communicate to applications on another pc.

"KR" <kjr_23-nospamhere@yahoo.com> wrote in message 
news:43fb7572@forums-2-dub...
> Pat,
> We use socket programming to send messages between machines (don't 
> necessarily need both to even be running PB).  You can setup the app to 
> listen on a port.  Roland Smith has a nice winsock utility.  I believe the 
> url is http://www.topwizprogramming.com/freecode_winsock.html .  It's 
> great for doing the sending, but had some trouble setting up the 
> "listening" part. We found another utilty ($250) from Dart - PowerTCP 
> Winsock tool which has a TCP Active X that's great for sending to a port, 
> and a Deamon Active X that's easy to use for listening on a port.  I'm 
> pretty sure you can have one PB app get a Handle to another and send 
> messages that way, but port to port seems alot cleaner.
>
> HTH,
> Kevin
>
> "Patrick Scott" <pats@sfmic.com> wrote in message 
> news:43fb6ff9$1@forums-1-dub...
>>I need to have 2 powerbuilder application be able to communicate with one 
>>another.  A string is all I need to pass between the two applications.
>>
>> I tried creating a com object that I could connect to from both 
>> applications.  This com object would basically store the information I 
>> want to pass between the two applications in an instance variable.  One 
>> application would populate that instance variable, then notify the other 
>> application(through the send command) to go read the information in the 
>> com object.
>>
>> I created the com object fine and can call a function on the com object 
>> fine.  My problem is each application has a separate instance of the com 
>> object.  How can I get both applications to share the same com object?
>>
>> In each application I am using the ConnnectToNewObject function to 
>> connect to the com object.  Is there another function I need to use?
>>
>> Is there a way to get two applications to use the same com object 
>> instance?
>>
>> Is there a better way to accomplish this problem?
>>
>> Thanks for you help!
>> Pat
>>
>
> 


0
Patrick
2/21/2006 10:09:34 PM
How about you use the Registry? I've done this in the past for an 
application that could only have one instance open. It took a file name 
as a commandline arguement. When the application first I check to see if 
an instance is already running. If not then I save a reference to the 
frames handle in the registry. If an instance has already been created I 
save a reference to the commandline parameter in the registry then use 
the handle stored in the registry to call the Send function (message 
1024). In the application that's already running I have code in the 
Custom01 event which retrieved the stored file name from the registry 
and opens it.

I hope this helps,

Brad

Patrick Scott wrote:
> Thanks KR, but the applications are on the same machine.  I don't need to 
> communicate to applications on another pc.
> 
> "KR" <kjr_23-nospamhere@yahoo.com> wrote in message 
> news:43fb7572@forums-2-dub...
> 
>>Pat,
>>We use socket programming to send messages between machines (don't 
>>necessarily need both to even be running PB).  You can setup the app to 
>>listen on a port.  Roland Smith has a nice winsock utility.  I believe the 
>>url is http://www.topwizprogramming.com/freecode_winsock.html .  It's 
>>great for doing the sending, but had some trouble setting up the 
>>"listening" part. We found another utilty ($250) from Dart - PowerTCP 
>>Winsock tool which has a TCP Active X that's great for sending to a port, 
>>and a Deamon Active X that's easy to use for listening on a port.  I'm 
>>pretty sure you can have one PB app get a Handle to another and send 
>>messages that way, but port to port seems alot cleaner.
>>
>>HTH,
>>Kevin
>>
>>"Patrick Scott" <pats@sfmic.com> wrote in message 
>>news:43fb6ff9$1@forums-1-dub...
>>
>>>I need to have 2 powerbuilder application be able to communicate with one 
>>>another.  A string is all I need to pass between the two applications.
>>>
>>>I tried creating a com object that I could connect to from both 
>>>applications.  This com object would basically store the information I 
>>>want to pass between the two applications in an instance variable.  One 
>>>application would populate that instance variable, then notify the other 
>>>application(through the send command) to go read the information in the 
>>>com object.
>>>
>>>I created the com object fine and can call a function on the com object 
>>>fine.  My problem is each application has a separate instance of the com 
>>>object.  How can I get both applications to share the same com object?
>>>
>>>In each application I am using the ConnnectToNewObject function to 
>>>connect to the com object.  Is there another function I need to use?
>>>
>>>Is there a way to get two applications to use the same com object 
>>>instance?
>>>
>>>Is there a better way to accomplish this problem?
>>>
>>>Thanks for you help!
>>>Pat
>>>
>>
>>
> 
> 
0
Brad
2/21/2006 10:53:07 PM
Ahh.  Why not write to a file or DB?  You could still use sockets on the 
same machine, but it's overkill.  Also, as I said before, I believe you get 
get a handle to another app and send a message that way.  I'd probably use 
the text file or DB.

Kevin

"Patrick Scott" <pats@sfmic.com> wrote in message 
news:43fb804a$1@forums-2-dub...
> Thanks KR, but the applications are on the same machine.  I don't need to 
> communicate to applications on another pc.
>
> "KR" <kjr_23-nospamhere@yahoo.com> wrote in message 
> news:43fb7572@forums-2-dub...
>> Pat,
>> We use socket programming to send messages between machines (don't 
>> necessarily need both to even be running PB).  You can setup the app to 
>> listen on a port.  Roland Smith has a nice winsock utility.  I believe 
>> the url is http://www.topwizprogramming.com/freecode_winsock.html .  It's 
>> great for doing the sending, but had some trouble setting up the 
>> "listening" part. We found another utilty ($250) from Dart - PowerTCP 
>> Winsock tool which has a TCP Active X that's great for sending to a port, 
>> and a Deamon Active X that's easy to use for listening on a port.  I'm 
>> pretty sure you can have one PB app get a Handle to another and send 
>> messages that way, but port to port seems alot cleaner.
>>
>> HTH,
>> Kevin
>>
>> "Patrick Scott" <pats@sfmic.com> wrote in message 
>> news:43fb6ff9$1@forums-1-dub...
>>>I need to have 2 powerbuilder application be able to communicate with one 
>>>another.  A string is all I need to pass between the two applications.
>>>
>>> I tried creating a com object that I could connect to from both 
>>> applications.  This com object would basically store the information I 
>>> want to pass between the two applications in an instance variable.  One 
>>> application would populate that instance variable, then notify the other 
>>> application(through the send command) to go read the information in the 
>>> com object.
>>>
>>> I created the com object fine and can call a function on the com object 
>>> fine.  My problem is each application has a separate instance of the com 
>>> object.  How can I get both applications to share the same com object?
>>>
>>> In each application I am using the ConnnectToNewObject function to 
>>> connect to the com object.  Is there another function I need to use?
>>>
>>> Is there a way to get two applications to use the same com object 
>>> instance?
>>>
>>> Is there a better way to accomplish this problem?
>>>
>>> Thanks for you help!
>>> Pat
>>>
>>
>>
>
> 


0
KR
2/21/2006 10:53:16 PM
To add an option to the list already provided, PowerBuilder does offer 
DDE capabilities.

If it's possible to get the handle of the other application, there's the 
SEND() PowerScript function.


Patrick Scott wrote:
> Thanks KR, but the applications are on the same machine.  I don't need to 
> communicate to applications on another pc.
> 
> "KR" <kjr_23-nospamhere@yahoo.com> wrote in message 
> news:43fb7572@forums-2-dub...
>> Pat,
>> We use socket programming to send messages between machines (don't 
>> necessarily need both to even be running PB).  You can setup the app to 
>> listen on a port.  Roland Smith has a nice winsock utility.  I believe the 
>> url is http://www.topwizprogramming.com/freecode_winsock.html .  It's 
>> great for doing the sending, but had some trouble setting up the 
>> "listening" part. We found another utilty ($250) from Dart - PowerTCP 
>> Winsock tool which has a TCP Active X that's great for sending to a port, 
>> and a Deamon Active X that's easy to use for listening on a port.  I'm 
>> pretty sure you can have one PB app get a Handle to another and send 
>> messages that way, but port to port seems alot cleaner.
>>
>> HTH,
>> Kevin
>>
>> "Patrick Scott" <pats@sfmic.com> wrote in message 
>> news:43fb6ff9$1@forums-1-dub...
>>> I need to have 2 powerbuilder application be able to communicate with one 
>>> another.  A string is all I need to pass between the two applications.
>>>
>>> I tried creating a com object that I could connect to from both 
>>> applications.  This com object would basically store the information I 
>>> want to pass between the two applications in an instance variable.  One 
>>> application would populate that instance variable, then notify the other 
>>> application(through the send command) to go read the information in the 
>>> com object.
>>>
>>> I created the com object fine and can call a function on the com object 
>>> fine.  My problem is each application has a separate instance of the com 
>>> object.  How can I get both applications to share the same com object?
>>>
>>> In each application I am using the ConnnectToNewObject function to 
>>> connect to the com object.  Is there another function I need to use?
>>>
>>> Is there a way to get two applications to use the same com object 
>>> instance?
>>>
>>> Is there a better way to accomplish this problem?
>>>
>>> Thanks for you help!
>>> Pat
>>>
>>
> 
> 
0
Jason
2/22/2006 12:25:54 AM
Thanks everybody.  It looks like DDE will do the trick for me.


"Jason 'Bug' Fenter" <fenterbug_@_hotmail_dot_com> wrote in message 
news:43fbaf92$1@forums-1-dub...
> To add an option to the list already provided, PowerBuilder does offer DDE 
> capabilities.
>
> If it's possible to get the handle of the other application, there's the 
> SEND() PowerScript function.
>
>
> Patrick Scott wrote:
>> Thanks KR, but the applications are on the same machine.  I don't need to 
>> communicate to applications on another pc.
>>
>> "KR" <kjr_23-nospamhere@yahoo.com> wrote in message 
>> news:43fb7572@forums-2-dub...
>>> Pat,
>>> We use socket programming to send messages between machines (don't 
>>> necessarily need both to even be running PB).  You can setup the app to 
>>> listen on a port.  Roland Smith has a nice winsock utility.  I believe 
>>> the url is http://www.topwizprogramming.com/freecode_winsock.html . 
>>> It's great for doing the sending, but had some trouble setting up the 
>>> "listening" part. We found another utilty ($250) from Dart - PowerTCP 
>>> Winsock tool which has a TCP Active X that's great for sending to a 
>>> port, and a Deamon Active X that's easy to use for listening on a port. 
>>> I'm pretty sure you can have one PB app get a Handle to another and send 
>>> messages that way, but port to port seems alot cleaner.
>>>
>>> HTH,
>>> Kevin
>>>
>>> "Patrick Scott" <pats@sfmic.com> wrote in message 
>>> news:43fb6ff9$1@forums-1-dub...
>>>> I need to have 2 powerbuilder application be able to communicate with 
>>>> one another.  A string is all I need to pass between the two 
>>>> applications.
>>>>
>>>> I tried creating a com object that I could connect to from both 
>>>> applications.  This com object would basically store the information I 
>>>> want to pass between the two applications in an instance variable.  One 
>>>> application would populate that instance variable, then notify the 
>>>> other application(through the send command) to go read the information 
>>>> in the com object.
>>>>
>>>> I created the com object fine and can call a function on the com object 
>>>> fine.  My problem is each application has a separate instance of the 
>>>> com object.  How can I get both applications to share the same com 
>>>> object?
>>>>
>>>> In each application I am using the ConnnectToNewObject function to 
>>>> connect to the com object.  Is there another function I need to use?
>>>>
>>>> Is there a way to get two applications to use the same com object 
>>>> instance?
>>>>
>>>> Is there a better way to accomplish this problem?
>>>>
>>>> Thanks for you help!
>>>> Pat
>>>>
>>>
>> 

0
Patrick
2/22/2006 2:56:48 PM
Reply:

Similar Artilces:

pb application deployment of application
ver 10.5 is there an easy way of finding which pb runtime files i need to deploy with my application to create an installation for a customer First of all, check out the PB runtime packager, and documentation in HTML books under application techniques, chapter 40. You can also use tools like process explorer (www.sysinternals.com - now Microsoft) that lists the active DLL's used by an application. Including tools like Dependency Walker (www.dependencywalker.com). (That even integrates with Process Explorer.) Regards Andr� P� Wed, 21 Feb 2007 12:04:10 +0100, sk...

PB 11.5 application is lower than the same application on PB 9
Hi, We have recently migrated our full source from PB 9 to PB 11.5. We found that the program is running extremely slow. We noticed that it happens mostly when using GUI. There are delays even when tabbing though controls on the screen. We run tracing on both environments, and most of the functions show that the response time is better in PB 11.5, but the experience of using PB11.5 application is very slow anyway. Has anyone experienced the same? On Aug 21, 9:13=A0am, chaau <andrew.chered...@gmail.com> wrote: Sorry, typo in the title. Should be PB 11.5 application is slo...

Calling internet enabled PB application from Client Server PB Application
Is it possible to call a internet enabled PB application from a Client-Server PB app? (Just like the way using RUN function to run another app from PB app) Thx, Mahesh If I understand you correctly, you can add teh Microsoft Internet Explorer ole object to a window and have it browse to the site housing the PB appliation just like it would to any other site. See this technote for details on browsing automatically etc. http://my.sybase.com/detail?id=47945 - Joe Slawsky (NOSPAMFORME_jslawsky@planetdx.com) www.planetdx.com ...

Calling internet enabled PB application from Client Server PB Application
Is it possible to call a internet enabled PB application from a Client-Server PB app? (Just like the way using RUN function to run another app from PB app) Thx, Mahesh This newsgroup is for discussing enhancement requests for future versions of PowerBuilder. You will get a much more relevant reponse if you post in one of the other newsgroups, for example: powersoft.public.powerbuilder.distributed or powersoft.public.powerbuilder.general <Mahesh> wrote in message news:E66A29615A1F68F4006837D685256BC8.006837E685256BC8@webforums... > Is it possible to call a internet...

control a pb application from an other application using a OLE link
hello, I'm a new pb developper and I should create a link between a pb application and other appli. In fact my PB application is a visual application and should be control by others application, but no integrated : just control. It's very easy to do this with a DDE link, but I have heard that OLE automation is better. Is it possible to do this ? (I read some things about problems with visual objects) How can I do this? (I tried to use the PB help book, but I don't anderstand what I have to do...) Thanks for your help... nebka Can you elaborate a bit more on what y...

Closing Application from PB Application
Hi everybody, I'm trying to find solition for the following. I'm trying to close running application (for example PB application or any other) from another running application (PB application). I tried using GetModuleName Win API function to get handle of the application and then tried to close it using CloseWindoe function - it didn't work. Also tried to send and post messages using value for WM_SYSCOMMAND and SC_CLOSE message - still the same negative result. Does anybody have solution for that looks like simple thing. Unfortunately Powerbuilder allows you to start appli...

PB OLE Automation, DDE, Communication between applications in PFC
Hi there! I got some questions regarding OLE Automation and DDE in PB... I hope someone can shed light to this... here it goes... Lets say I got two applications that used PFC, lets name it "App1.Exe" and "App2.Exe". App1.Exe is a launchpad where an "application's component/object" is opened up. Say..."w_sample1" object is contained on of one the DLLs/PBLs of the App2.Exe, and I want it to be opened from App1.Exe... Would a PB OLE Automation work w/ this design or only a DDE approach (communication between two applications)? We...

PB crashes while migrating pb application from PB 8.0 to 9.0
Hi, I am trying migrate a pb application from PB 8.0 to 9.0. It crashes while rebuilding for migration. Is there anything needs to be taken care before the migrating it to pb 9.0 ? Thanks, Mohan Same as any other version: - backup - optimize all PBLs - run Migration Assistant in destination version; try to deal with as much as possible in original version - full build, with information and warning messages turned on, so you know which messages after migration aren't new - backup, backup, backup - migrate - if it crashes, try again and watch messages to see if you ca...

Communication between pb applications.
Hi, I'm trying to use two applications and Microsoft Word to communicate with each other but I haven't been successful in doing that. I don't know if Powebuilder can talk to another pb application, and if PB application can talk to Microsoft Word and vice versa. Does somebody have any knowlede regarding this issue. I would appreciate any info. Thanks. Junaid letsconnect@hotmail.com Three words: Server, Cilent, OLE. Junaid wrote: > Hi, > I'm trying to use two applications and Microsoft Word to communicate > with each other but I haven'...

Undefined variable: gnv_app (PB & PFC application from PB 6 to PB 11.)
Hi All, Please tell how i can resolve below problem : I am trying to migrate PB & PFC application from PB 6 to PB 11. I am getting below error message, I tried so many combination to put pbls but still I am getting same error, even the object and all the pbls are present see below list pbl list : \pfeapsrv.pbl; \pfedwsrv.pbl; \pfemain.pbl; \pfeutil.pbl; \pfewnsrv.pbl; \pfcapsrv.pbl; \PFCDWSRV.PBL; \pfcmain.pbl; \pfcutil.pbl; \PFCWNSRV.PBL; \pfcapp.pbl; \pfcold.pbl; \pfebarcode.pbl; \pfertf.pbl; \pfetempl.pbl; ...

Calling PB application from other web application
Friends, I have a situation here. I have a powerbuilder 7.0 application with windows, datawindows and database access. NOw, the management needs this powerbuilder application to be called by another web application. I would appreciate if you could give me the possible solutions. Thanks, Saravanan What does the application need to return? If you just want to launch the original PB application from a web page, you should look at the web deployment kit. If you need to return data to the other web app, you might look at deploying PB objects into Jaguar and then calling t...

Testing a PFC application (or any PB application)
Hi! I just want to have a few tips on how testing a PFC application should be done. With all the events that occurs in an application, it is sometimes hard to trap every single thing that could happen at anytime! What do you think are the basics steps that for testing an application? What simple things should be considered when coding the application? When you code the application, do you consider all the possible cases at the moment or you put them off until a "testing phase"? What is the best way to activate or deactive menu items while the application is running ...

PB Applications converted to Web Applications
We have a number(3) of large PB7.0 applications that we are looking to migrate to the web. I know that we can take advantage of the DW in the applications (using HTML DW), but what about the other objects, both visual and non-visual. Are there currently any tools for generating web-applicable objects from existing PB objects other than DWs and are there any plans to do this in the future? My understanding is that the WDK only works for LAN, WAN and intranet not internet access, so this will not work for us. Any information would be appreciated, I am looking to leverage as m...

Run PB application from any another application
is it possible to execute and pass a value to a Powerbuilder application from any other application ? any input is greatly appreciated. If the other application has the ability to start applications. To pass a value, you can add command line arguments to your run script, look at commandparm() function in PB for getting those values. You can also use the windows SendMessage API call to trigger events on windows/application. <Julie> wrote in message news:4048e90b.6e7e.846930886@sybase.com... > is it possible to execute and pass a value to a Powerbuilder > applicatio...

Web resources about - PB Application to PB Application communication - sybase.ole-ocx-activex

Communication - Wikipedia, the free encyclopedia
) is the activity of conveying information through the exchange of ideas, feelings, intentions, attitudes, expectations, perceptions or commands, ...

VoIP Business, VoIP Technology, VoIP Security - Fierce Enterprise Communications
Visit FierceVoIP for the latest updates in VoIP business, unified communications, VoIP technology, mobile VoIP, VoIP security and more VoIP news. ...

Mobile News Online - The UK's leading mobile communication industry news site
This month, thousands of students will be starting university for the first time. Some will need new phones. Mystery Caller is on the case to ...

50 Million Small Businesses Using Facebook Pages; New Communications Tools Launched
Facebook announced Tuesday that more than 50 million small businesses are using pages , and the social network rolled out some new communications ...

New privacy platform protects enterprise communication
Enterprise customers are increasingly concerned about the security of their mobile communications, as well as the ability to deliver auditing ...

"Smoking high potency 'skunk-like' cannabis can damage a crucial part of the brain responsible for communication ...
... The researchers specifically examined the corpus callosum, the largest white matter structure in the brain, which is responsible for communication ...

NTT Communications Opens Top-Scale Data Center in Thailand
NTT Communications Corporation (NTT Com), the ICT solutions and international communications business within NTT (NYSE: NTT), announced today ...

Mobile Apps: The Next Big Thing for Internal Communications
Internal communications is on the brink of the next big movement for employee engagement and interaction: mobile apps. Straight from the app ...

Brocade, Cisco, Juniper leading networking and communication hardware market
Channelnomics Brocade, Cisco, Juniper leading networking and communication hardware market Channelnomics Brocade, Cisco, HP, Huawei, Avaya ...

UNIFIED COMMUNICATIONS Cisco Says Spark Collaboration App Is 'Changing Everything'
UNIFIED COMMUNICATIONS Cisco Says Spark Collaboration App Is 'Changing Everything' CIO Today Networking giant Cisco · Relevant Products/Services ...

Resources last updated: 12/11/2015 2:29:38 AM