unit shengchengwenjian;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;  type userinfo=recordend;
type
  TForm1 = class(TForm)
    Button1: TButton;    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;implementation
uses
formatchange1;{$R *.dfm}
//////////////////////////// unit formatchange1;interface
uses
  shengchengwenjian;
function  formatchange(  uinfo: ^userinfo):Integer ;stdcall;
implementation
  function  formatchange; external 'test1.DLL'name  'formatchange';
end.出错信息如下:
[Error] formatchange1.pas(6): Identifier expected but '^' found
 
[Fatal Error] shengchengwenjian.pas(77): Could not compile used unit 'formatchange1.pas'

解决方案 »

  1.   

    function  formatchange(  uinfo: pointer):Integer ;stdcall; 
      

  2.   

    定义如下:type
      PuserInfo = ^userinfo;
      userinfo=record
      ...
    end;
    使用如下:function  formatchange(uinfo: PuserInfo):Integer ;stdcall; 
      

  3.   

    即使用具体类型,你也要先声明一个指针类型指向uinfo,用pointer也可,在传入时把uinfo的地址传进去 @uinfo