uses
SysUtils,
Classes;
{$R *.res}
var DogCascade:longint;
function USBHotDogErrorCode(dwRetcode:longint):string;
begin
case dwRetcode of
1:result:='Error one';
2:result:='Error two';
3:result:='Error three';
end;
end;
function dogcheck:longint;
begin
result:=1;
end;
Function USBDog(var amess:Pchar):Boolean;stdcall;
var
dwRetCode: longint;
Begin
Result:=True;
DogCascade := 0;
dwRetCode := DogCheck;
if (dwRetCode<>0) then {0 means susccess}
begin
amess:=Pchar(USBHotDogErrorCode(dwRetcode));
Result:=False;
end
End;
exports
USBDog;
begin
end.
//////////////////////Testfile///////////
unit Unit3;