相关疑难解决方法(0)

如何使用BTMemoryModule获取HInstance

我试图从资源使用BTMemoryModule.pas单位加载一个DLL,但我收到此错误 The specified module could not be loaded.这些是我在dll中的程序,我正在使用exe调用BTMemoryModule:

procedure StartHook; stdcall;
begin
  if MessageHook=0 then
  begin
    MessageHook := SetWindowsHookEx(WH_GetMessage, 
                                    @GetMsgProc, 
                                    HInstance, 
                                    0);
    if MessageHook = 0 then 
      ShowMessage(SysErrorMessage(GetLastError));
  end;
end;

function GetMsgProc(Code: Integer; 
  wParam, lParam: Longint): Longint; stdcall ;
begin
  Result := CallNextHookEx(MessageHook, Code, wParam, lParam);
end;
Run Code Online (Sandbox Code Playgroud)

delphi

1
推荐指数
1
解决办法
1044
查看次数

标签 统计

delphi ×1