Cub*_*i73 7 c# winapi alias function extern
我想从kernel32.dll导入一些函数,但我想使用不同的名称.功能示例:
[DllImport("kernel32.dll")] private static extern bool ReadProcessMemoryProc64 (...);
private static bool BetterReadableAndWriteableName (...) {
ReadProcessMemoryProc64(...);
}
Run Code Online (Sandbox Code Playgroud)
如果有另一种方式,包装该功能是我实际上不想要的.
Mic*_*ter 14
使用DllImportAttribute 的EntryPoint属性.
[DllImport("kernel32.dll", EntryPoint="ReadProcessMemoryProc64")]
private static extern bool BetterReadableAndWriteableName (...);
Run Code Online (Sandbox Code Playgroud)
[DllImport("kernel32.dll", EntryPoint = "ReadProcessMemoryProc64")]
private static extern bool MyName(...);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2942 次 |
| 最近记录: |