sorry if this is too obvious. Are you sure the webcam is properly seen and detected by OpenCV in other words, do you get an image when you redirect the captured frame to a "highGui" window? For instance like so:
frame = cvQueryFrame( capture );
cvNamedWindow( "myWindow", CV_WINDOW_AUTOSIZE );
cvShowImage( "myWindow", frame );