You are looking for P/Invoke.
You do will need a Reference to System.Runtime.InteropServices
and then do the following, if your C DLL contains a function called increase_int
:
[DllImport("mylib.dll")]
private static extern int increase_int(int in_value);
and use it from your code doing
int newValue = increase_int(oldValue);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…