编组修复了 .netcompactFramework 中的 Tchar[]
如何在 .Net Compact Framework 和 in.net Framework 中编组固定的 Tchar[]
typedef struct _VXN_REGISTRATION_RESPONSE
{
char DID [257];
TCHAR PrimarySDCURL [257];
TCHAR SecondarySDCURL [257];
} VXN_REGISTRATION_RESPONSE, *LPVXN_REGISTRATION_RESPONSE;
How can one Marshal the fixed Tchar[] in .Net compact Framework and in.net Framework
typedef struct _VXN_REGISTRATION_RESPONSE
{
char DID [257];
TCHAR PrimarySDCURL [257];
TCHAR SecondarySDCURL [257];
} VXN_REGISTRATION_RESPONSE, *LPVXN_REGISTRATION_RESPONSE;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设
TCHAR
很宽。如果没有,那么您可以计算出来,因为它与char
字段相同。该结构想要这样声明:
唯一的困难是紧凑的框架并不容易从 Unicode 转换为 ANSI。因此,要分配给 DID,您需要:
I'm assuming that
TCHAR
is wide. If not then you can work it out since it's the same as thechar
field.The struct wants to be declared like this:
The only difficult bit is that compact framework doesn't make it easy to convert from Unicode to ANSI. So to assign to DID you need: