C++ 转换数组<;无符号字符>;^给一个伊布弗

C++ 转换数组<;无符号字符>;^给一个伊布弗,c++,windows-runtime,c++-cx,C++,Windows Runtime,C++ Cx,有没有办法将数组^转换为IBuffer^? 我所要做的就是将c#(WinRT)中的这个等价于c++/CX Byte[] somebytes = GetBytes(); using (var stream = new InMemoryRandomAccessStream()) { await stream.WriteAsync(somebytes.AsBuffer()); .... DoSomeOtherStuff(); } 我无法在c++/cx中找到/使用“magic”

有没有办法将
数组^
转换为
IBuffer^
? 我所要做的就是将c#(WinRT)中的这个等价于c++/CX

Byte[] somebytes = GetBytes();
using (var stream = new InMemoryRandomAccessStream())
{
    await stream.WriteAsync(somebytes.AsBuffer());
    ....
    DoSomeOtherStuff();
}
我无法在c++/cx中找到/使用“magic”扩展方法
.AsBuffer()

在c++/cx中实现.AsBuffer功能还有其他方法吗?

这已经很好了,看起来不错。