且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在ASP.NET Web应用程序中卸载C ++ DLL?

更新时间:2022-11-05 20:45:23

您可以使用以下调用来加载/卸载库:

You can use these calls to load/unload libraries:

[DllImport("kernel32.dll")]
protected internal static extern IntPtr LoadLibrary(string dllToLoad);

[DllImport("kernel32.dll")]
protected internal static extern bool FreeLibrary(IntPtr hModule);



也是有用的:



And also useful:

[DllImport("kernel32.dll")]
private static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);