摘要:
C#在调用非托管动态库时,经常需要实时卸载动态库,本例演示如何加载、获取方法委托、卸载动态库:
[DllImport("Kernel32.dll")]
public static extern int LoadLibrary(string lpFileName);
[DllImport("Kernel32.dll")]
public static extern bool FreeLibrary(int hModule);
[DllImport("Kernel32.dll")]
public static extern IntPtr GetProcAddress(int hModule, string lpProcName); 阅读全文