设法不受管理的无符号短 [英] managed to unmanaged unsigned short

查看:87
本文介绍了设法不受管理的无符号短的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...我需要将托管的无符号短数组返回给本机c ++


hi...I need to return a managed unsigned short array to native c++


unsigned short CPPWrapper::Factors(void)
{
      array<unsigned short>^ aaa =  bb->Factors(a,0);
     pin_ptr<unsigned short> pus = &aaa[0]; // this pin_ptr is not working for unsigned short

return pus  // will be used by native c++
}


anyhelp...  thanks

推荐答案

固定指针不能用作函数的返回类型.请再次查看下面的链接,以检查可以做什么和不能做什么.

http://msdn.microsoft.com/en-us/library/1dz8byfh%28v = VS.80%29.aspx [ ^ ]

祝你好运!
Pinning pointers cannot be used as the return type of a function. Have another look at the link below to check what can and cannot be done.

http://msdn.microsoft.com/en-us/library/1dz8byfh%28v=VS.80%29.aspx[^]

Good luck!


这篇关于设法不受管理的无符号短的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆