Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

List processus from service under windows 7

5 views
Skip to first unread message

Christophe L.

unread,
Nov 16, 2012, 2:01:26 PM11/16/12
to
Hi

I've written a service which has to list active windows process.
It works under windows XP, but under windows 7 the list of process is
very limited (quite only the service itself)

I use this code (extract only to not bother you):

EnumWindows(@AllWindows, LParam(ListeProcess));

and
"
...
SendMessage(wHnd, WM_GETTEXT, 255, LongInt(@Buffer[0]));

if (Buffer <> '') and IsWindow(wHnd) then
begin
GetWindowThreadProcessID(whnd, @hprocessID);
...
"
and
"
...
hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,
false, PID);
...
"

I'm using Delphi 6.

Thanks
Christophe
0 new messages