Elmi
Elmi

Reputation: 6193

Use C-DLL from within a C# application?

when a DLL comes with plain, undecorated C-functions, this DLL itself does not contain any information regarding parameters and return types of these functions.

So when I want to use such a DLL out of a C# application: how/where do I define the types of these functions in my C#-code?

Thanks

Upvotes: 0

Views: 41

Answers (1)

Sebastian
Sebastian

Reputation: 379

If you want to use win32-Libraries just have a look at http://www.pinvoke.net/, there are many samples of how to invoke win32 calls and how to handle datatypes/conversions. Hope that helps.

Upvotes: 1

Related Questions