Solved

How to know if EXPLORER.EXE is running ?

Posted on 1998-10-26
5
443 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
std::atomic with custom class 6 186
C++ Language error 28 186
convert char array to number in c 5 83
VS2015 Redefinition errors 4 23
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…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now