By passing -1 to the cvCaptureFromCAM() function, you're telling OpenCV that you don't care what camera is being used, so it uses the first camera it can open.
If you want to use 2 cams, you might have to open them explicitly.
> capture2 = cvCaptureFromCAM( 1 );
It means this returned NULL.
It also means there was probably a problem with the call.
It also means that there's also probably an error function you can call to find out more about why it returned NULL.
If you RTFM for this function, and look at the "return result" section, see what it has to say about what "NULL" means as a result.
Are you just making stuff up without bothering to read the manuals?
The threads of a single process can use a critical section object for mutual-exclusion synchronization. The process is responsible for allocating the memory used by a critical section object, which it can do by declaring a variable of type CRITICAL_SECTION. Before using a critical section, some thread of the process must call InitializeCriticalSection or InitializeCriticalSectionAndSpinCount to initialize the object.
Do you do this - nope
> cvDestroyWindow( VidLeft );
> cvReleaseCapture( &capture );
Did you bother to wait for the threads to exit, before deleting all the resources those threads depend on - nope.
The rug is pulled from underneath the threads before they even begin.