DC_IsAppRunning

This forum is for eXpress++ general support.
Post Reply
Message
Author
bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

DC_IsAppRunning

#1 Post by bwolfsohn »

Roger,
we're running into a problem with using dc_isapprunning()

the line in our code is:
IF DC_IsAppRunning('XbpDialog',aApp,,.t.) .OR. DC_IsAppRunning('XbpPmtClass',aApp,,.t.)

but, this only works if the application has gotten to the main appwindow. if does not work if the application is still starting up.

is there any way to test for the application exe running in the task manager ? this comes up right away, even before any windows are defined...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

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

Re: DC_IsAppRunning

#2 Post by rdonnay »

Brian -

I had a similar problem with an app, and found that the best solution was to create a shell application that calls the main application. A small shell app will load much faster. I then wrote a 1 to the registry.
After the main app is completely started, it writes a 0 back to the registry.

The shell app stays in a loop, reading the registry, waiting to read a 0. It then quits.

I know of no other way to get a list of running procedures.
The eXpress train is coming - and it has more cars.

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

Re: DC_IsAppRunning

#3 Post by Tom »

There is a way to investigate running processes. Take a look at this thread from the "German Xbase Forum", second last message ("TerminateTask"). You can see here how to find out which processes are running - by ProcessID or by EXE name. And even how to kill them (if you have a deadlocked version of your app running, which sometimes happens since QUIT does not always quits the app completely).

http://www.xbaseforum.de/viewtopic.php?f=20&t=6511
Best regards,
Tom

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

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: DC_IsAppRunning

#4 Post by Cliff Wiernik »

Based on what I saw searching for an answer, Brian would be looking for something like the last example. His case is where the application is running but no window is present. You are checking by the process name.

Would have to investigate it some more to find out how to adapt it.

Post Reply