After upgrading to Windows 7 64 Bit. When trying to trying do the following in Windows 7 64bit VB2008 .NET 3.5
m_objOkFPCom = New okCUsbFrontPanel
The following exception is thrown: “The type initializer for ‘com.opalkelly.frontpanel.libFrontPanelPINVOKE’ threw an exception.”
This works correctly within an XPSP3 environment.
Note: Both libFrontPanel-csharp.dll(Ver 1.0.2719.19705) & libFrontPanel-pinv.dll are copied to the executable directory.
The exception stack is provided below:
-
ex {"The type initializer for 'com.opalkelly.frontpanel.libFrontPanelPINVOKE' threw an exception."} System.Exception
-
System.TypeInitializationException {"The type initializer for 'com.opalkelly.frontpanel.libFrontPanelPINVOKE' threw an exception."} System.TypeInitializationException
-
Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary HelpLink Nothing String
-
InnerException {"The type initializer for 'SWIGExceptionHelper' threw an exception."} System.Exception
-
System.TypeInitializationException {"The type initializer for 'SWIGExceptionHelper' threw an exception."} System.TypeInitializationException
-
Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary HelpLink Nothing String
-
InnerException {"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"} System.Exception
-
System.BadImageFormatException {"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"} System.BadImageFormatException
-
Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
-
System.Collections.ListDictionaryInternal {System.Collections.ListDictionaryInternal} System.Collections.ListDictionaryInternal IsFixedSize False Boolean IsReadOnly False Boolean Item In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. Object Keys {System.Collections.ListDictionaryInternal.NodeKeyValueCollection} System.Collections.ICollection Values {System.Collections.ListDictionaryInternal.NodeKeyValueCollection} System.Collections.ICollection HelpLink Nothing String InnerException Nothing System.Exception Message "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)" String Source "libFrontPanel-csharp" String StackTrace " at com.opalkelly.frontpanel.libFrontPanelPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_libFrontPanel(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at com.opalkelly.frontpanel.libFrontPanelPINVOKE.SWIGExceptionHelper..cctor()" String
-
TargetSite {System.Reflection.RuntimeMethodInfo} System.Reflection.MethodBase Message "The type initializer for 'SWIGExceptionHelper' threw an exception." String Source "libFrontPanel-csharp" String StackTrace " at com.opalkelly.frontpanel.libFrontPanelPINVOKE.SWIGExceptionHelper..ctor() at com.opalkelly.frontpanel.libFrontPanelPINVOKE..cctor()" String
-
TargetSite {System.Reflection.RuntimeConstructorInfo} System.Reflection.MethodBase Message "The type initializer for 'com.opalkelly.frontpanel.libFrontPanelPINVOKE' threw an exception." String Source "libFrontPanel-csharp" String StackTrace " at com.opalkelly.frontpanel.libFrontPanelPINVOKE.new_okCUsbFrontPanel() at com.opalkelly.frontpanel.okCUsbFrontPanel..ctor() at PmicViLib.ViLib.ViFpga.OkGetFrontPanelObj() in C:\PmicViLib\PmicViLib\ModFpga.vb:line 262 at PmicViLib.ViLib.ViFpga.InitCom() in C:\PmicViLib\PmicViLib\ModFpga.vb:line 329 at PmicViLib.ViLib.ViFpga.InitiateFpgaCom() in C:\PmicViLib\PmicViLib\ModFpga.vb:line 390 at PMIC_VI_Lab_Bench_Scripter.FormMain.butInitiateCom_Click(Object sender, EventArgs e) in C:\PMIC_VI_Lab_Bench_Scripter\PMIC_VI_Lab_Bench_Scripter\FormMain.vb:line 56" String
-
TargetSite {System.Reflection.RuntimeMethodInfo} System.Reflection.MethodBase
-
sender {Text = "Communicate with FPGA Board"} Object