动态加载dll中的函数

var
  H: HWnd;
  p: Function(i_input:Integer):Integer; stdcall;
begin
        H := LoadLibrary(PChar('ABC.DLL'));
        if H <> 0 then
          begin
            p := GetProcAddress(H, PChar('DEF'));
            if Assigned(p) then p(123);
          end;
      FreeLibrary(h);
end;

posted @ 2017-12-14 13:19  辉辉太郎  阅读(428)  评论(0编辑  收藏  举报