如题

解决方案 »

  1.   

    可以通过修改
    代码,将.exe的部分功能作为函数在dll中引伸出来但如果试要工具转化,呵呵,世界上没有几个人能做
      

  2.   

    一般都有主程序调用各个dll,每个dll为一个模块。
    你是不是这个意思,在菜单project下有一个view source,打开.dpr文件,把program改为library ,后面跟dll文件名。再定义一个导出函数就可以了。如exports 函数名;
    不知道对你有没有帮助
      

  3.   

    给你个对照界面;
    1、exe的工程文件代码;program P_chufangchuku;uses
      Forms,
      db,
      adodb,
      strutils,
      sysutils,
      U_Main in 'U_Main.pas' {Frm_Main},
      U_Report in 'U_Report.pas' {Frm_Report},
      U_setqueryterm in 'U_setqueryterm.pas' {Frm_setqueryterm};{$R *.res}  begin
      Application.Initialize;
      Application.CreateForm(TFrm_Main, Frm_Main);
      Application.CreateForm(TFrm_Report, Frm_Report);
      Application.CreateForm(TFrm_setqueryterm, Frm_setqueryterm);
    end;
      

  4.   

    2、相应的dll工程代码;library P_chufangchuku;uses
      Forms,
      db,
      adodb,
      strutils,
      sysutils,
      U_Main in 'U_Main.pas' {Frm_Main},
      U_Report in 'U_Report.pas' {Frm_Report},
      U_setqueryterm in 'U_setqueryterm.pas' {Frm_setqueryterm};{$R *.res}
    function chufangchuku(H: Thandle):integer;stdcall;export;
    begin
      Application.Handle := H;
      Application.CreateForm(TFrm_Main, Frm_Main);
      Application.CreateForm(TFrm_Report, Frm_Report);
      Application.CreateForm(TFrm_setqueryterm, Frm_setqueryterm);
      
      Frm_setqueryterm.Free;
      Frm_Report.Free;
      Frm_Main.Free;
      application.Handle := 0;
    end;exports
      chufangchuku index 1;begin
    end.