Hi all,
How i can receive list of active processes. When i want to receive list of all active
processes i use API CreateToolhelp32Snapshot but i want to receive the list of visible
processes only. (When i press CTRL+ALT+DEL, i see that list).

Thanks in advance
Posted on 2003-02-09 15:30:28 by martidim
hi, look here

just convert this Little vb snipped in the middle of that thread to asm.
or just have a look at the "EnumWindows" API in your references.
Posted on 2003-02-10 03:34:27 by mob
or you could always do a loop with the getwindow api.
Posted on 2003-02-10 03:51:21 by HeXeN
have a look here
there?s an nice example for win9x and nt4
Posted on 2003-02-10 04:05:05 by Allanon
doesn't GetWindow need a source window?
Posted on 2003-02-10 04:05:15 by mob
here some of my vb code to look at:

if u want i can also attach and app using this code everything looks ok to me so far.. the only problem would be with the process identifiers if u needed them.
--------------------------------------------------------------------------------------
Sub AllOpenWindows(lst As ListBox)
'-HeXeN
Dim FirstWindow As Long
Dim NextWindow As Long
Dim LastWindow As Long
Dim CN As String

lst.Clear

FirstWindow& = GetActiveWindow
NextWindow& = FirstWindow&

Do: DoEvents

If IsWindowVisible(NextWindow&) <> 0 Then
If GetParent(NextWindow&) = 0 Then
CN$ = String(255, vbNullChar)
Call GetWindowText(NextWindow&, CN$, 255)
lst.AddItem CN$
End If
End If
NextWindow& = GetWindow(NextWindow&, GW_HWNDNEXT)

Loop While NextWindow& <> 0
End Sub
------------------------------
sorry to everyone who hates vb code :)
---------------------------------------------
Posted on 2003-02-10 04:11:56 by HeXeN
mh i don't know, looks like it could work, but i think it's a little kinky
to do it like this. EnumWindows is made for this purpose...
Posted on 2003-02-10 04:35:43 by mob
Thank you very much - EnumWindows is a good solution !
Posted on 2003-02-11 17:53:35 by martidim