function 函数名:pchar;external 'dll文件名' name 'TT_GET'; 

解决方案 »

  1.   

    var buff:pchar;
    procedure tt_get(bv:pchar) ;
      

  2.   

    var buff:array[0..14] of char;
    procedure tt_get(var bv:buff) ;
      

  3.   

    具体怎么做,是调DLL 我也是这么做的
    function 函数名:pchar;external 'dll文件名' name 'TT_GET'; 
    可是取不到数据。TO :zjqyb() 
       你可能没明白我的意思,我是问如何再调用后取得数据,最好有源码
      

  4.   

    var buff:array[0..15] of char;
    procedure tt_get(var bv:buff) ;external 'dll文件名' name 'TT_GET'; 
    你在c中定义的函数无返回值
      

  5.   

    对呀,为什么这么做tt_get(var bv:buff) 。
    具体怎么做?
      

  6.   

    bv就能返回准确值
    var bv相当于C++ 中的&引用调用
    再不行give me your dll and source 
    email:[email protected]
      

  7.   

    没有源程序,所以才问。我是不是这样调用,可是怎么取的数据呢?begin
        TB_GetVersion(BUFF);
    END;
      

  8.   

    这样声明
    procedure tt_get(var bv:string) ;external 'dll文件名' name 'TT_GET'; stdcall;因为这样,就传入了一个指针,执行完后,读bv的值即可。
      

  9.   

    这样调用
    var
      str:String;
    begin
      tt_get(str);
      showmessage(str);
    end;
      

  10.   

    是这样我打错了
    begin
        TB_GetVersion(BV);
    END;
      

  11.   

    定义一个edit
    begin
        TB_GetVersion(BUFF);
        edit1.text:=buff;
    END;
      

  12.   

    {var bv:buff) 定义有错误var buff:array[0..14] of char;
    procedure tt_get(var bv:buff)
      

  13.   

    这样声明不可能对呀。
    procedure tt_get(var bv:string) ;external 'dll文件名' name 'TT_GET'; stdcall;
    因为在DLL中定义的是PCHAR类型,在这里是STRING
      

  14.   

    type buff=array[0..14] of char;
    procedure tt_get(var bv:buff)
      

  15.   

    sorry 
    type BufferType=array[0..15] of char;
    procedure tt_get(var bv:BufferType) ;external 'dll文件名' name 'TT_GET'; var buff:BufferType;
      tt_get(buff);
      showmessage(buff);
    或者
      edit1.text:=buff;