写一个Dll文件,内部函数不在接口声明中声明就行了(Exports部分)

解决方案 »

  1.   

    在新Unit中直接写就行了,
    例:unit ZGlobal;interface
    uses
      ...function GetStartDir: string; 
    ...implementationfunction GetStartDir: string;
    begin
     ...
    end;...
    end.使用时在新Unit的Uses中增加,在本单元可直接调用
    var Path: string;
    begin
      Path:=GetStartDir;
    end;
      

  2.   

    unit ZGlobal;interface //在InterFace部分声明的函数可以被外部的程序调用
    uses
      ...function GetStartDir: string; //声明接口部分
    ...implementationfunction SelfUseFunc:string;//此函数不可以被外部的程序调用但是在本单元内可以使用。
    begin
      result:='c:\windows\';
    end;function GetStartDir: string;  //实现部分
    begin
      result:=SelfUseFunc;        //可以在内部使用SelfUseFunc;
    end;end.
      

  3.   

    那里那么麻烦,根本不需要什么pbulic、private等,把这些全部忽略,就想当年TC的*.h文件一样!
    zxtyhy已经写出来了,就是那样
      

  4.   

    建议您访问www.etechbase.net/tech,里面有很多资料,也许可以解决您的问题。
    访问http://168.168.18.11:81/etechbase/advsearch.php将您的问题输入查询内容框,选择不同的精确程度,即可以找到你所需要的答案。效果还是可以的。
      

  5.   

    不用pbulic、private怎样保证一部分函数对外开发,另一部分不对外开发那?还是写成类好,这个才是面向对象的编程方法。