04-20-2009 05:05 AM
Hi,
I want to load a .bmp file saved on my harddisk and show it in a CWIMAQViewer. I use C#.
My code:
NationalInstruments.CWIMAQControls.CWIMAQVisionClass objVision = new NationalInstruments.CWIMAQControls.CWIMAQVisionClass();
NationalInstruments.CWIMAQControls.CWIMAQImage myImageLoad = new NationalInstruments.CWIMAQControls.CWIMAQImage();
axCWIMAQViewer1.Attach(myImageLoad);
objVision.ReadImage(myImageLoad, sPath, axCWIMAQViewer1.Palette); //<<<< this throws an Exception
But the ReadImage() method throws the Exception:
"Fatal Error (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"
What do i do wrong?
04-20-2009 05:45 AM
Sorry, wrong board.
Moved to > Machine Vision <
http://forums.ni.com/ni/board/message?board.id=200&thread.id=22668