【发布时间】:2014-01-24 13:23:14
【问题描述】:
C#函数调用c++中暴露的函数又调用abc类的some_fun(int),我应该如何在C#some_funenter code here中获取abc的对象@
C++:
class abc
{
public: abc some_fun(int x);
}
这个函数调用abc类的some_fun(int),
我应该如何在 C# some_fun (marshalled object) 中获取 abc 的对象
extern "C" SAMPLEDLL_API void __cdecl some_fun(int x);
来自 c# 包装器:我如何编组它
public static extern IntPtr some_fun(int abc);
【问题讨论】:
-
如何在 c++ 端将其序列化为 JSON,然后在 c# 端将其反序列化为您想要的对象?
标签: c# c++ marshalling