我的程序大概是这样的:<br>TGlobalData = record<br> ...<br> Buffer : array [0..1023] of Char;<br> ...<br> end;<br><br><br>function NewExtTextOutW(DC: HDC; X, Y: Integer; Options: Longint;<br> Rect: PRect; Str: PWideChar; Count: Longint; Dx: PInteger): BOOL; stdcall;<br>begin<br> UnInstallAPIHOOK;<br> ...<br> if inRange() then<br> begin<br> StrCopy(GlobalData.Buffer, PChar(WideCharToString(Str)));<br> SendMessage(GlobalData^.CallBackHandle, idMsg, 0, 0);<br> end; <br> ...<br> Result := ExtTextOutW(DC, X, Y, Options, Rect, Str, Count, Dx);<br> InstallAPIHOOK;<br>end;