BUG: MCI Open of MIDI File with Installable I/O Proc Fails

ID: Q142894


The information in this article applies to:


SYMPTOMS

On various Windows platforms, using MCI to open a MIDI file element with the FOURCC of an installed I/O procedure as part of the element name fails according to the following table:


Platform          EXE             MCI Open Results
------------------------------------------------
Windows 3.1       16-bit          fails, error #1
Win32s            32-bit          fails, error #1
Windows 95        16-bit          ok
Windows 95        32-bit          fails, error #2
Windows NT 3.51   16-bit          fails, error #1
Windows NT 3.51   32-bit          fails, error #1

error #1  "MCI Error: Cannot find the specified file. Make
          sure the path and filename are correct."

error #2  "MMTask caused an invalid page fault in module
           <unknown> at 0000:1000100A" 


CAUSE

MCI uses the Sequencer device to open and play MIDI file elements. Mciseq.drv is the system component that contains the MCI MIDI sequencer functionality. In Windows 3.1 and Windows NT 3.51, Mciseq.drv has a bug that causes the user-supplied FOURCC to be overriden. Mciseq.drv always sets the fccIOProc field of the MMIOINFO structure that it passes to mmioOpen() to FOURCC_DOS instead of the user-supplied FOURCC. This causes mmioOpen() to use the built-in MS-DOS file system I/O procedure instead of the user-installed I/O procedure. The result is the error "MCI Error: Cannot find the specified file. Make sure the path and filename are correct."

Although this bug is fixed for 16-bit applications in Windows 95, a limitation in the Windows 95 system architecture affects 32-bit application code that attempts this operation. In the 32-bit case, attempting to play a MIDI file using MCISEQ.DRV and an installed I/O procedure results in the error "MMTask caused an invalid page fault in module <unknown> at 0000:1000100A".


RESOLUTION

There is no workaround in Windows 3.1 or Windows NT 3.51 that will allow MCI to open and play a MIDI file element using an installed I/O procedure. Therefore alternative solutions should be pursued on these platforms. For example, in the case of playing a MIDI application resource using MCI, you can work around the installed I/O procedure problem by first copying the MIDI resource to a temporary file and then using MCI to play the file element from disk with the default I/O procedure.

Because 16-bit application code in Windows 95 is not affected by the system architecture limitation that does affect 32-bit code in Windows 95, a 32-bit application based on Windows 95 can thunk to a 16-bit DLL to play back a MIDI file using MCI and an installed I/O procedure.


STATUS

Microsoft has confirmed these problems as bugs in the Microsoft products listed at the beginning of this article. We are researching these problems and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: 3.10 3.50 4.00 mmio ioproc


Keywords          : kbmm MMMidi 
Version           : 3.10 4.00 | 3.50 3.51
Platform          : NT WINDOWS 
Issue type        : 

Last Reviewed: March 7, 1999