Microsoft KB Archive/147768

{|
 * width="100%"|

MCI, MMTASK, and Multiple AVI Files

 * }

Q147768

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1

-

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

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310