Click to See Complete Forum and Search --> : [RESOLVED] How can I use C libraries with C#?


closedcurtain
September 10th, 2008, 07:51 AM
We are currently working on a project, where my friends are writing some data processing code with C (dll). I was told to build a gui and handle the database stuff with C#.NET.
can i link those libraries to my program and how do i do that?

tomb_unaff
September 10th, 2008, 08:20 AM
You need to have a look at www.pinvoke.net to see examples of DllImport.
There you can find windows api's function that much signatures method in C#.

Regards,
Tom

dahwan
September 10th, 2008, 09:04 AM
[DLLImport("dllname.dll")]
public static extern void functionName(params);
...
functionName(...); //Calling function

closedcurtain
September 13th, 2008, 10:36 AM
thanks guys