Solved

How to know if EXPLORER.EXE is running ?

Posted on 1998-10-26
5
454 Views
Last Modified: 2009-07-29
I want to know if the user has thrown one or more executions of EXPLORER.EXE application.
The EnumProcesses/OpenProcess fonctions from PSAPI.DLL gives me all the running processes inluding EXPLORER.EXE, but I can't differentiate it from the Explorer's windows opened by the user.
Could someone give me some help ?
0
Comment
Question by:jcjacquot
5 Comments
 

Expert Comment

by:dinom
ID: 1176210
I think you should try to enum desktop windows rather than processes.  My hunch is that only one explorer.exe process is going to be running during a users session,  there may however be multiple windows that this process has open, and this seems to be the information you are looking for.  Sound good?
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1176211
Try using GetWindow() and GetWindowText() and then checking for the caption of that window.

-Aleks.
0
 

Expert Comment

by:kahhoe
ID: 1176212
Hi jcjacquot,

Some information for you.  I have run PView by Visual C++.  It seems there is only one Explorer.EXE running.  When I try to open up one additional Explorer.EXE through task bar or start menu, it just increase by one thread.  I guess in all instance, there are only ONE instance of Explorer.EXE.  The rest are just threads.



Best Regards,
Kah Hoe

0
 
LVL 3

Expert Comment

by:danny_pav
ID: 1176213
You can get windows of a single process.  Instead of comparing captions, get the process of explorer.exe and then get the windows associated with that process.
0
 

Accepted Solution

by:
cmihalache earned 100 total points
ID: 1176214
There are two types explorer windows:

* explore (with tree view). You find these windows by calling
FindWindow("ExploreWClass", NULL);

* cabinet (without tree view). You find these windows by calling
FindWindow("CabinetWClass", NULL);

If you wanna find all of them, use EnumWindows and check each window's class.

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question