CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Location
    USA
    Posts
    25

    Can I know whether a specified application is active in memory??



    Hello All!!


    I want to know whether a particular application is active in memory or not thru my VC++ application. For example I want to know whether MS-Word is active in memory or not. Can I know this?? If so how?? Please guide me thru this and specify the required API functions etc for this.


    Thanks and Love in advance.

    Samantha Katherine.

  2. #2
    Join Date
    Apr 1999
    Posts
    11

    Re: Can I know whether a specified application is active in memory??



    Hi Samantha,


    Well, you can take a look at the codeguru example under the MISC section: Threads/Processes

    Enumerating Running Processes in Win95 and WinNT - Tomer Patel (1998/08/06)

    http://www.codeguru.com/misc/index.shtml


    where there is an example of how we can get our application to show all the current processes(which are just programs in execution in memory), plus also the function to determine whether a process is active or not. I have read through the code and implemented it in my program and I think it is very well-written in that it is easy for us to understand.


    In this case we are making use of the tool help functions found in kernel32.dll,

    namely Process32First and Process32Next. We use them to get the process ids of all processes in memory. Since you want to know whether a process is active or not, pay special attention to the GetProcessStatus function


    Good luck


    Raphael




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured