最近写了一个演示的小软件,用来演示卫星的数据传送。
原本是个exe可执行文件,现在想将它改为dll,这样方便以后在其它地方调用,不知该如何下手,请赐教。
分少的话,可以再加
原本是个exe可执行文件,现在想将它改为dll,这样方便以后在其它地方调用,不知该如何下手,请赐教。
分少的话,可以再加
解决方案 »
- Delphi ListView控件 问题,请高手帮忙!谢谢!
- Delphi6 中 记录类型 赋值问题
- VCLSkin4.22有Bug?
- 类的属性有什么用
- 用adotable连接paradox时,如果字段名或记录为中文则出现乱码,如何解决?
- 【通告】2004年上半年Delphi版牛奖揭晓
- 远程控制,被控机要求输入ctrl+alt+del,我怎么才可以屏去本地系统对这个组合的敏感?
- 关于TADOconnect的一个问题(怎么消除database login窗口)
- 还是那个问题
- 大问题得到了高手的指点,可在我机器上却老请报错,请大家来帮我看看吧!
- ■■■献上100分,求各位大哥大姐兄弟姐妹帮帮小弟我吧~
- 文件读取和处理字符串的效率问题
library BK_TJQZ;{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }uses
ShareMem, //注意,必须引用
windows,
SysUtils,
Classes,
Forms,
paramlist,
TJQZ in 'TJQZ.pas' {TJQZForm},
TjQzScCyj in 'TjQzScCyj.pas' {TjQzScCyjForm};{$R *.res}function ShowForm //这就是我要导出的函数(FormName:String;FormParams:TFormparams;modal:Boolean):Boolean ;stdcall;
begin
if UpperCase(FormName)='TTJQZFORM' then
begin
if TJQZFORM=nil then
begin
TJQZFORM:=TTJQZFORM.Create(Application);
TJQZFORM.MyParams := FormParams;
end;
Result := True;
if modal then
TJQZFORM.ShowModal
else
TJQZFORM.Show;
end
else begin
Result := False;
Application.MessageBox('Form没有找到!','提示', mb_ok);
end;
end;
Exports
ShowForm;begin
end.调用:
procedure TForm1.Button14Click(Sender: TObject);
var
TempShowForm : TShowForm;
MyHandle : THandle;
begin
MyHandle := LoadLibrary(PChar('E:\Code\DDZInput\'+'BK_TJQZ.dll'));
if MyHandle <> 0 then
@TempShowForm := GetProcAddress(MyHandle, 'ShowForm');
if @TempShowForm <> nil then
TempShowForm('TTJQZFORM', TempFormParams, True);end;