How to reference a non-COM dll without using DllImport attribute
Posted on 2004-03-23
Is there a way to reference a non-COM dll without using the [DllImport("dllname.dll")] syntax? I was thinking you could add a reference to a dll and it would essentially create it's own namespace. Instead, I get an error about the dll not being COM compliant. The DllImport is fine for smaller dlls. But if you want to add a dll that contains hundreds of functions, the code becomes pretty bulky and time consuming to create.