Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code -30000 from AxCWIMAQViewer after changing Camera Trigger Mode

Hi,

I use the AxCWIMAQViewer control to display Images from a CWIMAQ1394 camera object in VS.Net 2005. I've been able attach and detach the display control to the camera's image as often as I want - no error. But now I want to change the camera's trigger mode. Setting the camera to CWIMAQ1394.TriggerMode.IMG1394_TRIG_MODE0 and then starting the acquisition works. Stopping and starting again after changing to CWIMAQ1394.TriggerMode.IMG1394_TRIG_DISABLE (or vice versa) produces the following result:

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Message: "Exception from HRESULT: 0xFFFF8AD0"
ErrorCode: -30000

StackTrace:

   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
   at NationalInstruments.CWIMAQControls.CWIMAQViewerClass.Attach(CWIMAQImage SourceImage)
   at NationalInstruments.CWIMAQControls.AxCWIMAQViewer.Attach(CWIMAQImage sourceImage)
   at SPIM.DisplayForm.Attach(CWIMAQImage Image) in K:\SPIM\SPIMControllerNI\SPIMControllerNI\SPIMControllerNI\DisplayForm.cs:line 34
   at SPIM.Form1.initDisplayForm() in K:\SPIM\SPIMControllerNI\SPIMControllerNI\SPIMControllerNI\Form1.cs:line 147
   at SPIM.Form1.buttonStart_Click(Object sender, EventArgs e) in K:\SPIM\SPIMControllerNI\SPIMControllerNI\SPIMControllerNI\Form1.cs:line 108
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at SPIM.Program.Main() in K:\SPIM\SPIMControllerNI\SPIMControllerNI\SPIMControllerNI\Program.cs:line 17
   at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Does anyone have an Idea.

Thanx a lot in advance

Fabian
0 Kudos
Message 1 of 2
(1,514 Views)
Highlighted
Hi Fabian,
i'm not really familiar with .NET programming, but one reason could be mulitple instances of an ActiveX object...
Which driver version is installed?

regards,
ThSa
http://www.newgistics.com
0 Kudos
Message 2 of 2
(1,498 Views)