Reputation: 6335
Can I make a DLL in VB.NET which I can use in VB.NET with the tag DllImport just like we import functions from "user32.dll"?
Upvotes: 1
Views: 1035
Reputation: 2498
The outcome of your project, so when you compile and for example debug it are libraries.
Upvotes: 0
Reputation: 86729
No you can't.
The DllImport
attribute is used to invoke native / un-managed functions from managed code - VB.Net is managed not native, and so you can't run VB.Net functions through DllImport
/ P/Invoke.
To use VB.Net functions in other VB.Net projects you should either add a reference to that assembly, use a common referenced interface or base class, or use Reflection.
Upvotes: 3