check if external app is already running
-
Is there a simple way of checking to see if an external application, say Microsoft Word, is already running before creating a new process via CreateProcess? Thanks!
-
Is there a simple way of checking to see if an external application, say Microsoft Word, is already running before creating a new process via CreateProcess? Thanks!
Yes. You can use FindWindow command (win32 api).
-
Yes. You can use FindWindow command (win32 api).
FindWindow
:wtf: SeeEnumProcesses
instead. Marriage slows down your coding, a baby slows it down even more! -
FindWindow
:wtf: SeeEnumProcesses
instead. Marriage slows down your coding, a baby slows it down even more! -
Is there a simple way of checking to see if an external application, say Microsoft Word, is already running before creating a new process via CreateProcess? Thanks!
elephantstar wrote:
Is there a simple way of checking to see if an external application,
look for Process32First and Process32Next apis
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
elephantstar wrote:
Is there a simple way of checking to see if an external application,
look for Process32First and Process32Next apis
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
Thanks, that worked. I also have another question. I was planning on using AttachThreadInput() to bring the application to the front but I wasn't sure how to obtain the thread id. Any help is much appreciated. Thanks.
-
Thanks, that worked. I also have another question. I was planning on using AttachThreadInput() to bring the application to the front but I wasn't sure how to obtain the thread id. Any help is much appreciated. Thanks.
elephantstar wrote:
was planning on using AttachThreadInput() to bring the application to the front
Any particular reason for using it !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Thanks, that worked. I also have another question. I was planning on using AttachThreadInput() to bring the application to the front but I wasn't sure how to obtain the thread id. Any help is much appreciated. Thanks.
elephantstar wrote:
I was planning on using AttachThreadInput() to bring the application to the front
any particular reason to use that api..... anyway use
CreateToolhelp32Snapshot
withTH32CS_SNAPTHREAD
to get thread list associated with it."Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Thanks, that worked. I also have another question. I was planning on using AttachThreadInput() to bring the application to the front but I wasn't sure how to obtain the thread id. Any help is much appreciated. Thanks.
elephantstar wrote:
I was planning on using AttachThreadInput() to bring the application to the front
any particular reason for using it,anyway use CreateToolhelp32Snapshot with TH32CS_SNAPTHREAD to get list of thread
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV