簡體   English   中英

我在使用DLLImport時應該在哪里放置dll文件?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM