结构如下
public struct UpdateKeyWords { public byte m_ucTableType; public byte m_ucUpdateType; public byte m_ucOperateType; public UInt32 counts;
public SubKeyword[] keys;//动态开辟 }
public struct SubKeyword
{ public UInt32 m_uiWordLen; public byte[] m_szWord;//动态开辟 }
1 回答
牛魔王的故事
TA贡献1830条经验 获得超3个赞
在结构体上面加上这个属性
[StructLayout(LayoutKind.Sequential, Pack = 0)]
public struct SubKeyword
{
public UInt32 m_uiWordLen;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
public byte[] m_szWord;//动态开辟
}
- 1 回答
- 0 关注
- 510 浏览
添加回答
举报
0/150
提交
取消