Fixed BadImageFormatExceptions.
authormoel.mich
Tue, 27 Jul 2010 18:47:58 +0000
changeset 160f7d962d25af4
parent 159 eda3e3458cf4
child 161 65f2d62d7838
Fixed BadImageFormatExceptions.
Hardware/ATI/ADL.cs
Hardware/TBalancer/TBalancerGroup.cs
     1.1 --- a/Hardware/ATI/ADL.cs	Tue Jul 27 18:38:11 2010 +0000
     1.2 +++ b/Hardware/ATI/ADL.cs	Tue Jul 27 18:47:58 2010 +0000
     1.3 @@ -226,12 +226,16 @@
     1.4  
     1.5      public static int ADL_Main_Control_Create(int enumConnectedAdapters) {
     1.6        try {
     1.7 -        return _ADL_Main_Control_Create(Main_Memory_Alloc,
     1.8 -          enumConnectedAdapters);
     1.9 -      } catch (DllNotFoundException) {
    1.10 -        CreateDelegates("atiadlxy");
    1.11 -        return _ADL_Main_Control_Create(Main_Memory_Alloc,
    1.12 -          enumConnectedAdapters);
    1.13 +        try {
    1.14 +          return _ADL_Main_Control_Create(Main_Memory_Alloc,
    1.15 +            enumConnectedAdapters);
    1.16 +        } catch {
    1.17 +          CreateDelegates("atiadlxy");
    1.18 +          return _ADL_Main_Control_Create(Main_Memory_Alloc,
    1.19 +            enumConnectedAdapters);
    1.20 +        }
    1.21 +      } catch {
    1.22 +        return ADL.ADL_ERR;
    1.23        }
    1.24      }
    1.25  
     2.1 --- a/Hardware/TBalancer/TBalancerGroup.cs	Tue Jul 27 18:38:11 2010 +0000
     2.2 +++ b/Hardware/TBalancer/TBalancerGroup.cs	Tue Jul 27 18:47:58 2010 +0000
     2.3 @@ -56,6 +56,7 @@
     2.4        } catch (DllNotFoundException) { return; } 
     2.5          catch (ArgumentNullException) { return; }
     2.6          catch (EntryPointNotFoundException) { return; }
     2.7 +        catch (BadImageFormatException) { return; }
     2.8       
     2.9        FT_DEVICE_INFO_NODE[] info = new FT_DEVICE_INFO_NODE[numDevices];
    2.10        FTD2XX.FT_GetDeviceInfoList(info, ref numDevices);