Dll中导出类--Delphi实战之一[5]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 musicwind 的 blog

       当然,在该单元的use列表中应当将tfrmtest1tfrmtest2以及tfrmtest3所在的单元包含进来。而tfrmtest1的实现可以象这样:

       tfrmtest1 = class(tmybaseform)

       protected

function gettitle: pchar; override;

end;

function tfrmtest1.gettitle: pchar;

begin

  result := ‘hello from tfrmtest1’

end;

       末了,别忘了将getclasscountgetclassbyindex加到exports列表中。然后,builddll工程的时候,请将project option-package 中的使用运行包use runtime package”打勾。至于具体的原因后面讲。

至此,dll方面的工作告一段落。

       第三步,主程序驱动引擎的实现:

本文关键:Dll 导出 类 Delphi 实战 Musicwind
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top