how to know whether a application is in mermory? 
Author Message
 how to know whether a application is in mermory?

Hello,

In my program, i want to know whether another application is in mermory.
And how to run another application in my program?

How to know?

Thanks!
Houston



Mon, 19 Jan 2004 14:19:57 GMT  
 how to know whether a application is in mermory?

Quote:
>In my program, i want to know whether another application is in mermory.

What does your program know about the other program?

Quote:
>And how to run another application in my program?

I think ShellExecute(Ex) may solve both problems for you.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Mon, 19 Jan 2004 14:55:31 GMT  
 how to know whether a application is in mermory?
I only want to know if the other program is running. if not, i will run it.


Quote:
> >In my program, i want to know whether another application is in mermory.

> What does your program know about the other program?

> >And how to run another application in my program?

> I think ShellExecute(Ex) may solve both problems for you.

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Mon, 19 Jan 2004 15:52:52 GMT  
 how to know whether a application is in mermory?
Following API calls will help you:

Windows NT40 / 2000 (you will need psapi.h and psapi.lib which are available
in SDK)
1. EnumProcesses
2. OpenProcess
3. EnumProcessModules
4. GetModuleBaseName -- here you can compare name of the exe module with
your string

Window 95/98/2000 (Toolhelp32 library)
1. CreateToolhelp32Snapshot
2. Process32First -- here you can compare name of the exe module with your
string
3. Process32Next

Evgeny


Quote:
> Hello,

> In my program, i want to know whether another application is in mermory.
> And how to run another application in my program?

> How to know?

> Thanks!
> Houston



Mon, 19 Jan 2004 18:48:24 GMT  
 how to know whether a application is in mermory?
Quote:
> I only want to know if the other program is running. if not, i will run

it.

Take a look at EnumProcesses and FindWindow.

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> I only want to know if the other program is running. if not, i will run
it.



> > >In my program, i want to know whether another application is in
mermory.

> > What does your program know about the other program?

> > >And how to run another application in my program?

> > I think ShellExecute(Ex) may solve both problems for you.

> > Dave
> > --
> > MVP VC++ FAQ: http://www.mvps.org/vcfaq
> > My address is altered to discourage junk mail.
> > Please post responses to the newsgroup thread,
> > there's no need for follow-up email copies.



Mon, 19 Jan 2004 19:23:00 GMT  
 how to know whether a application is in mermory?
I know, Thank you!


Quote:
> Following API calls will help you:

> Windows NT40 / 2000 (you will need psapi.h and psapi.lib which are
available
> in SDK)
> 1. EnumProcesses
> 2. OpenProcess
> 3. EnumProcessModules
> 4. GetModuleBaseName -- here you can compare name of the exe module with
> your string

> Window 95/98/2000 (Toolhelp32 library)
> 1. CreateToolhelp32Snapshot
> 2. Process32First -- here you can compare name of the exe module with your
> string
> 3. Process32Next

> Evgeny



> > Hello,

> > In my program, i want to know whether another application is in mermory.
> > And how to run another application in my program?

> > How to know?

> > Thanks!
> > Houston



Tue, 20 Jan 2004 11:42:19 GMT  
 how to know whether a application is in mermory?
Or look up the singleton solution with named mutex (if you control the code
of the "other" program
you are checking for)


Quote:
> > I only want to know if the other program is running. if not, i will run
> it.

> Take a look at EnumProcesses and FindWindow.

> --
> Ajay Kalra [MVP - VC++]

> Note: Please post all replies to newsgroup only.



> > I only want to know if the other program is running. if not, i will run
> it.



> > > >In my program, i want to know whether another application is in
> mermory.

> > > What does your program know about the other program?

> > > >And how to run another application in my program?

> > > I think ShellExecute(Ex) may solve both problems for you.

> > > Dave
> > > --
> > > MVP VC++ FAQ: http://www.mvps.org/vcfaq
> > > My address is altered to discourage junk mail.
> > > Please post responses to the newsgroup thread,
> > > there's no need for follow-up email copies.



Mon, 02 Feb 2004 23:52:28 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. How to know whether i am connected

2. how to know whether i am connected

3. What type of error should I check to know whether database is corrupted or not

4. How to know the previous process whether exited?

5. How to know the previous process whether exited?

6. How to know the previous process whether exited?

7. How to know the previous process whether exited?

8. Need to know whether the focus window will ignore keyboard input

9. how do i know whether IIS is installed not

10. I am seachcing a free pascal editor if someone known a web site just called me

11. How can I found out whether a Instance Of my application is running

12. how to test whether an application is running

 

 
Powered by phpBB® Forum Software