Changeset 16582 for branches/2931_OR-Tools_LP_MIP/HeuristicLab.ExtLibs/HeuristicLab.OrTools/6.10.0/HeuristicLab.OrTools-6.10.0/Plugin.cs.frame
- Timestamp:
- 01/29/19 17:45:06 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.ExtLibs/HeuristicLab.OrTools/6.10.0/HeuristicLab.OrTools-6.10.0/Plugin.cs.frame
r16373 r16582 21 21 22 22 using System; 23 using System.Diagnostics; 23 24 using System.IO; 24 25 using System.Linq; … … 35 36 [PluginFile("Google.OrTools_version.txt", PluginFileType.Data)] 36 37 [PluginFile("Google.Protobuf.dll", PluginFileType.Assembly)] 37 [PluginFile("glpk_4_65.dll", PluginFileType.NativeDll)]38 [PluginFile("glpk-license.txt", PluginFileType.License)]39 38 public class HeuristicLabOrToolsPlugin : PluginBase { 40 39 41 ~HeuristicLabOrToolsPlugin() {42 OnUnload(); // HACK: remove once ticket #2961 is resolved43 }44 45 40 public override void OnUnload() { 46 base.OnUnload();47 41 // HACK: free handle to native DLL used temporarily by the Hive Slave 42 // should be solved for all native DLLs used by the Hive Slave 48 43 var dllDir = new FileInfo(GetType().Assembly.Location).Directory; 49 if (dllDir == null )44 if (dllDir == null || !dllDir.FullName.Contains(Path.DirectorySeparatorChar + "PluginTemp" + Path.DirectorySeparatorChar)) 50 45 return; 51 46 … … 56 51 57 52 foreach (var nativeDll in dllDir.EnumerateFiles().Where(f => nativeDlls.Contains(f.Name))) { 53 if (Process.GetCurrentProcess().Modules.Cast<ProcessModule>().All(m => m.ModuleName != nativeDll.Name)) 54 continue; 55 58 56 var handle = LoadLibrary(nativeDll.FullName); 59 57 if (handle == IntPtr.Zero)
Note: See TracChangeset
for help on using the changeset viewer.