84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
C++中原型是怎样的:
extern "C" _declspec(dllexport) void * creat(const char* password);
整个怎么在C# 中调用啊,void * 正常对应的是 IntPtr,可总是说签名不正确,byte[]也不行
认证0级讲师
你应该先贴问题代码。 我觉得可能是没有指定CallingConvention:
CallingConvention
[DllImport("???.dll", EntryPoint = "creat", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.SysInt)] public static extern IntPtr Create(...);
签名不正确?你确定不是因为你的dll是32位而你的系统是64位导致的?
你应该先贴问题代码。 我觉得可能是没有指定
CallingConvention
:签名不正确?你确定不是因为你的dll是32位而你的系统是64位导致的?