(最高难度)C#调用c++ DLL(返回结构数组指针) ,顶者有分!解决方案


(最高难度)C#调用c++ DLL(返回结构数组指针) ,顶者有分!
如何把返回c++结构数组指针,c#结构数组    请大侠帮助

c++定义:
QUERY* QueryTransactionHistory(DWORD   dwIP,int   nPort,TRANSACTION   *   ,int*   outNum,int*   nErrorCode);

TRANSACTION结构:
typedef   struct   TRANSACTION
{
char account[19];
int maxNum;
char startDate[16];
char endDate[16];
}TRANSACTION;

QUERY结构:
typedef   struct   QUERY
{
int id;
int itemAmount;
int gold;
int silver;
char itemName[30];
}QUERY;



C#语言 .net 程序开发

红发亚特鲁 12 years, 11 months ago


学习

帕金森症候群 answered 12 years, 11 months ago


现在来学习一下,哪位来指点下

纪田正臣。 answered 12 years, 11 months ago


呵呵,如果没错的话,以前那个人应该是我
现在来学习一下,哪位来指点下

盛夏的大白 answered 12 years, 11 months ago


以前好像有人问过。帮顶一下!

你们亲爱的熊哥 answered 12 years, 11 months ago


mark

s惊蛰小满s answered 12 years, 11 months ago


学习

8815168 answered 12 years, 11 months ago


不懂,顶一下

黄金背锅侠 answered 12 years, 11 months ago


继续关注

打死也不说 answered 12 years, 11 months ago


学习学习

killyu answered 12 years, 11 months ago


帮顶

炮姐的小短裤 answered 12 years, 11 months ago


:)

忘了是返回数组:)

QUERY[]

少年特工喵组 answered 12 years, 11 months ago


关注


专食葱的人 answered 12 years, 11 months ago


[DllImport( "你的dll.dll ", CharSet=CharSet.Ansi)]
public static extern QUERY[] QueryTransactionHistory(string dwIP, int nPort, ref TRANSACTION TR, ref int outNum, ref int nErrorCode);

建议封装成com组件,使用更加方便。。。。

未知生物体 answered 12 years, 11 months ago

Your Answer