在bcb中把自定义结构传入DELPHI的dll中处理。 如
struct AQuerySInfo
{String SetType;
TList *LabelList; };
发现无法正常传入结构中的数据,AQuerySInfo 这种自定义结构做参数,能在delphi的dll中调用吗?
struct AQuerySInfo
{String SetType;
TList *LabelList; };
发现无法正常传入结构中的数据,AQuerySInfo 这种自定义结构做参数,能在delphi的dll中调用吗?
解决方案 »
- ttbxtoolbar 组件是在那个第三方组件包里的?
- **********关于打印的问题***************
- 如何将服务器上的数据库导出成Excel文件,最好用存储过程实现
- pointer 指向的数据通过网络发送,并重构
- 学历与文凭,在找工作中哪个更好用?
- 求使用odac调用oracle存储过程的方法和实例
- 高难度问题?
- 如何才能让多个COM/MTS组件中的数据组件共享同一个COM/MTS中的ADOConnection
- 一个关于字体的问题
- 请教关于更新触发器的问题?
- 下了一套 BusinessSkinForm, 但对它自带的皮肤风格不是很满意。那位更漂亮一些的皮肤文件?
- 想在TEdit类中加一个按钮,如何实现呀
D可以用结构做参数。
你要在D的公共单元里定义这样的结构。结构中最好不要使用string。
使用string[255]。
推荐使用pchar.传递的时候传递结构Addr.
type
pAQuerySInfo=^AQuerySInfo ;//这就是这个结构的指针。
AQuerySInfo=record
SetType:string;
LabelList:Tlist;
end;
pDataSetContentInfo结构里的
pDataSetContentInfo.settype:='1' ;
pDataSetContentInfo.Content:='ddd' ;DataSetInfo.ContentList.Add(@pDataSetContentInfo);
返回值为DataSetInfo,返回后数值都变成了乱码?
郁闷啊。
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL.
谢谢,我的问题已经解决。
1、用pchar代替了字符串
2、把函数改为了过程,原返回值放在了参数里。