View Full Version : IC Imaging Control .NET Snapshot Error (CTL_E_OUTOFMEMORY)

February 10, 2008, 02:23:44
I am currently using IC Imaging Control version 3.0 for capturing images in my Visual Studio 2005 application written in C#. I am using a GrabBeeX+ Deluxe USB video grabber in Windows XP SP2.


When attempting to take a snapshot from the ICImaging component I experience the following error:
Exception from HRESULT: 0x800A0007 (CTL_E_OUTOFMEMORY)

I found a similar thread on this forum regarding the same error message, but there was no real follow-up or resolution.

The following is a snippet of my code, which is very similar to the sample code given for taking snapshots:

string ImageFileName;
ImageFileName = Application.StartupPath.Replace(@"\\", @"\") + @"\Images\" + DateTime.Now.ToString(strDatePattern) + ".bmp";

The strange thing was that I did not experience this error when running the C# sample application “Grabbing an Image” (originally generated in VS 2003 and converted over to VS 2005 format) initially, but only after I started bringing up the code window of the sample project did I start experiencing the same error.:confused:


After much digging around for causes/solutions, including reinstalling the video grabber driver several times, I finally found the root cause of the problem… My code worked seamlessly only when I remove the following from the InitializeComponent() function:

frameHandlerSink1.BufferCount = 5;
frameHandlerSink1.SinkModeRunning = true;
frameHandlerSink1.SnapMode = true;
this.vidCamera1.Sink = frameHandlerSink1;

This fix seems rather easy, however Visual Studio and/or the ICImaging component regenerates these lines of code whenever reopening the designer window(s) thus making things very frustrating. :mad: This also explains why I didn’t experience the error initially with the sample application.

Final Words:

I would like to request the Imaging Source designers take a good look into why the sink initialization causes this error. Any temporary solutions posted, before the next release that includes a fix to this problem, would be most helpful.:D

Thank you,

Owen K.

Stefan Geissler
February 11, 2008, 08:57:06

I inform immediately the programmers. I guess we will try to fix this in version 3.0.6 of IC.

The release of the new version will be published in the blog on http://www.imagingcontrol.com.