Hallo!! Also hier ist mein Quelltext zum auslesen des Namens.
Delphi-Quellcode:
function EnumWindowsProc(Wnd: HWND; LParam: LPARAM):BOOL; stdcall;
var PID : LongWord;
Title : array[0..255] of char;
begin
result := true;
If (IsWindowVisible(Wnd) or IsIconic(wnd)) and
((GetWindowLong(Wnd, GWL_HWNDPARENT) = 0) or
(GetWindowLong(Wnd, GWL_HWNDPARENT) = GetDesktopWindow)) and
(GetWindowLong(Wnd, GWL_EXSTYLE) and WS_EX_TOOLWINDOW = 0) then
begin
GetWindowThreadProcessID(Wnd, @PID);
GetWindowText(Wnd, Title, 256);
with frmmain.lvprocess.Items.Add do
begin
Caption:= Title;
Subitems.Add(IntToStr(PID));
end;
end;
end;
Master