How to get the array of struct with “byte array” from WinRT C++ to C# in Windows Store app?

只愿长相守 提交于 2019-12-01 04:30:25

The following array types can be passed across the ABI:

  1. const Platform::Array^,
  2. Platform::Array^*,
  3. Platform::WriteOnlyArray,
  4. return value of Platform::Array^.

A value struct or value class can contain as fields only fundamental numeric types, enum classes, or Platform::String^.

So you cannot use a value struct with arrays. And you cannot use arrays of uint8[] type.

You should pass arrays and structs separately or by using a ref class.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!