How to launch a second application?
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
IlanTal wrote:
So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple.
See here.
IlanTal wrote:
Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this?
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
-
I have a program where sometimes I need a button to launch a different program. I used WinExec() for the job, even though I get the impression that it is out of date and I should be using something else. So, first of all, if there is a better choice, please let me know. WinExec() does the job nicely since it is so simple. Here is my real question. The second application takes a lot of memory and I don't want to launch multiple instances of it. So I would like something to check to see if it is running. If not, launch it. If yes, jump to the instance which is running. Is there an easy way to do this? Thanks, Ilan
Use
CreateProcess()
and keep the handle around. If the handle is NULL, don't let the program be executed again."Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001