Marshal C++ int array to C#

前端 未结 2 1313
北恋
北恋 2020-11-30 12:49

I would like to marshal an array of ints from C++ to C#. I have an unmanaged C++ dll which contains:

DLL_EXPORT int* fnwrapper_intarr()
{
    int* test = new         


        
2条回答
  •  渐次进展
    2020-11-30 13:29

    Just to add a tip to Alex F Answer : If you don't know the size of Array it's easy to get,define another dll_export to get the array size.

提交回复
热议问题