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

dll有关问题,简单

2012-03-08 
dll问题,简单library firdllusesSysUtils,Classes,Un in Un.pas{$R *.res}beginend.unit Uninterface

dll问题,简单
library firdll;

uses
  SysUtils,
  Classes,
  Un in 'Un.pas';

{$R *.res}

begin
end.


unit Un;

interface

uses Windows, Messages, Dialogs, SysUtils;

var
  function fu:bool;stdcall; //identifier expected but 'function' found;

implementation //type expected but 'implemention' found 

function fu:integer;

begin
  result:=0;
end;

end.
 
多谢

[解决办法]
function fu:bool;stdcall; //identifier expected but 'function' found; 

implementation //type expected but 'implemention' found

function fu:integer; 
函数返回值不相同 ,
[解决办法]

1:
var
function fu:bool;stdcall; //identifier expected but 'function' found;

var 是用来定义变量的,你没有定义变量这个var就不需要了

2:
function fu:integer;
begin
result:=0;
end;

函数声明不一致,改成
function fu:bool;stdcall;
begin 
result:=false; 
end; 

热点排行