delphi 创建并调用 DLL


本文整理自网络,侵删。

 创建并调用 DLL(1)
//通过 DLL Wizard 建立:
library TestDLL;

uses
SysUtils,
Classes,
Dialogs;

{$R *.res}

//建立过程
procedure Test;
begin
ShowMessage('TestDLL.Test');
end;

//输出
exports
Test;

begin
end.


//在其他工程调用,如果不在一个工程组,需要在相同目录下、System32下或指定路径;
//声明可以在实现区或接口区,这里的函数名要一致,甚至大小写。

//调用测试:
procedure Test; external 'TestDLL.dll';

procedure TForm1.Button1Click(Sender: TObject);
begin
Test;
end;

相关阅读 >>

Delphi xe [dcc32 fatal error] f2039 could not create output file 问题的解决

Delphi中messagebox用法

Delphi concat 字符串函数

Delphi 三个消息函数的威力

Delphi反调试【初级】检测法

Delphi建立文件的快捷方式

Delphi 2009 的反射单元(objauto):

Delphi console程序中一种定时方法

Delphi 获取一个文件夹下的所有文件

Delphi for 循环的例子 多种用法

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



打赏

取消

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

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

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

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

评论

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