Ну так и надо было копировать описание функции, а то вы выдернули только ее вызов.
Код:
function exe_running(filename: string; bfullpath: boolean): boolean;
var
i: integer;
myproclist: tstringlist;
begin
myproclist := tstringlist.create;
try
getprocesslist(myproclist);
result := false;
if myproclist = nil then exit;
for i := 0 to myproclist.count - 1 do
begin
if not bfullpath then
begin
if comparetext(extractfilename(myproclist.strings[i]), filename) = 0 then
result := true
end
else if comparetext(myproclist.strings[i], filename) = 0 then result := true;
if result then break;
end;
finally
myproclist.free;
end;
end;