function MaxNum(x,y:integer):integer;stdcall;external'c:\dlls\simple';
  function BR(source_NO,dest_NO:integer;START_AD:PChar;count:integer):integer;stdcall;external'c:\dlls\PLCcom_P2';procedure TForm1.Button1Click(Sender: TObject);
begin
   label1.Caption := inttostr(MaxNum(2,4));        
   BR(1,1,'X0040',2);                         { 这个是调用DLL的客户程序,此行调用出错.}
end;用DELPHI编写的DLL程序.编译通过并且已经生成了DLL文件.stdcall等都已经俱全...还有什么问题,请大家给点提示吧...??

解决方案 »

  1.   

    'c:\dlls\simple'是目录吧,DLL文件名呢
      

  2.   

    静态声明不对
    应该
    interfacefunction MaxNum(x,y:integer):integer;stdcall;
    function BR(source_NO,dest_NO:integer;START_AD:PChar;count:integer):integer;stdcall;emplemention
    function MaxNum;external 'yourdllname' name 'you procedure name '
    function BR;external 'yourdllname' name 'you procedure name '.
      

  3.   

    emplemention应为implementation ,sorry
      

  4.   

    声名时把dll文件扩张名加上试一下