On moving our set up to a new machine running the above we are now getting InvalidOperationException errors. On further investigation its was found that line 154 errors first. See below. We have the installed PCANBasic.dll 1,0,7,21 in the SysWOW64 dir and PCANBasic.dll 1.0.7.21 (293k) in the system32 dir.
Have run PeakOemDrv.exe as admin. PCAN-View works ok.
Below are the details of the error from Visual Studio 2011
System.InvalidOperationException was unhandled
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Source=PCANBasicExample
StackTrace:
at PCANBasicExample.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at PCANBasicExample.My.MyProject.MyForms.get_Form1()
at PCANBasicExample.My.MyApplication.OnCreateMainForm() in C:\Users\iPlug\Downloads\PeakCANusb\Disk\PCAN-Basic API\Samples\Visual Basic .Net\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at PCANBasicExample.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Source=PCANBasicExample
StackTrace:
at PCANBasicExample.Peak.Can.Basic.PCANBasic.GetValue(Byte Channel, TPCANParameter Parameter, UInt32& NumericBuffer, UInt32 BufferLength)
at PCANBasicExample.Form1.btnHwRefresh_Click(Object sender, EventArgs e) in C:\Users\iPlug\Downloads\PeakCANusb\Disk\PCAN-Basic API\Samples\Visual Basic .Net\Form1.vb:line 154
at PCANBasicExample.Form1.FillComboBoxData() in C:\Users\iPlug\Downloads\PeakCANusb\Disk\PCAN-Basic API\Samples\Visual Basic .Net\Form1.vb:line 931
at PCANBasicExample.Form1.InitializeBasicComponents() in C:\Users\iPlug\Downloads\PeakCANusb\Disk\PCAN-Basic API\Samples\Visual Basic .Net\Form1.vb:line 849
at PCANBasicExample.Form1..ctor() in C:\Users\iPlug\Downloads\PeakCANusb\Disk\PCAN-Basic API\Samples\Visual Basic .Net\Form1.vb:line 13
InnerException:

