delphi hook动作回放

时间:2013-06-15 16:36:26
【文件属性】:

文件名称:delphi hook动作回放

文件大小:183KB

文件格式:RAR

更新时间:2013-06-15 16:36:26

delphi hook动作回放

procedure InitEventArrs(Var ST: TEventArrs); begin Zeromemory(@ST,sizeof(TEventArrs)); ST.EventLogs := 0; end; procedure InsertEventArrs(Var ST: TEventArrs; EvMsg: EVENTMSG); begin ST.EventArr[ST.EventLogs] := EvMsg; Inc(ST.EventLogs); end; procedure WriteEventArrs(Var ST: TEventArrs; fp: Integer); begin FileWrite(fp,ST,sizeof(TEventArrs)); end; function ReadEventArrs(Var ST: TEventArrs; fp: Integer): Boolean; begin if FileRead(fp,ST,sizeof(TEventArrs))>0 then Result := True else Result := False; end; function CreateFileEventArrs(filename: string): Integer; begin Result := FileCreate(filename); end; function OpenFileEventArrs(filename: string): Integer; begin Result := FileOpen(filename,fmOpenReadWrite); end; procedure CloseFileEventArrs(fp: Integer); begin FileClose(fp); end; function PlayProc(iCode:Integer;wParam:wParam;lParam:lParam):LRESULT;stdcall; begin canPlay:=1; Result:=0; if iCode<0 then Result:=CallNextHookEx(hPlay,iCode,wParam,lParam) else if iCode=HC_SYSMODALON then canPlay:=0 else if ((canPlay=1) and (iCode=HC_GETNEXT)) then begin if bDelay then begin bDelay:=False; Result:=50; end; // pEventMSG(lParam)^:=EventArr[PlayLog]; pEventMSG(lParam)^:=EvArr.EventArr[PlayLog]; end else if((canPlay=1) and (iCode=HC_SKIP)) then begin bDelay:=True; PlayLog:=PlayLog+1; end; // if PlayLog>=EventLogs then begin


【文件预览】:
XXX01
ActionRecordPlay.exe
Unit1.pas

网友评论