想动态调用dll,最好举个例子!

解决方案 »

  1.   

    http://www.qostudy.org/pr/Article/aspnet/Delphi/200606/32372.htmlgoogle 查一下,一大片...
      

  2.   

    假设要调用 dll.dll 中的函数 func1,假设 func1 的调用格式为 procedure func1(n: integer); stdcall;var
      func1: procedure(n: integer) stdcall;
      mod: THandle;
    begin
      mod := LoadLibrary( 'dll.dll' );
      func1 := GetProcAddress( mod, 'func1' );
      func1(1);
      FreeLibrary( mod );
    end;