引用dll文件时,函数的参数与类型 要与 原动态链接文件声明相同。

解决方案 »

  1.   

    就说有错误说:
    Declaration expeted but 'USES' found请教怎么解决啊?
      

  2.   

    你为什么要放到interface 呢?
    放在implementation
    下面
      

  3.   

    呵呵,这样写吧:
    *****************************************************
       ...
    var
      Form1: TForm1;
      function test(val:integer):integer;stdcall;external 'my.dll' name 'test';implementation
       ...
       
    *****************************************************
    呵呵,怎么样?欢呼吧!!!
      

  4.   

    在动态库中声明函数时也要加stdcall;
    function test(val:integer):integer;stdcall;