A wiec tak

Zrobilem cos takiego:

SERVER

function CheckTask(ExeFileName: string): Boolean;
var
TPC:Pchar;
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: ProcessEntry32;
begin
TPC := FProcessEntry32.szExeFile;
result := False;
FSnapshotHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize:=Sizeof(FProcessEntry32);
ContinueLoop:=Process32First(FSnapshotHandle, FProcessEntry32);
while integer(ContinueLoop) 0 do
begin
Result:=((UpperCase(ExtractFileName(FProcessEntry32.szExeFile))=UpperCase(ExeFileName))
or (UpperCase(FProcessEntry32.szExeFile)=UpperCase(ExeFileName)));

     Form1.ServerSocket1.Socket.Connections[0].SendText('O' + TPC);

If result then Break;
ContinueLoop := Process32Next(FSnapshotHandle,FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;

CLIENT

if s[1] = 'O' then
begin
itm := Form10.ListProc.Items.Add;
Delete(s, 1,1);
itm.Caption := s;
end;

Wszystko by byl OK tylko ze w tym ListProc pokazuje sie:

[System Proces]
Blabla1.exe
Blabla2.exe
Blabla3.exe
Blabla4.exe
Blabla5.exeOBlabla6.exeOBlabla6.exeOBlabla6.exeOBlabla6.exe...

A nie jak na List przystalo, pod soba =P

To jest w ogóle dziwna rzecz bo co skompiluje to inaczej ListProc wychodzi =]]

Moze wy wiecie gdzie jest BLAD =P