I have a C header file that contains something like this:
void init(FILE* in, FILE* out, FILE* err);
I'm guessing this equates to the following PInvoke signature:
[DllImportAttribute("mylib", EntryPoint = "init")]
public static extern void init(IntPtr @in, IntPtr @out, IntPtr err);
Incidentally, I want to invoke this method. Can I get the IntPtr from Console.In, Console.Out, Console.Error somehow?
It should work on Linux and Windows, and not Windows exclusively.