Add(MainForm,12126796,231,287) { link(onCreate,7547734:doPart,[]) } Add(Message,14593461,595,287) { link(Message,10090816:FullPath,[(601,275)(583,275)(583,324)(566,324)]) } Add(Application,8332807,329,259) { } Add(FilePartElm,7547734,329,301) { link(onPart,11346049:doFindName,[]) link(FileName,8332807:AppFileName,[]) } Add(EnumProcess,11346049,413,280) { Point(FullPath) Point(onFind) Point(doFindName) link(onFind,4851569:GetProcessParent,[]) } Add(InlineCode,4851569,497,287) { 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,10090816:doFindID,[]) link(id,11346049:CurrentID,[(503,275)(461,275)(461,324)(419,324)]) } Add(EnumProcess,10090816,553,280) { Point(FullPath) Point(onFind) Point(doFindName) link(onFind,14593461:doMessage,[]) }