惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
B
Blog
S
SegmentFault 最新的问题
Vercel News
Vercel News
博客园 - 聂微东
宝玉的分享
宝玉的分享
C
Check Point Blog
有赞技术团队
有赞技术团队
IT之家
IT之家
V
V2EX
爱范儿
爱范儿
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
博客园 - 司徒正美
博客园_首页
Last Week in AI
Last Week in AI
博客园 - 叶小钗
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
F
Fortinet All Blogs
腾讯CDC
J
Java Code Geeks

博客园 - DELPHI技术

How to get File Summary Info 动态建表(示例) DBGridEh应用实例(来自delphi园地) DBGrid、DBGrideh专题总结(来自delphi园地) delphi 默认情况下参数及返回值的保存位置 Rotating Text How to Parse a Delimited String Into a String List - DELPHI技术 2005年5月20日Borland Delphi首席科学家Danny Thorpe谈Delphi的未来! 什么是BPL?在BPL中有多少单元的源代码 使用动态包导出函数的调用单元完整源代码 “类引用”概念 创建包 包和DLL的对比 动态包(bpl)的一个窗体源代码 动态调用包(bpl)的窗体源码 Delphi中预想不到的代码 一个完整身份证效验程序 基本算法(用 PASCAL 描述) 公用函数
使用动态包导出函数的单元的完整源代码
DELPHI技术 · 2005-07-16 · via 博客园 - DELPHI技术

unit FunkFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TFunkForm = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
//Declare the package functions using the StdCall calling convention
procedure FunkForm; stdcall;
function AddEm(Op1, Op2 : Integer) : Integer; stdcall;

//Export the functions
exports
  FunkForm,
  AddEm;

implementation

{$R *.dfm}
procedure FunkForm;
var
  FunkForm : TFunkForm;
begin
  FunkForm := TFunkForm.Create(Application);
  try
    FunkForm.ShowModal;
  finally
    FunkForm.Free;
  end;  
end;

function AddEm(Op1, Op2 : Integer) : Integer;
begin
  Result := Op1 + Op2;
end; 
procedure TFunkForm.Button1Click(Sender: TObject);
begin
  ShowMessage('你已经正确地调用了包的导出函数。');
end;

end.