C++的结构体指针
typedef struct
{
int m_devId;
char m_pstrIp[20];
short m_sPort;
}test, *LPCONFIGINFO;
使用c#来声明
public struct CONFIGINFO
{
public int m_devId;
public char[] m_pstrIp;
public int m_sPort;
}
这样对吗,要求这个C#的结构体是要以指针形式封送到c++的DLL里去的,并且以回调的方式传回指针并转换为结构体
typedef struct
{
int m_devId;
char m_pstrIp[20];
short m_sPort;
}test, *LPCONFIGINFO;
使用c#来声明
public struct CONFIGINFO
{
public int m_devId;
public char[] m_pstrIp;
public int m_sPort;
}
这样对吗,要求这个C#的结构体是要以指针形式封送到c++的DLL里去的,并且以回调的方式传回指针并转换为结构体
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货