How do I cast from WRL::ComPtr to WinRT native ref pointer ^ (hat)? RRS feed

  • Question

  • ComPtr<IStream> outStream;
            ThrowIfFailed(CreateStreamOnHGlobal(nullptr, true, outStream.GetAddressOf()));
            ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> outRandomAccessStream;
            ThrowIfFailed(CreateRandomAccessStreamOverStream(outStream.Get(), BSOS_DEFAULT, IID_PPV_ARGS(&outRandomAccessStream)));

    I have an ABI IRandomAccessStream* now, but the method I want to call expects an IRandomAccessStream^. Is this solvable?

    Saturday, July 12, 2014 1:26 AM