udllinterface.pas

来自「机器人足球赛比赛平台源代码」· PAS 代码 · 共 35 行

PAS
35
字号
unit udllinterface;

interface

uses uClass, Windows, Dialogs;
type TProcGetName = function :PChar; stdcall;

{上层接口}
procedure getteamname(var team1,team2:string);
procedure initRobotlibary;

{下层接口}

var
  getteamname1 : TProcGetName;
  getteamname2 : TProcGetName;

function teamAname : pchar; external 'teamdlla.dll' name 'teamname';
function teamBname : pchar; external 'teamdllb.dll' name 'teamname';
implementation

uses uMain;

procedure initRobotlibary;
begin
end;

procedure getteamname(var team1,team2:string);
begin
  team1 := teamAname;
  team2 := teamBname;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?