Yes, you can do that through P/Invoke (at least if the C function follows
the WINAPI calling convention, not so sure about __cdecl one). Declare a
"prototype" for a function in C# as
public static extern Foo(...)
and apply DllImportAttribute to that declaration. You might also need to
fine-tune passing certain parameters by applying the MarshalAs attribute to
them.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.