[英]Where should I place the dll file when I use DLLImport?
我知道在Windows窗体中你只需要将文件放在Debug文件夹中,但似乎它在android的monodev中完全不同。 我试过从assets文件夹中放置文件,添加引用路径,从项目设置等设置引用文件夹但我仍然没有运气。 我总是得到一个DLLNotFoundException
。
另外,下面是导入dll文件的代码
[DllImport("testing.dll", EntryPoint = "Testing_Open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
public static extern uint Testing_Open(HINSTANCE hInstance);
你不能在Mono for Android上使用DllImport .dll,因为它是基于Linux的系统,而不是基于Windows的系统。 您需要DllImport一个Linux共享库(* .so)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.