在一PB程序的pbl中有如下:
function string pf_converstr(string instr)library "strproc.dll"
据猜是Powerbuilder的Function的意思,名称是 pf_converstr,
现在,这个dll已经好了,我在delphi中要如何调用他?好心人写段代码吧。

解决方案 »

  1.   

    首先在
    type
    private
    public
    end
    var
    //在这里声明掉用函数
    function string pf_converstr(string instr); stdcall; external strproc.dll';
    implementation
    这个DLL放到当前工程目录下面
    然后在自己的可以在函数或者过程中随意调用了。
      

  2.   

    但是有一个建议,DLL提供接口函数的时候返回值最好是PCHAR或者INTEGER
    否则STRING类型的话有时候会出现乱码
      

  3.   

    用以下申明
    --------
    function  pf_converstr(instr :pchar):pchar;stdcall;external 'strproc.dll'也可写成:
    function  pf_converstr(instr :string):string;stdcall;external 'strproc.dll'