Writing Multithreaded ApplicationsCognex VisionPro

When writing multithreaded applications in VisionPro, it is important that any threads you create in .NET properly initialize the COM subsystem by setting the apartment state as shown:

System.Threading.Thread myThread = 
               new System.Threading.Thread (new System.Threading.ThreadStart (myThreadStart));
myThread.ApartmentState = System.Threading.ApartmentState.MTA;
myThread.Start ();