简体   繁体   中英

Where should I place the dll file when I use DLLImport?

I know that in windows forms you just need to place the file in the Debug folder, but it seems that it is totally different in monodev for android. I have tried placing the file from assets folder, adding reference paths, setting reference folders from project settings etc. but I still do not get any luck. I always get a DLLNotFoundException .

Also, below is the code for importing the dll file

[DllImport("testing.dll", EntryPoint = "Testing_Open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
 public static extern uint Testing_Open(HINSTANCE hInstance);

You can't DllImport .dll's on Mono for Android because it is a Linux-based system, not a Windows-based system. You'll need to DllImport a Linux shared library (*.so).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM