Hi,
I installed the latest SDK with DLL 4 and VB2008
When loading and running the K8055Demo for VB2008, everything works fine: the board connects and responds as intended.
Then, i try to use this code as a template for another project: i simply copy the files in another project folder as a starting point by modifying it to suit my needs.
But even without modifying anything, when I try to execute, i receive a “InvalidOperationException” with the explanation:
" Une erreur s’est produite lors de la création du formulaire. Pour plus d’informations, consultez Exception.InnerException. L’erreur est : Tentative de chargement d’un programme de format incorrect. (Exception de HRESULT : 0x8007000B)"
Sorry, I’m not a VB champion, but it seems that simply copying files to use them as a starting point for a new project doesn’t work…
I’m pretty sure it’s only a small detail to fix, but i don’t know where to search. Any clue ? Thanks.
Edit: The DLL is present in the Windows folder and in the SysWoW64 folder
Here are the details of the exception:
L’exception System.InvalidOperationException n’a pas été gérée
Message=“Une erreur s’est produite lors de la création du formulaire. Pour plus d’informations, consultez Exception.InnerException. L’erreur est : Tentative de chargement d’un programme de format incorrect. (Exception de HRESULT : 0x8007000B)”
Source=“K8055-I2C1”
StackTrace:
à K8055_I2C.My.MyProject.MyForms.Create__Instance__[T](T Instance) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 190
à K8055_I2C.My.MyProject.MyForms.get_Form1()
à K8055_I2C.My.MyApplication.OnCreateMainForm() dans C:\Users\dvb\Documents\Visual Studio 2008\Projects\K8055-I2C1\K8055-I2C1\My Project\Application.Designer.vb:ligne 35
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à K8055_I2C.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
Message=“Tentative de chargement d’un programme de format incorrect. (Exception de HRESULT : 0x8007000B)”
Source=“K8055-I2C1”
StackTrace:
à K8055_I2C.Form1.SetCounterDebounceTime(Int32 CounterNr, Int32 DebounceTime)
à K8055_I2C.Form1.RadioButton2_CheckedChanged(Object sender, EventArgs e) dans C:\Users\dvb\Documents\Visual Studio 2008\Projects\K8055-I2C\Form1.vb:ligne 157
à System.Windows.Forms.RadioButton.OnCheckedChanged(EventArgs e)
à K8055_I2C.Form1.InitializeComponent() dans C:\Users\dvb\Documents\Visual Studio 2008\Projects\K8055-I2C\Form1.Designer.vb:ligne 362
à K8055_I2C.Form1…ctor()
InnerException: