Make(delphi) ver(4.04 build 184) Add(MainForm,12126796,231,287) { link(onCreate,7547734:doPart,[]) } Add(Application,8332807,329,252) { } Add(FilePartElm,7547734,329,301) { link(onPart,11346049:doFindName,[(383,307)(383,328)]) link(FileName,8332807:AppFileName,[]) } Add(EnumProcess,11346049,406,301) { Point(onFind) Point(doFindName) link(onFind,4851569:GetProcessParent,[(454,314)(454,307)]) } Add(InlineCode,4851569,469,301) { WorkPoints=#16:GetProcessParent| EventPoints=#6:onProc| DataPoints=#2:id| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|38:uses kol,Share,Debug,tlhelp32,windows;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|23: onProc,id:THI_Event;|3: |54: procedure GetProcessParent(var dt:TData; idx:WORD);|5: end;|0:|14:implementation|0:|39:procedure THiAsmClass.GetProcessParent;|3:var|17: I,_id: Integer;|22: hSnapshoot: THandle;|24: pe32: TProcessEntry32;|5:begin|26: _id:=ReadInteger(dt,id);|64: hSnapshoot := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);|0:|27: if (hSnapshoot = -1) then|9: Exit;|41: pe32.dwSize := SizeOf(TProcessEntry32);|44: if (Process32First(hSnapshoot, pe32)) then|10: repeat|111: if pe32.th32ProcessId = _id then begin _hi_OnEvent(onProc,Integer(pe32.th32ParentProcessId)); break; end;|9: until|42: not Process32Next(hSnapshoot, pe32);|0:|27: CloseHandle (hSnapshoot);|4:end;|0:|4:end.| link(onProc,2924580:doText,[]) link(id,11346049:CurrentID,[(475,296)(456,296)(456,337)(412,337)]) } Add(Message,9309992,693,301) { } Add(EnumProcess,10090816,581,301) { Point(onFind) Point(doFindName) link(onProcess,10125178:doCompare,[]) } Add(Edit,2924580,525,301) { Left=550 Top=270 link(onChange,10090816:doEnum,[]) } Add(If_else,10125178,637,301) { link(onTrue,9309992:doMessage,[]) link(Op1,2924580:Text,[(643,295)(564,295)(564,335)(531,335)]) link(Op2,10090816:CurrentID,[(650,293)(622,293)(622,336)(587,336)]) }