How to get the array of struct with “byte array” from WinRT C++ to C# in Windows Store app?
问题 Here I have a C# metro app with a C++ WinRT component. I need to do something in WinRT, like assign a photo's name/path, and retrieve photo's thumbnail. First, I write a value struct and retrieve struct array function in WinRT C++ as below. public value struct Item { String^ strName; String^ strPath; }; public ref class CTestWinRT sealed { public: CTestWinRT(); void TestOutStructArray(Platform::WriteOnlyArray<Item>^ intOutArray) { intOutArray->Data[0].strName = ref new String(L"test1.jpg");