MCI, MMTASK, and Multiple AVI Files

ID: Q147768


The information in this article applies to:


SUMMARY

The Media Control Interface (MCI) command set permits applications to open, playback and close multiple AVI files simultaneously but careful attention must be made to the order of the corresponding CLOSE commands.


MORE INFORMATION

Behind the scenes of Windows, each OPEN call creates an instance of MMTASK. MMTASK provides simulated multitasking for multimedia applications, with each copy of MMTASK "chained" to the previous. Should the chain be broken incorrectly by destroying each instance of MMTASK with the CLOSE command, the system will be left unstable. Closing the files in the reverse order destroys the chain correctly.

The following sequence demonstrates the correct approach:


   open movie1.avi alias m1
   open movie2.avi alias m2
   open movie3.avi alias m3
   open movie4.avi alias m4
   .
   .
   .
   close m4 notify
   close m3 notify
   close m2 notify
   close m1 notify 


The notify flag is included to allow an application to determine when each instance of MMTASK has been destroyed.

Additional query words: 3.10 MULTIMEDIA AVI VIDEO MCI MMTASK MCI_OPEN MCI_CLOS E NOTIFY


Keywords          : kbmm MMVideo 
Version           : 3.10
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: March 9, 1999