/// <summary>Open or create an AVI file</summary> /// <param name="fileName">Name of the AVI file</param> /// <param name="open">true: Open the file; false: Create or overwrite the file</param> public AviManager(String fileName, bool open) { Avi.AVIFileInit(); int result; if (open) { //open existing file result = Avi.AVIFileOpen( ref aviFile, fileName, Avi.OF_READWRITE, 0); } else { //create empty file result = Avi.AVIFileOpen( ref aviFile, fileName, Avi.OF_WRITE | Avi.OF_CREATE, 0); } if (result != 0) { throw new Exception("Exception in AVIFileOpen: " + result.ToString()); } }