有一个项目要求做一个DLL,其中一个函数的声明如下(注:是DELPHI6格式的声明):function read_card(instr:string; var outstr,outstr2:string):integer现在用VC++6编写此DLL,问题有如下几个:
1、VC6用什么类型的变量接收 instr 的字符串。
2、VC6用什么类型的变量或方法可以传出 outstr 的值,而DELPHI6可以直接接收此字符串变量。
3、"var outstr,outstr2:string" 中var是限定 outstr,还是outstr,outstr2都限定。
1、VC6用什么类型的变量接收 instr 的字符串。
2、VC6用什么类型的变量或方法可以传出 outstr 的值,而DELPHI6可以直接接收此字符串变量。
3、"var outstr,outstr2:string" 中var是限定 outstr,还是outstr,outstr2都限定。
解决方案 »
- cxGrid列,要求不能编辑,但是选中单元格获得焦点,右键可以复制粘贴
- 如何自动安装数据库
- 用ole流的格式存储到long row字段中,再取出时直接存成文件不能打开
- 将数据集输出为文件的问题
- 急呀.谁来帮帮我!!!
- 在http://www.2ccc.com/article.asp?articleid=1159新加窗口
- 面向对象问题,好象很简单,但是自己不会,高分求救
- 关于字段长度的sql语句
- (傻傻地问)如何把两幅图片做成一个按钮?
- 超级简单问题!
- The element 'xs:schema' is used but not declared in the DTD/Schema
- 请教一个SQL语句
DELPHI的声明已经固定了,我们按他们的要求来写DLL,所以这个DELPHI中用PCHAR代替string已经是不可能了。
function read_card(instr,outstr,outstr2:pchar):integer; cdecl;implementation
function read_card(instr,outstr,outstr2:pchar):integer external 'Dll_File.DLL' name 'read_card';VC中这样声明函数:
extern "C" __declspec(dllexport) int read_card(LPTSTR instr, LPTSTR outstr, LPTSTR outstr2);