Hi
I need help i do program that is listing a runing process and add it
to the listbox but how to do it without my app on this list?
i do not want a my app to bee on this lists of running apps can you
help me?
procedure GetProcessList(var List: TstringList);
var
ovi: TOSVersionInfo;
begin
if List = nil then Exit;
ovi.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
GetVersionEx(ovi);
case ovi.dwPlatformId of
VER_PLATFORM_WIN32_WINDOWS: CreateWin9xProcessList(List);
VER_PLATFORM_WIN32_NT: CreateWinNTProcessList(List);
end
end;
procedure TForm1.ADD(Sender: TObject);
var
i: Integer;
MyProcList: TstringList;
a1:string;
begin
MyProcList := TStringList.Create;
try
GetProcessList(MyProcList);
if MyProcList = nil then Exit;
for i := 0 to MyProcList.Count - 1 do
ListBox1.Items.Add(MyProcList.Strings[i]);
a1:=IntToStr(MyProcList.Count - 1);
Label2.Caption:=a1;
finally
MyProcList.Free;
end;
end;