我有一个包含一组函数的 DLL。 DLL 与“themidia”一起使用以确保其安全。
当我尝试调用函数时,C# 会因函数名称而报错。
[DllImport("safety.dll", CallingConvention=CallingConvention.StdCall, ExactSpelling=true)]
private static extern IntPtr _encryptLogin@8(string string_0, string string_1);
如果我删除 @8 并删除 ExactSpelling=true,它只会返回一个异常,说明没有入口点。
我究竟做错了什么?
最佳答案
删除“@”,并在您的属性中添加 EntryPoint="_encryptLogin@8"
关于c# - 无法从 C# 调用 C++ 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9550031/