//uses TLHelp32
//FHandle = ProcessID(进程ID)
procedure TProcessInfo.EnumModules(const AList: TStrings);
var
snap : THandle;
me32 : TMODULEENTRY32;
begin
if FHandle = 0 then
Exit;
snap := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, FHandle);
if snap <> 0 then
try
me32.dwSize:= SizeOf(TMODULEENTRY32);
if Module32First(snap, me32) then
begin
while Module32Next(snap, me32) do
AList.Add(me32.szExePath);
end;
finally
CloseHandle(snap);
end;
end;