c++ cli - Pass native array as managed array from C++/CLI -
i have 3rd party lib controls camera. written in c++ , want consume c#. lib grabs image byte*. there ways pass c#.
- pass byte* directly c# unsafe statement. in case, c# code can't change image size crop operation.
- use marshal.copy create managed byte array , pass it. gives flexibility c#, there overhead , additional memory usage.
so, question is:
there way convert byte* managed byte[] without copy? because managed byte array fixed statement "blittable", think there can "reverse direction" method.
any appreciated, thank you.
Comments
Post a Comment