Delphi DLL 字符串传递例子


本文整理自网络,侵删。

 

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 xe android将域名转化为ip

Delphi中的处理事件 application.processmessages

Delphi 正确得到本地ip

Delphi 用cxgrid把数据导出到excel时乱码的解决办法

Delphi 判断一个颜色是否是亮色

Delphi模仿“千千静听”滚动标题栏,非常简单!

Delphi idhttp中get 图像链接通过memorystream加载 image控件显示

Delphi判断ip地址是否正确

Delphi获取硬件信息

Delphi fdmemtable内存表操作

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...