【发布时间】:2010-03-03 22:51:46
【问题描述】:
使用以下语法从 C# 应用程序调用用 C++ 编写的 .dll 会增加多长时间?
[DllImport("abc.dll", EntryPoint = "xcFoo", CallingConvention = CallingConvention.Cdecl)]
public extern static Result Foo(out IntPtr session,
[MarshalAs(UnmanagedType.FunctionPtr)]ObjectCallback callback,
UInt64 turnKey,
string serverAddress,
string userId,
string password);
有没有更有效的方法?
【问题讨论】:
标签: c# c++ interop unmanaged managed