另类使用DELPHI编写DLL文件并动态调用
我编写了N个DLL库文件
主程序由10个窗体组成,其中有5个窗体都使用这N个DLL文件,
我想将这个N个库DLL文件,加入一个.pas 单元中,在每个窗体
中的uses ...,Ndll;
不知这种方法是否可行,如何设置

解决方案 »

  1.   

    1分

    看windows单元去。
    (1分也是肉)
      

  2.   

    但是出错如下: 
    edit1.Text:=Registryzgxs(Pczgx[1],Pczgx[2],Pczgx[3]); 
    [错误] Unit9.pas(74): Undeclared identifier: 'Registryzgxs' 
    screenzgx(zcFrm); 
    [错误] Unit9.pas(141): Undeclared identifier: 'screenzgx' 
    uses ShellApi,Unit2,Unit1,Unit4,Unit5,Unit7,Unit8,unit10,unit9,unit11,adminmd5,unit12; 
    [致命错误] Unit3.pas(453): Could not compile used unit 'Unit9.pas'
      

  3.   

    请教一个DELPHI编程的问题:
    我已经编写好了四个dll库文件名:
    userlogo.dll,telgame.dll,regzgxs.dll,screenzgx.dll
    由于这四个库文件在主程序中的screenzgx.dll是控制每个窗体的位
    置,最常用,所以第一个窗体都有先声明再引用,这样每个窗体中都
    出现冗余的代码,我如何将这四个DLL文件的声明集中到一个
    Commcmd.dll中一次性加载,在其它的窗体uses 加上就可以用了,
    就像引用算术 uses math就可以用[加、减、乘、除]都可以用了,
    而不是将所用的库文件集中的写到一个DLL文件中
      

  4.   

    我的意思是将所有的声明集中到[主工程]中的一个独立的Common.pas中,在每
    一个窗体中加上uses 中引用即可,可是出现错误:
    [错误] Commonzgxs.pas(5): Undeclared identifier: 'Timage'
    [错误] Commonzgxs.pas(7): Undeclared identifier: 'TFORM'
    [致命错误] SQMANAGESYS.dpr(16): Could not compile used unit 'Commonzgxs.pas'
      

  5.   

    用包(bpl)最好
    1分,就回答一分的答題吧!