Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Jul : EXE File name from ProcessID
| Subject: | EXE File name from ProcessID |
| Posted by: | "Hs" (prg_s..@yahoo.com) |
| Date: | 10 Jul 2006 14:11:40 |
How can I get a process exe file name from it's ProcessID in win9x?
I do it in winNT with the following func but how can I in Win9x?
function GetWndFileNameNT(const ProcessID: DWORD): string;
var
Handle: THandle;
StrBuffer: array[0..MAX_PATH] of Char;
begin
Result := '';
Handle := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,False,
ProcessID);
if GetModuleBaseNameA(Handle,0,StrBuffer,SizeOf(StrBuffer)) > 0
then
Result := StrPas(StrBuffer);
CloseHandle(Handle);
end;
Thanks