0

I have wrote dll in c++ and some function has vector type. I want returrn those value in c#. this my code: C++:

    extern "C" __declspec(dllexport)    vector< int>  convertA4(char  *filePath,  char *outPath) {}

c#:

    [DllImport("ConsoleApplication1.dll", CallingConvention = CallingConvention.StdCall)]
    public static extern List<int>  convertA4( string filePath, string outPath );

but when I run the app, this error has been showen:

Cannot marshal 'return value': Generic types cannot be marshaled.
Ahmad headr
  • 41
  • 1
  • 3

0 Answers0