Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

How to pass info to an app that is already running via commandline parms

$
0
0

I have a powerbuilder application and now we are taking part of this application and migrating them to our new

.net app. Our delimma is that we must use both applications at this time and in order to move back and forth

between these applications both applications must pass data between both apps to determine the modules user is

working with.

 

 

Our .net developers tell me that they have created a method in thier app that when there app is called, if app

is not already running it starts the app but if app is running the instance that is running somehow determines

this call to launch and then since it is already running does not start another instance of the app and simply

takes the parms passed via commandline and passes them to the instance of the app already running. (how they do that I have no idea because I am under the impression that even the .net app will fire the open event of the app (.net app is window based app) and will try to start a new instance why it tries to send this to an instance that is already running I am not sure but they claim it is happening)

 

 

Is this possible in my PB application? I know I can code the open event of my app and check for the main window

 

 

winhandle = FindWindow( 0, "w_main")

 

 

if I have defined the FindWindow fucntion from user32.dll as an external fucntion and if an instance is already

open then I can get the Commandline argument in the open event to get the commandline parms and not open another

instance but these commandline parms will be in the context of the second instance that was being strated.

The first instance already running have no clue about the commandline parms but I want these commandline parms

to be used in the first instance? is this even possible? does my question make sense? Please help.


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>