通过使用以下语法从C#应用程序调用用C++编写的.dll文件添加的典型开销多长时间?从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);
有没有更有效的方法来做到这一点?