AnsweredAssumed Answered

vrf VRF - Windows ID's or Names

Question asked by g.nied on Aug 24, 2002

funny, we did nearly the same coding ..

But here's another question to you:

how do you find out which handle the current VEE program has?
The point is, that I want to modify the window of my vee prog. What is the
most secure way to find its handle? Foregroundwindow or activeWindow are not
secure ..

        Georg Nied
Hansestr.7 - 51149 Cologne

-----Original Message-----
From: Shawn Fessenden []
Sent: Sunday, August 25, 2002 3:32 AM
To: VEE vrf
Subject: [vrf] RE: VRF - Windows ID's or Names

Jeff -

> Does anyone have an idea how
> I can go about getting a list
> of running Windows?

This version does this the "really really" way. EnumProcesses (from the
Process Status API - psapi.dll) is called to get the process ids of all
running processes. These are opened one at a time and EnumProcessModules is
called to get a list of modules that have been mapped into the process. Note
that not all processes will be listed because of access rights.

The processes are listed in a TreeVeiw control. Modules mapped into the
process are listed as children of the process.

It's probably worth mentioning that in Win32 a module handle (hMod) is
actually a pointer to that module's code in memory. This reveals some stuff
about how Windows works. For instance, notice that the module ntdll.dll is
mapped into all processes at 0x77f80000. Windows doesn't actually give each
process it's own copy of ntdll.dll, it just loads it once and maps that code
into all processes at the same address.

Just a fun fact.

> I would also like to be
> able to get a list of the
> Task Bar programs

To determine which of the listed processes are also on the Task Bar, I think
all that's necessary is to check which of these processes have a main window
with the style WS_OVERLAPPED. I'm not real sure about that though so I
didn't bother with it.

You are currently subscribed to vrf as:
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".