QuickTime for .NET and COM Developers

If your aim is to create a rugged, professional-grade application, then you ignore error handling at your peril. Developing with the QuickTime Control and QuickTime objects is no different: nasty and unexpected things happen, especially when someone is so inconsiderate as to allow your precious software to get into the grubby hands of real users. It pays to anticipate this.
Fortunately, the .NET framework has a powerful error handling facility in the form of its Exceptions mechanism. Any code that is liable to generate an error and throw an exception can be wrapped with a Try/Catch (C#: try/ catch) block so that any exceptions are caught before they wreak havoc elsewhere. This exception handling is available in both Visual Basic and C#:
' VB.NETTry 'Try something risky in hereCatch ex As Exception 'Catch and report exception errors in here MsgBox(ex.ToString)End Try// C#try{// Try something risky in here}catch(Exception ex){// Catch and report exception errors in here MessageBox.Show(ex.ToString());}The QuickTime COM control and objects can also generate COM exceptions when things go wrong. To make sure this happens, you should always explicitly configure the ErrorHandling property of the QuickTime Control as soon as possible after the control is loaded:
AxQTControl1.ErrorHandling = QTErrorHandlingOptionsEnum.qtErrorHandlingRaiseException
But COM exceptions are not the same as .NET exceptions. Fortunately, the COM Interop layer comes to the rescue once again and ensures that anytime a COM object returns an...