Reputation: 31805
I have some c headers, and a c lib that I'd like to import and use in a c# project. How can I do this?
Upvotes: 1
Views: 291
Reputation: 415971
What Mehrdad said.
Additionally, welcome to the wonderful world of marshalling. P/Invoke.Net is your new best friend.
Upvotes: 2
Reputation: 422076
Use [System.Runtime.InteropServices.DllImport]
attribute (P/Invoke):
[DllImport("dllname.dll")]
static extern void MyFunctionName();
Upvotes: 4