首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

关于DLL 的有关问题

2012-02-19 
关于DLL 的问题在网上找了一个制作DLL 文件的教程File---New---Other---DLL Wizard这就创建了一个动态连接

关于DLL 的问题
在网上找了一个制作DLL 文件的教程
  File---New---Other---DLL Wizard

  这就创建了一个动态连接库的基本模块

  library Project2;

  uses
  SysUtils,
  Classes;

  {$R *.res}

  begin

  end.

  把工程名改为Mydll,并写入必要的函数

  library mydll;

  uses
  SysUtils,Classes,Dialogs,windows;

  function Triple(N:Integer):integer;stdcall;
  begin
  result:=N+3;
  end;

  function Double(N:Integer):integer;stdcall;
  begin
  result:=N+2;
  end;

  function Triple1(N:Integer):integer;stdcall;
  begin
  showmessage('计算N+3');
  result:=N+3;
  end;

  function Double1(N:Integer):integer;stdcall;
  begin
  messagebox(0,'计算N+2','计算N+2',mb_ok);
  result:=N+2;
  end;

  exports
  Triple name 'Tr',
  Double name 'Do',
  Triple1 name 'TrM',
  Double1 name 'DoM';

  Triple,Double,Triple1,Double1;

  {$R *.RES}

  begin

  end.

编译时 提示
declaration expected but identifier 'triple' found

这是为什么啊

[解决办法]
Triple,Double,Triple1,Double1; 这个地方有问题
[解决办法]
去掉 Triple,Double,Triple1,Double1;
[解决办法]
Triple,Double,Triple1,Double1; 这个地方有问题

热点排行