首页 > 其他 > 详细

Delphi DLL 字符串传递例子

时间:2014-09-22 19:07:44      阅读:391      评论:0      收藏:0      [点我收藏+]
library EN;
uses
  SysUtils,
  Classes,
  UnitFormEN in ‘UnitFormEN.pas‘ {FormEN};
{$R *.res}
function GetJobType(p: PChar): Boolean; stdcall;
var
  str: string;
begin
  str := ‘我们是中国人,我们爱自己的祖国.‘;
  StrCopy(p, PChar(str));
  Result := Length(p) > Length(str);
end;

function GetRates(p: PChar): Boolean; stdcall;
var
  str: string;
begin
  str := ‘我爱北京天安门.‘;
  StrCopy(p, PChar(str));
  Result := Length(p) > Length(str);
end;

exports
  GetJobType,
  GetRates,
  ShowFormEN;

begin
end.

Delphi DLL 字符串传递例子

原文:http://my.oschina.net/u/582827/blog/317099

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!