Res*_*uum 12
您正在寻找P/Invoke.
System.Runtime.InteropServices如果您的C DLL包含一个名为的函数,您将需要一个引用,然后执行以下操作increase_int:
[DllImport("mylib.dll")]
private static extern int increase_int(int in_value);
Run Code Online (Sandbox Code Playgroud)
并从你的代码中使用它
int newValue = increase_int(oldValue);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7177 次 |
| 最近记录: |