How can I call a function of a C++ DLL that accepts a parameter of type stringstream from C#?

后端 未结 5 1173
死守一世寂寞
死守一世寂寞 2020-12-02 00:43

I want to import an unmanaged C++ DLL and call a function that takes stringstream as a parameter. In C#, there is no stringstream class, so can any

5条回答
  •  一生所求
    2020-12-02 01:10

    If you can modify the C++ dll, export a plain string version. Otherwise you have to build a managed C++ wrapper project, import the other C++ dll, export it as a managed function, and call that from your C# code. C++ interop really sucks.

提交回复
热议问题