Add(InlineCode,13014966,434,91) { WorkPoints=#6:doOpen|7:doWrite| EventPoints=#6:onOpen|7:onWrite| DataPoints=#4:Byte|4:Addr|2:AP| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses Windows,kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|29: ProcessHandle: THandle; |26: procedure CloseLinks;|9: public|10: Byte,|10: Addr,|8: AP,|24: onWrite: THI_Event;|23: onOpen: THI_Event;|34: destructor Destroy; override;|51: procedure doOpen(var _Data:TData; Index:word);|52: procedure doWrite(var _Data:TData; Index:word);|5: end;|0:|14:implementation|0:|0:|31:destructor THiAsmClass.Destroy;|5:begin|14: CloseLinks; |13: inherited; |4:end;|0:|33:procedure THiAsmClass.CloseLinks;|5:begin|29: CloseHandle(ProcessHandle);|4:end;|0:|29:procedure THiAsmClass.doOpen;|5:begin|56: if ProcessHandle <> 0 then CloseHandle(ProcessHandle);|79: ProcessHandle := OpenProcess(PROCESS_ALL_ACCESS,False,ReadInteger(_data,AP));|49: if ProcessHandle <> 0 then _hi_OnEvent(onOpen);|4:end;|0:|30:procedure THiAsmClass.doWrite;|4:var |21: BytesWrited: DWORD;|27: PathData,StrData: String;|5:begin|36: StrData := ReadString(_Data,Byte);|57: PathData := PathData + chr(Hex2Int(Copy(StrData,1,2)));|108: WriteProcessMemory(ProcessHandle, Pointer(Hex2Int(ReadString(_Data,Addr))), @PathData[1], 1, BytesWrited);|35: _hi_OnEvent(onWrite,BytesWrited);|4:end;|0:|4:end.| }