function 函数名:pchar;external 'dll文件名' name 'TT_GET';
解决方案 »
- C++和delphi的HWND问题
- delphi 编译出现的问题
- 在LIstView控件中怎么使用SaveDialog控件保存内容?在线等待,高分回报!
- fastreport中用frprintgrid1如何显示报表总页数?
- 请问,在Delphi中怎样打开.hlp帮助文件??
- 如何将报表统计结果以非报表形式显示??急急急.......
- TWebConnection如何使用,各位请帮忙
- 模仿别人的程序,还是没能解决问题,又是密码登陆。。分都耗光了。。来看看吧
- 如何在控件缺省的事件处理之前,进行预处理?
- 三层的问题
- 谁知道Name[i]^99如何翻译为delphi
- 关于装delphi6.0的问题,谢谢!
procedure tt_get(bv:pchar) ;
procedure tt_get(var bv:buff) ;
function 函数名:pchar;external 'dll文件名' name 'TT_GET';
可是取不到数据。TO :zjqyb()
你可能没明白我的意思,我是问如何再调用后取得数据,最好有源码
procedure tt_get(var bv:buff) ;external 'dll文件名' name 'TT_GET';
你在c中定义的函数无返回值
具体怎么做?
var bv相当于C++ 中的&引用调用
再不行give me your dll and source
email:[email protected]
TB_GetVersion(BUFF);
END;
procedure tt_get(var bv:string) ;external 'dll文件名' name 'TT_GET'; stdcall;因为这样,就传入了一个指针,执行完后,读bv的值即可。
var
str:String;
begin
tt_get(str);
showmessage(str);
end;
begin
TB_GetVersion(BV);
END;
begin
TB_GetVersion(BUFF);
edit1.text:=buff;
END;
procedure tt_get(var bv:buff)
procedure tt_get(var bv:string) ;external 'dll文件名' name 'TT_GET'; stdcall;
因为在DLL中定义的是PCHAR类型,在这里是STRING
procedure tt_get(var bv:buff)
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;