Last time I checked, .NET has some problem dealing with nested structs. I'm not sure whether it's fixed. If it hasn't, you would have to deal with it by yourself. E.g: Allocate a memory block with Marshal.AllocHGlobal, get the struct data, and then use Marshal.PtrToStructure to extract the struct.
解决方案 »
- 懂实时网络传输的大牛进来帮我解决两个问题
- 在winform里,怎么样根据一个字符串(例如"button1"),调用一个控件(例如button1)???
- sqldmo 主机名Localhost不能连接
- 小弟建了一个(C#高级编程-GDI+)一个QQ群~~~~希望高手~~~菜鸟~~~加入我的群~~共同探讨 C# GDI+
- 一个windows服务中修改注册表的问题
- 在WINDOWS FORM中,怎樣自定義dataGridTextBoxColumnStyle,高手救我
- 在写类文件的时候Page.FindControl("form1")出错,错误信息非静态字段、方法或属性
- ADO.net如何实现给定一个数据库连接得到数据库下所有的数据表!up又分!
- 新手问题.
- ++intPeople++ 是什么意思?能举个例子吗?复者加分。
- 在asp.net中如何实现选择文件路径,而不是选择文件?
- Console程序暂停问题!!!
特别感谢 qqchen79(知秋一叶) ,但是对于这样的结构,在我要调用的DLL中还有很多,如果都要去修改的话,工作量将相当的大,并且容易出错,有没有其它的办法呢?
public struct tcsApnPoolList_t
{
public tcsApnPool_t apnPoolList1;
public tcsApnPool_t apnPoolList2;
public tcsApnPool_t apnPoolList3;
...
public tcsApnPool_t apnPoolList10; //define 10 items separately. public System.UInt16 length;
}