myfunction:=tintfunction(fpointe);
写成
@myfunction:=tintfunction(fpointe); 试试

解决方案 »

  1.   

    sorry,撤回或改成:
    @myfunction := @tintfunction(fpointe);
      

  2.   

    要调用DLL函数,需要知道确切的语法,然后设置一个函数类型。比如,在下例中,调用MyTest.DLL里面的CallMe函数。此函数接受两个整数作为参数,返回一个字符串。
    procedure TForm1.Button1Click(Sender: TObject);
    type TCallMeDll = function(a,b: Integer): string;
     var CallMeDll: TCallMeDll;
         FuncPtr: TFarProc; 
         hDll: THandle; 
         result: string; 
    begin 
         hDll:=LoadLibrary('Mytestdll.dll'); 
         FuncPtr:=GetProcAddress(hDLL,'CallMe'); 
         @CallMeDll:=FuncPtr; 
         if @CallMeDll <> nil then 
           result:=CallMeDll(4,5); 
         FuncPtr:=nil; 
    FreeLibrary(hDll);
    end;
      

  3.   

    请问你报的是什么错???如果调用没有问题,可能是你没有设置环境变量,你的DLL要在系统默认的路径中。
    不会不行的。动态调用比静态好,我试过,如果你用静态调用时,启动速度会很慢,因为系统要检测所有加载的DLL。建议用动态。