mmsys.lib - MM Aware Sample Code. Multimedia Systems Group

Version 1.1	Released 02/06/92

     (C) Copyright Microsoft Corp. 1991, 1992.  All rights reserved.

     You have a royalty-free right to use, modify, reproduce and 
     distribute the Sample Files (and/or any modified version) in 
     any way you find useful, provided that you agree that 
     Microsoft has no warranty obligations or liability for any 
     Sample Application Files which are modified. 
	 
     If you did not get this from the MM Sys BBS, it may not be the
     most current version.  This sample code in particular will be updated
     and include more documentation.  The phone number is 206 936-4082.

File	       |Description
---------------|--------------------------------------------------------------
mmioriff.c	MM IO routines
mmsys.asm	The run-time-linker program.  This is the heart of this
		sample code.
makefile	The infamous makefile
readme.txt	This file


---------------------------------------------------------------------------
Notes about this sample

This sample code creates mmsys.lib.  mmsys.lib is also included with
other samples on this BBS.  This file will always be the most up-to-date
version.

More documentation can be found in mmsys.asm.


OVERVIEW:

It is possible to build an application that is aware of the Multimedia
APIs in Windows so that the application will run with full functionality 
in Windows with Multimedia  and yet be able to use their own functions in
place of essential Multimedia functions in a standard Windows
environment.   The included code files has had the MMIO functions
'emulated' or 'stubbed' to replace the MMIO functions from MMSYSTEM.DLL
so that an application can do RIFF file I/O in a standard Windows or
Windows with Multimedia environment seamlessly.  



FILE TO BE ADDED TO YOUR APPLICATION:

Only one file must be added to your application to use the MMIO functions.
This file is MMSYS.LIB.  It is built from MMSYS.ASM and MMIORIFF.C.  
They include the following:

   MMSYS.ASM- code for handling Windows with Multimedia awareness 
	plus assembly language stubs for the following MMIO calls: 
		mmioOpen() 
		mmioClose() 
		mmioRead() 
		mmioWrite() 
		mmioSeek()

	Note that hooks are already included in the tables for the
	MMIO RIFF functions below.

   MMIORIFF.C - C code stubs for MMIO RIFF I/O functions:
		mmioDescend()
		mmioAscend()
		mmioCreateChunk()


To use the above MMIO functions no code changes are required to either
of the above files and no change should be required for your application
code either.  Your application can make MMIO calls as if they were calling
MMSYSTEM.DLL directly.    Documentation exists within MMSYS.ASM as
to how to add new functionality to replace other MMSYSTEM.DLL functions.  



USING THE CODE IN A MULTIMEDIA API AWARE APP:

1. Include the file MMSYS.LIB in the link lines of your makefile.  

2. Call the MMIO any other MM functions as you normally would in your program. 

3. Include MMSYSTEM.H (or .INC) normally.  

4. Do not link to MMSYSTEM.LIB,  MMSYS.LIB will handle linking to
    MMSYSTEM.DLL.

5. Note that mmsystemGetVersion() will return 0 if the Multimedia APIs
    are not installed.  This is a way the application can tell if it is really
    using  Windows with Multimedia.


This library provides run-time detection of the multimedia extensions.
If you link to mmsystem.lib, the multimedia APIs must be installed
for you application to even load.


---------------------------------------------------------------------------


If you have any comments/questions/requests about this sample, you
can reach me at the BBS, or by FAX at 206 93MSFAX.


Please let me know if this sample code is usefull to you.

Matt Saettler
