Quantcast
Channel: Questions in topic: "dllimport"
Viewing all articles
Browse latest Browse all 160

How do you use a class from a .dll file?

$
0
0
I'm trying to use a class, "DevIO", from a Microchip library, "MCP2210-M-dotNet2.dll". When I downloaded the library, it had a managed and unmanaged folder, but Unity is reading both of them as native plugins. Supposedly, DllImport is used to access methods from a native plugin, but how do I access a class? UPDATE: Previously, I did have "MCP2210-M-dotNet2.dll" in a Plugins folder. I added it to the Assets folder as suggested. I then had to manually edit the project references in MonoDevelop and browse to add it as a .Net Assembly. Now "using MCP2210" is recognized, and there are no errors in MonoDevelop, but Unity still has errors. I read more into how to use the library, and it requires Microsoft Visual C++ 2010 Redistributable Package or the inclusion of "msvcp100.dll" and "msvcr100.dll". However, Unity says they aren't valid .Net Assemblies, so is there a way I can include the Microsoft Visual C++ Redistributable Package in Unity?

Viewing all articles
Browse latest Browse all 160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>