我用.NET4.5用C创建了一个简单的类库。为x86 cpu构建。我把它用在了Pyhton项目中。但方法在调用时并没有显示正确的结果。在
using RGiesecke.DllExport;
public static class SimpleLib
{
[DllExport("GetHelloWorld", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static string GetHelloWorld()
{
return "Hello World";
}
[DllExport("ReturnMyString", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)]
public static string ReturnMyString(string value)
{
return value;
}
}
我用Python称之为:
^{pr2}$返回此消息:
<_FuncPtr object at 0x037C0EB8>
目前没有回答
相关问题 更多 >
编程相关推荐