Opening Multiple AVI Files

If your application opens multiple files, it should include routines such as the following simple functions. The application would use the "initAVI" function during its initialization and the "termAVI" function during its termination. These functions simply wrap the mciSendString function.

// Initialize the MCIAVI driver. This returns TRUE if OK, 
// FALSE on error. 
    // Perform additional initialization before loading first file. 
    return mciSendString("open digitalvideo", NULL, 0, NULL) == 0; 
// Close the MCIAVI driver. 
void termAVI(VOID) 
    mciSendString("close digitalvideo", NULL, 0, NULL);