Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi...I need to return a managed unsigned short array to native c++


ASM
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
Posted

1 solution

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!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900