2012年2月6日

Delphi Dll 动态调用例子

摘要: 一、编写dlllibrary TestDllByD2007;uses SysUtils, Classes; function test(const astr:PChar):Boolean;stdcall; begin Result:=True; end;{$R *.res} exports test;beginend.注意:1.不能使用string类型,否则涉及到资源释放的问题,使用Pchar代替string。2.Dll中不能直接返回string,除非引用ShareMem单元,发布程序时需要包含BORLNDMM.DLL二、编写测试窗体,就一个button.在button的代码中,实现dll的动 阅读全文

posted @ 2012-02-06 17:01 王海波 阅读(2091) 评论(0) 推荐(0)

导航