在Delphi中如何调用C语言的DLL?

borussia2000 2003-09-04 04:12:36
在Delphi中如何调用C语言的DLL?
...全文
48 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mmtang3 2003-09-04
  • 打赏
  • 举报
回复
Unit Unit1;

interface

..............

function DES(op:integer; key, inblock: pchar;outblock:pchar;
len : integer): Integer; stdcall;
implementation
function DES(op:integer; key, inblock: pchar;outblock:pchar;
len : integer):Integer; external 'check.dll';

end;

或;
LoadLibrary; GetProcAddress;

江山易改 2003-09-04
  • 打赏
  • 举报
回复
如VC下开发的
函数
int DES(int op, char *key, char *inblock, char *outblock, int len)
打包check.dll
则在delphi中声明如下:
function DES(op:integer; key, inblock: pchar;outblock:pchar;
len : integer): integer ;stdcall;external 'check.dll' ;

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧