本文整理自网络,侵删。
创建并调用 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 xe6 android 实现base64字符串的解析
Delphi研究之驱动开发篇(六)--利用section与用户模式程
更多相关阅读请进入《Delphi》频道 >>