If this is a simple C API, then the most direct way to access it is to use PInvoke. PInvoke was designed specifically for this scenario.
Could you post the signature of the C methods? If so, we could provide appropriate managed signatures.
EDIT
[DllImport("insert_the_dll_name_here")] public static extern int new_game(ref double param1, ref double param2);
As Hans pointed out, given the plural name of the parameters, it seems possible these are arrays versus single values. If so, then the signature will need to be changed to account for this. For example, if they are expected to be given fixed sizes, the signature will look like this:
[DllImportAttribute("insert_the_dll_name_here"] public static extern int M1( [MarshalAsAttribute(UnmanagedType.LPArray, ArraySubType=UnmanagedType.R8, SizeConst=5)] double[] params1), [MarshalAsAttribute(UnmanagedType.LPArray, ArraySubType=UnmanagedType.R8, SizeConst=5)] double[] params2) ;
source share