如何调用这个DLL 有DLL源码

来源:百度知道 编辑:UC知道 时间:2024/07/03 02:15:52
library hook;

uses windows;

var nextglBegin: procedure(mode: cardinal); stdcall;
nextglEnable: procedure(mode: cardinal); stdcall;
nextglDisable: procedure(mode: cardinal); stdcall;
nextglTexEnvi: procedure(a,b,c: cardinal); stdcall;

procedure myglBegin(mode: cardinal); stdcall;
var keystate: tKeyboardstate;
begin
getkeyboardstate(keystate);
if keystate[VK_NUMPAD1] > 0 then
if (mode = $5) or (mode = $6) then
nextglDisable($0B71) else
nextglEnable($0B71);

nextglBegin(mode);
end;

procedure schleife;
begin
while getmodulehandle('opengl32.dll') = 0 do sleep(1000);
sleep(2000);
@nextglDisable := getprocaddress(getmodulehandle('opengl32.dll'),'glDisable');
@nextglEnable := getprocaddress(getmodulehandle('opengl32.dll'),'glEnable');
@nextglTexEnvi := getprocaddress(getmodule