View Full Version : Building sample programs under VS2005

March 31, 2005, 20:22:50
I just downloaded the IC Imaging Control Trial Version and am trying to build under Visual Studio 2005 (Whidbey). (Note: We have moved all development to VS 2005 and no longer user VS 2003.) I receive the following build error (which is the same build error I get with each sample project I have tried):

<b>Exception occured creating type 'TIS.Imaging.ICImagingControl, ImagingControl, Version=, Culture=neutral, PublicKeyToken=null' System.Threading.ThreadStateException: Could not instantiate ActiveX control 'f3571a23-3781-4a83-903b-30b9abd49ac6' because the current thread is not in a single-threaded apartment. C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 2.1\samples\c#\Image Processing\licenses.licx</b>

I would appreciate any advice / guidance, even if the response is that the IC Imaging Control is not yet usable with VS 2005.

Tom K.

Stefan Geissler
April 1, 2005, 14:13:49
Hello Tom,

I think, your application is single threaded. You must change your application to multi threaded, then it should run. Please understand, we do not support beta versions of developement environments.

Stefan Geissler
April 1, 2005, 14:21:05
Hello Tom,

On top of the main() method, you find [STAthread]. You may change it to [MTAThread] and see what happend. Since i have no .NET 2005 installed, i am not able to check this on my own.

You might search at google for "because the current thread is not in a single-threaded apartment". You will get some answers and may be there is a solution for this problem.