GetModuleInformation
代码跳动 2008-09-04 03:41:42 procedure xxx;
var
hLib: THandle;
tInf: TModuleInfo;
s:string;
begin
hLib:= LoadLibrary('xxx.dll');
if hLib <> 0 then
begin
GetModuleInformation(GetCurrentProcess, hLib, @tInf, SizeOf(tInf));
s :=Format('%d', [DWORD(tInf.lpBaseOfDll)]);
end;
===================
如上代码, 是取得游戏里加载的xxx.dll基址. 用线程dll hook 游戏是可以直接用的.
但我想用一个独立的程序去读这个游戏dll的基址. 怎么实现呢. (是不是GetCurrentProcess 用什么替换?)