How to change the implementation (detour) of an externally declared function

前端 未结 2 672
囚心锁ツ
囚心锁ツ 2020-11-27 04:18

I have a third party function

function DataCompare(const S1, S2: string; APartial: Boolean): Boolean;
begin
   ...
end;

It is used in anot

2条回答
  •  盖世英雄少女心
    2020-11-27 05:15

    I think JCL has some utils for this kind of stuff... I haven't used it myself but had a quick look and following items look promising:

    jclSysUtils.WriteProtectedMemory()
    jclPeImage.TJclPeMapImgHooks.ReplaceImport()
    

    I think the jclHookExcept.JclHookExceptions() demonstrates how to use them.

提交回复
热议问题