简体   繁体   中英

Can a java “unmanaged” code be imported to C# through [DllImport] attribute?

While I am studying about the Attribute classes in c#(System.Attribute), I just came across with [DllImport] attribute. According to the web and as I understood, it is to import unmanaged implementation from a DLL to a managed C# coding. If I am right, can this attribute be used to import java implementations too?

DllImport wraps up the LoadLibrary and GetProcAddress functions of Win32. These functions are used to import from unmanaged modules. Java code is not unmanaged, and so you cannot use DllImport to call Java code.

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