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.