Microsoft KB Archive/142894

{|
 * width="100%"|

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

 * }

Q142894

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK), used with:
 * Microsoft Windows 3.1
 * Microsoft Platform Software Development Kit (SDK), on platform(s):
 * Microsoft Windows versions 3.1, 3.11
 * Microsoft Windows 95
 * Microsoft Windows 98
 * Microsoft Windows NT Server versions 3.5, 3.51, 4.0
 * Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
 * the operating system: Microsoft Windows 2000

-

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 98       32-bit          fails, error #2 Windows NT 3.51  16-bit          fails, error #1 Windows NT 3.51  32-bit          fails, error #1 Windows 2000     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           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 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

Issue type :

Technology : kbAudDeveloper kbSDKSearch kbWinSDKSearch