unttypes.~pas

来自「屏幕取词的delphi代码」· ~PAS 代码 · 共 69 行

~PAS
69
字号
unit untTypes;

interface

uses
  Windows;

type
  TCommonData = record
    bCapture : BOOL;
    bInSpec : BOOL;
    CallBackHandle:HWnd;
    CallBackProcID : DWORD;
    hWndFloat : HWnd; (*浮动窗口的句柄*)
    hWndMouse : HWnd; (*鼠标所在窗口server的句柄*)
    hWndCapture : HWnd; (*当前鼠标所在的窗口*)
    MousePos  : TPoint; (*当前鼠标屏幕坐标*)
    MousePClient : TPoint; (*鼠标所在窗口的坐标*)
    charcount:Integer;
    Rect : TRect;
    case integer of
      0 : (BufferA : array [0..1023] of Char);
      1 : (BufferW : array [0..511] of WideChar);
  end;


  PCommonData = ^TCommonData;

  TCode5 = packed record
    siJmp : ShortInt;
    dwAddr : DWORD;
  end;

  TThunkFunc = (tfTextOutA,       tfTextOutW,
                tfExtTextOutA,    tfExtTextOutW,
                tfDrawTextA,      tfDrawTextW);

  TThunkFuncName = packed record
    strMod        : string;  // 系统模块名称
    strSysProc    : string;  // 系统DLL中的名字
    strThunkProc  : string;  // 你替换的函数的名字,必须在DLL的引出表中
  end;

  TThunkCode = packed record
    codeBak       : TCode5;  // 系统函数的代码的前5个字节
    codeThunk     : TCode5;  // 跳转到你的代码的5个字节
    addr_sys      : Pointer; // 系统函数的地址
    addr_thunk    : Pointer; // 替换函数的地址
    bInstalled    : boolean; // 安装了吗?
  end;

const
  G_DELAY_TIME = 100;

const
  ThunkFuncNameArr : array[TThunkFunc] of TThunkFuncName = (
    (strMod : 'gdi32.dll';  strSysProc : 'TextOutA';    strThunkProc : 'GanTextOutA'),
    (strMod : 'gdi32.dll';  strSysProc : 'TextOutW';    strThunkProc : 'GanTextOutW'),
    (strMod : 'gdi32.dll';  strSysProc : 'ExtTextOutA'; strThunkProc : 'GanExtTextOutA'),
    (strMod : 'gdi32.dll';  strSysProc : 'ExtTextOutW'; strThunkProc : 'GanExtTextOutW'),
    (strMod : 'user32.dll'; strSysProc : 'DrawTextA';   strThunkProc : 'GanDrawTextA'),
    (strMod : 'user32.dll'; strSysProc : 'DrawTextW';   strThunkProc : 'GanDrawTextW')
  );


implementation

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?