Annotation of mstools/h/mmsystem.h, revision 1.1.1.3

1.1       root        1: /**************************************************************************/
                      2: 
                      3: /*++ BUILD Version: 0002    Increment this if a change has global effects
                      4: 
1.1.1.2   root        5: Copyright (c) 1990-92, Microsoft Corporation
1.1       root        6: 
                      7: Module Name:
                      8: 
                      9:     mmsystem.h
                     10: 
                     11: Abstract:
                     12: 
                     13:     This include file defines all the support for Multimedia applications.
                     14: 
                     15:     mmsystem.h must be included IMMEDIATELY AFTER windows.h
                     16: 
                     17:     24-Apr-91 MMTIME structure added. NigelT.
                     18:     3-Dec-91  Wholesale changes.  LaurieGr.
                     19:     30-Jan-92 Avoid things only in portwin32 LPARAM,HFILE,WPARAM  LaurieGr
                     20:     19-Feb-92 Brave attempt to avoid collisions with rest of NT LaurieGr
                     21:     26-Feb-92 RobinSp moved across to mmsystem.h
                     22:     10-Apr-92 StephenE added Unicode support
                     23: 
                     24: --*/
                     25: 
                     26: /*    If defined, the following flags inhibit inclusion
                     27:  *    of the indicated items:
                     28:  *
                     29:  *      MMNODRV          - Installable driver support
                     30:  *      MMNOSOUND        - Sound support
                     31:  *      MMNOWAVE         - Waveform support
                     32:  *      MMNOMIDI         - MIDI support
                     33:  *      MMNOAUX          - Auxiliary audio support
                     34:  *      MMNOTIMER        - Timer support
                     35:  *      MMNOJOY          - Joystick support
                     36:  *      MMNOMCI          - MCI support
                     37:  *      MMNOMMIO         - Multimedia file I/O support
                     38:  *      MMNOMMSYSTEM     - General MMSYSTEM functions
                     39:  */
                     40: 
                     41: /****************************************************************************
1.1.1.2   root       42: 
                     43:                     General constants and data types
                     44: 
1.1       root       45: ****************************************************************************/
                     46: 
1.1.1.2   root       47: #ifndef _INC_MMSYSTEM
                     48: #define _INC_MMSYSTEM
1.1       root       49: 
1.1.1.3 ! root       50: #ifdef __cplusplus
        !            51: extern "C" {
        !            52: #endif
1.1       root       53: 
1.1.1.2   root       54: /* general constants */
1.1       root       55: #define MAXPNAMELEN      32     // max product name length (including NULL)
                     56: #define MAXERRORLENGTH   128    // max error text length (including final NULL)
                     57: 
1.1.1.2   root       58: /* general data types */
1.1       root       59: typedef UINT    MMVERSION;      // major (high byte), minor (low byte)
                     60: typedef UINT    MMRESULT;       // error return code, 0 means no error
                     61:                                 // call as if(err=xxxx(...)) Error(err); else
                     62: typedef DWORD   MCIERROR;       // error return code, 0 means no error
                     63: 
                     64: /***************************************************************************
                     65: *   Multimedia time
                     66: ***************************************************************************/
                     67: typedef struct tagMMTIME {
                     68:     UINT    wType;              // the contents of the union
                     69:     union {
                     70:         DWORD ms;               // milliseconds
                     71:         DWORD sample;           // samples
                     72:         DWORD cb;               // byte count
                     73:         struct {                // SMPTE
                     74:             BYTE hour;          // hours
                     75:             BYTE min;           // minutes  (min is also a macro, so what?)
                     76:             BYTE sec;           // seconds
                     77:             BYTE frame;         // frames
                     78:             BYTE fps;           // frames per second (24, 25, 29(30 drop) or 30)
                     79:             BYTE dummy;
                     80:             } smpte;
                     81:         struct {                // MIDI
                     82:             DWORD songptrpos;   // song pointer position
                     83:             } midi;
                     84:         } u;
                     85:     } MMTIME;
                     86: typedef MMTIME       *PMMTIME;
                     87: typedef MMTIME      *NPMMTIME;
                     88: typedef MMTIME      *LPMMTIME;
                     89: 
                     90: // values for wType field in MMTIME struct
                     91: #define TIME_MS         0x0001  // time in Milliseconds
                     92: #define TIME_SAMPLES    0x0002  // number of wave samples
                     93: #define TIME_BYTES      0x0004  // current byte offset
                     94: #define TIME_SMPTE      0x0008  // SMPTE time
                     95: #define TIME_MIDI       0x0010  // MIDI time
                     96: 
                     97: /****************************************************************************
                     98: *                   Multimedia Window Messages
                     99: ****************************************************************************/
                    100: 
                    101: #define MM_JOY1MOVE         0x3A0           // joystick
                    102: #define MM_JOY2MOVE         0x3A1
                    103: #define MM_JOY1ZMOVE        0x3A2
                    104: #define MM_JOY2ZMOVE        0x3A3
                    105: #define MM_JOY1BUTTONDOWN   0x3B5
                    106: #define MM_JOY2BUTTONDOWN   0x3B6
                    107: #define MM_JOY1BUTTONUP     0x3B7
                    108: #define MM_JOY2BUTTONUP     0x3B8
                    109: 
                    110: #define MM_MCINOTIFY        0x3B9           // MCI
                    111: #define MM_MCISYSTEM_STRING 0x3CA
                    112: 
                    113: #define MM_WOM_OPEN         0x3BB           // waveform output
                    114: #define MM_WOM_CLOSE        0x3BC
                    115: #define MM_WOM_DONE         0x3BD
                    116: 
                    117: #define MM_WIM_OPEN         0x3BE           // waveform input
                    118: #define MM_WIM_CLOSE        0x3BF
                    119: #define MM_WIM_DATA         0x3C0
                    120: 
                    121: #define MM_MIM_OPEN         0x3C1           // MIDI input
                    122: #define MM_MIM_CLOSE        0x3C2
                    123: #define MM_MIM_DATA         0x3C3
                    124: #define MM_MIM_LONGDATA     0x3C4
                    125: #define MM_MIM_ERROR        0x3C5
                    126: #define MM_MIM_LONGERROR    0x3C6
                    127: 
                    128: #define MM_MOM_OPEN         0x3C7           // MIDI output
                    129: #define MM_MOM_CLOSE        0x3C8
                    130: #define MM_MOM_DONE         0x3C9
                    131: 
                    132: 
                    133: /****************************************************************************
                    134: 
                    135:                 String resource number bases (internal use)
                    136: 
                    137: ****************************************************************************/
                    138: 
                    139: #define MMSYSERR_BASE          0
                    140: #define WAVERR_BASE            32
                    141: #define MIDIERR_BASE           64
                    142: #define TIMERR_BASE            96   // was 128, changed to match Win 31 Sonic
                    143: #define JOYERR_BASE            160
                    144: #define MCIERR_BASE            256
                    145: 
                    146: #define MCI_STRING_OFFSET      512  // if this number is changed you MUST
                    147:                                     // alter the MCI_DEVTYPE_... list below
                    148: #define MCI_VD_OFFSET          1024
                    149: #define MCI_CD_OFFSET          1088
                    150: #define MCI_WAVE_OFFSET        1152
                    151: #define MCI_SEQ_OFFSET         1216
                    152: 
                    153: /****************************************************************************
                    154: 
                    155:                         General error return values
                    156: 
                    157: ****************************************************************************/
                    158: 
                    159: #define MMSYSERR_NOERROR      0                    // no error
                    160: #define MMSYSERR_ERROR        (MMSYSERR_BASE + 1)  // unspecified error
                    161: #define MMSYSERR_BADDEVICEID  (MMSYSERR_BASE + 2)  // device ID out of range
                    162: #define MMSYSERR_NOTENABLED   (MMSYSERR_BASE + 3)  // driver failed enable
                    163: #define MMSYSERR_ALLOCATED    (MMSYSERR_BASE + 4)  // device already allocated
                    164: #define MMSYSERR_INVALHANDLE  (MMSYSERR_BASE + 5)  // device handle is invalid
                    165: #define MMSYSERR_NODRIVER     (MMSYSERR_BASE + 6)  // no device driver present
                    166: #define MMSYSERR_NOMEM        (MMSYSERR_BASE + 7)  // memory allocation error
                    167: #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8)  // function isn't supported
                    168: #define MMSYSERR_BADERRNUM    (MMSYSERR_BASE + 9)  // error value out of range
                    169: #define MMSYSERR_INVALFLAG    (MMSYSERR_BASE + 10) // invalid flag passed
                    170: #define MMSYSERR_INVALPARAM   (MMSYSERR_BASE + 11) // invalid parameter passed
                    171: #define MMSYSERR_HANDLEBUSY   (MMSYSERR_BASE + 12) // handle being used
                    172:                                                    // simultaneously on another
                    173:                                                    // thread (eg callback)
                    174: #define MMSYSERR_INVALIDALIAS (MMSYSERR_BASE + 13) // "Specified alias not found in WIN.INI
                    175: #define MMSYSERR_LASTERROR    (MMSYSERR_BASE + 13) // last error in range
                    176: 
                    177: 
                    178: #ifndef MMNODRV
                    179: /****************************************************************************
                    180: 
                    181:                         Installable driver support
                    182: 
                    183: ****************************************************************************/
                    184: 
                    185: typedef HANDLE HDRVR;
                    186: 
                    187: #ifndef DRV_LOAD
                    188: 
                    189: /* Driver messages */
                    190: #define DRV_LOAD            0x0001
                    191: #define DRV_ENABLE          0x0002
                    192: #define DRV_OPEN            0x0003
                    193: #define DRV_CLOSE           0x0004
                    194: #define DRV_DISABLE         0x0005
                    195: #define DRV_FREE            0x0006
                    196: #define DRV_CONFIGURE       0x0007
                    197: #define DRV_QUERYCONFIGURE  0x0008
                    198: #define DRV_INSTALL         0x0009
                    199: #define DRV_REMOVE          0x000A
                    200: #define DRV_EXITSESSION     0x000B
                    201: #define DRV_POWER           0x000F
                    202: #define DRV_RESERVED        0x0800
                    203: #define DRV_USER            0x4000
                    204: 
                    205: /* LPARAM of DRV_CONFIGURE message */
                    206: typedef struct tagDRVCONFIGINFO {
                    207:     DWORD   dwDCISize;
                    208:     LPCWSTR   lpszDCISectionName;
                    209:     LPCWSTR   lpszDCIAliasName;
                    210: } DRVCONFIGINFO;
                    211: typedef DRVCONFIGINFO        *PDRVCONFIGINFO;
                    212: typedef DRVCONFIGINFO       *NPDRVCONFIGINFO;
                    213: typedef DRVCONFIGINFO       *LPDRVCONFIGINFO;
1.1.1.2   root      214: 
1.1       root      215: /* Supported return values for DRV_CONFIGURE message */
                    216: #define DRVCNF_CANCEL       0x0000
                    217: #define DRVCNF_OK           0x0001
                    218: #define DRVCNF_RESTART      0x0002
                    219: 
                    220: // return values from DriverProc() function
                    221: #define DRV_CANCEL             DRVCNF_CANCEL
                    222: #define DRV_OK                 DRVCNF_OK
                    223: #define DRV_RESTART            DRVCNF_RESTART
                    224: 
                    225: // installable driver function prototypes
1.1.1.3 ! root      226: LRESULT APIENTRY CloseDriver(HDRVR hDriver, LONG lParam1, LONG lParam2);
        !           227: HDRVR   APIENTRY OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName,
1.1       root      228:                           LONG lParam2);
1.1.1.3 ! root      229: LRESULT APIENTRY SendDriverMessage( HDRVR hDriver, UINT message, LONG lParam1,
1.1       root      230:                                  LONG lParam2);
1.1.1.3 ! root      231: HMODULE APIENTRY DrvGetModuleHandle( HDRVR hDriver );
        !           232: HMODULE APIENTRY GetDriverModuleHandle( HDRVR hDriver );
1.1       root      233: 
                    234: #define DRV_MCI_FIRST          DRV_RESERVED
                    235: #define DRV_MCI_LAST           (DRV_RESERVED + 0xFFF)
                    236: 
                    237: #endif
                    238: #endif  //ifndef MMNODRV
                    239: 
                    240: 
                    241: /****************************************************************************
                    242: 
                    243:                           Driver callback support
                    244: 
                    245: ****************************************************************************/
                    246: 
                    247: // flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and
                    248: // midiOutOpen() to specify the type of the dwCallback parameter.
                    249: #define CALLBACK_TYPEMASK   0x00070000l    // callback type mask
                    250: #define CALLBACK_NULL       0x00000000l    // no callback
                    251: #define CALLBACK_WINDOW     0x00010000l    // dwCallback is a HWND
                    252: #define CALLBACK_TASK       0x00020000l    // dwCallback is a HTASK
                    253: #define CALLBACK_FUNCTION   0x00030000l    // dwCallback is a FARPROC
                    254: 
                    255: #ifndef MMNODRV  //ifndef MMNODRV
                    256: 
                    257: // driver callback prototypes
                    258: typedef void DRVCALLBACK
                    259:                     (HDRVR h, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
                    260: 
                    261: typedef DRVCALLBACK     *PDRVCALLBACK;
                    262: typedef DRVCALLBACK     *LPDRVCALLBACK;
                    263: 
                    264: #endif  //ifndef MMNODRV
                    265: 
                    266: /****************************************************************************
                    267: 
                    268:                          Manufacturer and product IDs
                    269: 
                    270:     Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
                    271:     MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
                    272: 
                    273: ****************************************************************************/
                    274: 
                    275: // manufacturer IDs
                    276: #define MM_MICROSOFT            1       // Microsoft Corp.
                    277: 
                    278: // product IDs
                    279: #define MM_MIDI_MAPPER          1       // MIDI Mapper
                    280: #define MM_WAVE_MAPPER          2       // Wave Mapper
                    281: 
                    282: #define MM_SNDBLST_MIDIOUT      3       // Sound Blaster MIDI output port
                    283: #define MM_SNDBLST_MIDIIN       4       // Sound Blaster MIDI input port
                    284: #define MM_SNDBLST_SYNTH        5       // Sound Blaster internal synthesizer
                    285: #define MM_SNDBLST_WAVEOUT      6       // Sound Blaster waveform output
                    286: #define MM_SNDBLST_WAVEIN       7       // Sound Blaster waveform input
                    287: 
                    288: #define MM_ADLIB                9       // Ad Lib-compatible synthesizer
                    289: 
                    290: #define MM_MPU401_MIDIOUT       10      // MPU401-compatible MIDI output port
                    291: #define MM_MPU401_MIDIIN        11      // MPU401-compatible MIDI input port
                    292: 
                    293: #define MM_PC_JOYSTICK          12      // Joystick adapter
                    294: 
                    295: 
                    296: /****************************************************************************
                    297: *                    General MMSYSTEM support
                    298: ****************************************************************************/
                    299: 
                    300: UINT APIENTRY mmsystemGetVersion(VOID);
                    301: 
                    302: // We should point people to using OutputDebugString
                    303: #define OutputDebugStr OutputDebugString
                    304: #ifndef OutputDebugStr
                    305:     VOID APIENTRY OutputDebugStr(LPCSTR);
                    306: #endif
                    307: 
                    308: 
                    309: /****************************************************************************
                    310: *                           Sound support
                    311: *  Note:  It may be fairly obvious that there are two very similar looking
                    312: *  API calls to provide high level sound support.  The major difference is
                    313: *  that PlaySound takes a module handle.  The position is to be reviewed.
                    314: ****************************************************************************/
                    315: 
1.1.1.2   root      316: BOOL APIENTRY sndPlaySoundA( LPCSTR lpszSoundName, UINT uFlags );
1.1       root      317: BOOL APIENTRY sndPlaySoundW( LPCWSTR lpszSoundName, UINT uFlags );
                    318: #ifdef UNICODE
1.1.1.3 ! root      319: #define sndPlaySound  sndPlaySoundW
1.1       root      320: #else
1.1.1.3 ! root      321: #define sndPlaySound  sndPlaySoundA
1.1.1.2   root      322: #endif // !UNICODE
1.1       root      323: 
                    324: // flag values for uFlags parameter
                    325: /**** These are the Win3.1 values ***
                    326:  *  #define SND_SYNC            0x0000  // play synchronously (default)
                    327:  *  #define SND_ASYNC           0x0001  // play asynchronously
                    328:  *  #define SND_NODEFAULT       0x0002  // don't use default sound
                    329:  *  #define SND_MEMORY          0x0004  // lpszSoundName points to a memory file
                    330:  *  #define SND_LOOP            0x0008  // loop the sound until next sndPlaySound
                    331:  *  #define SND_NOSTOP          0x0010  // don't stop any currently playing sound
                    332:  * NT defines some additional flags.
                    333:  **************/
                    334: 
                    335: #define SND_SYNC       0x00000000   // play synchronously (default)
                    336: #define SND_ASYNC      0x00000001   // play asynchronously
                    337: 
                    338: #define SND_NODEFAULT  0x00000002   // silence not default, if sound not found
                    339: 
                    340: #define SND_MEMORY     0x00000004   // lpszSoundName points to a memory file
                    341: #define SND_ALIAS      0x00010000   // name is a WIN.INI [sounds] entry
                    342: #define SND_FILENAME   0x00020000   // name is a file name
                    343: #define SND_RESOURCE   0x00040004   // name is a resource name or atom
                    344: #define SND_ALIAS_ID   0x00110000   // name is a WIN.INI [sounds] entry identifier
                    345: 
                    346: #define SND_ALIAS_ID   0x00110000   // name is a WIN.INI [sounds] entry identifier
                    347: #define SND_ALIAS_START  0      // must be > 4096 to keep strings in same section of resource file
                    348: 
                    349: // sndAlias creates the alias identifier
                    350: #define sndAlias( ch0, ch1 ) \
                    351:                 ( SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ))
                    352: 
                    353: #define SND_ALIAS_SYSTEMASTERISK        sndAlias('S', '*')
                    354: #define SND_ALIAS_SYSTEMQUESTION        sndAlias('S', '?')
                    355: #define SND_ALIAS_SYSTEMHAND            sndAlias('S', 'H')
                    356: #define SND_ALIAS_SYSTEMEXIT            sndAlias('S', 'E')
                    357: #define SND_ALIAS_SYSTEMSTART           sndAlias('S', 'S')
                    358: #define SND_ALIAS_SYSTEMWELCOME         sndAlias('S', 'W')
                    359: #define SND_ALIAS_SYSTEMEXCLAMATION     sndAlias('S', '!')
                    360: #define SND_ALIAS_SYSTEMDEFAULT         sndAlias('S', 'D')
                    361: 
                    362: // 00000004 bit off means behaviour as 3.1 with SND_MEMORY not set
                    363: // ??? Needs better definition
                    364: 
                    365: #define SND_LOOP       0x00000008   // loop the sound until next sndPlaySound
                    366: #define SND_NOSTOP     0x00000010   // don't stop any currently playing sound
                    367: #define SND_VALID      0x0000001F  // valid flags          /* ;Internal */
                    368: 
                    369: #define SND_NOWAIT     0x00002000   // don't wait if the driver is busy
                    370: 
                    371: #define SND_VALIDFLAGS 0x0017201F   // Set of valid flag bits.  Anything outside
                    372:                                     // this range will raise an error
                    373: #define SND_RESERVED   0xFF000000   // In particular these flags are reserved
                    374: 
                    375: #define SND_TYPE_MASK  0x00170007
                    376: 
                    377: /****************************************************************************/
                    378: 
1.1.1.2   root      379: BOOL APIENTRY PlaySoundA( LPCSTR lpszName, HANDLE hModule, DWORD dwFlags );
1.1       root      380: BOOL APIENTRY PlaySoundW( LPCWSTR lpszName, HANDLE hModule, DWORD dwFlags );
                    381: #ifdef UNICODE
1.1.1.3 ! root      382: #define PlaySound  PlaySoundW
1.1       root      383: #else
1.1.1.3 ! root      384: #define PlaySound  PlaySoundA
1.1.1.2   root      385: #endif // !UNICODE
1.1       root      386: 
                    387: #ifndef MMNOWAVE
                    388: /****************************************************************************
                    389: 
                    390:                         Waveform audio support
                    391: 
                    392: ****************************************************************************/
                    393: 
                    394: // waveform audio error return values
                    395: #define WAVERR_BADFORMAT      (WAVERR_BASE + 0)    // unsupported wave format
                    396: #define WAVERR_STILLPLAYING   (WAVERR_BASE + 1)    // still something playing
                    397: #define WAVERR_UNPREPARED     (WAVERR_BASE + 2)    // header not prepared
                    398: #define WAVERR_SYNC           (WAVERR_BASE + 3)    // device is synchronous
                    399: #define WAVERR_LASTERROR      (WAVERR_BASE + 3)    // last error in range
                    400: 
                    401: // waveform audio data types
                    402: typedef HANDLE          HWAVE;
                    403: typedef HWAVE           HWAVEIN;
                    404: typedef HWAVE           HWAVEOUT;
                    405: typedef HWAVEIN         *LPHWAVEIN;
                    406: typedef HWAVEOUT        *LPHWAVEOUT;
                    407: typedef DRVCALLBACK     WAVECALLBACK;
                    408: typedef WAVECALLBACK    *LPWAVECALLBACK;
                    409: 
                    410: // wave callback messages
                    411: #define WOM_OPEN        MM_WOM_OPEN
                    412: #define WOM_CLOSE       MM_WOM_CLOSE
                    413: #define WOM_DONE        MM_WOM_DONE
                    414: #define WIM_OPEN        MM_WIM_OPEN
                    415: #define WIM_CLOSE       MM_WIM_CLOSE
                    416: #define WIM_DATA        MM_WIM_DATA
                    417: 
                    418: // device ID for wave device mapper
1.1.1.2   root      419: #define WAVE_MAPPER     ((DWORD)(-1))
1.1       root      420: 
                    421: // flags for dwFlags parameter in waveOutOpen() and waveInOpen()
                    422: #define  WAVE_FORMAT_QUERY     0x00000001
                    423: #define  WAVE_ALLOWSYNC        0x00000002
                    424: #define  WAVE_VALID            0x00000003       /* ;Internal */
                    425: 
                    426: // wave data block header
                    427: typedef struct wavehdr_tag {
                    428:     LPSTR                 lpData;          // pointer to locked data buffer
                    429:     DWORD                 dwBufferLength;  // length of data buffer
                    430:     DWORD                 dwBytesRecorded; // used for input only
                    431:     DWORD                 dwUser;          // for client's use
                    432:     DWORD                 dwFlags;         // assorted flags (see defines)
                    433:     DWORD                 dwLoops;         // loop control counter
                    434:     struct wavehdr_tag  * lpNext;          // reserved for driver
                    435:     DWORD                 reserved;        // reserved for driver
                    436: } WAVEHDR;
                    437: typedef WAVEHDR       *PWAVEHDR;
                    438: typedef WAVEHDR      *NPWAVEHDR;
                    439: typedef WAVEHDR      *LPWAVEHDR;
                    440: 
                    441: // flags for dwFlags field of WAVEHDR
                    442: #define WHDR_DONE       0x00000001  // done bit
                    443: #define WHDR_PREPARED   0x00000002  // set if this header has been prepared
                    444: #define WHDR_BEGINLOOP  0x00000004  // loop start block
                    445: #define WHDR_ENDLOOP    0x00000008  // loop end block
                    446: #define WHDR_INQUEUE    0x00000010  // reserved for driver
                    447: #define WHDR_VALID      0x0000001F  // valid flags      /* ;Internal */
                    448: 
1.1.1.2   root      449: // waveform output device capabilities structure
1.1       root      450: typedef struct tagWAVEOUTCAPSA {
1.1.1.2   root      451:     WORD    wMid;                   // manufacturer ID
                    452:     WORD    wPid;                   // product ID
                    453:     MMVERSION vDriverVersion;       // version of the driver
                    454:     CHAR    szPname[MAXPNAMELEN];   // product name (NULL terminated string)
                    455:     DWORD   dwFormats;              // formats supported
                    456:     WORD    wChannels;              // number of sources supported
                    457:     DWORD   dwSupport;              // functionality supported by driver
1.1       root      458: } WAVEOUTCAPSA;
1.1.1.2   root      459: // waveform output device capabilities structure
1.1       root      460: typedef struct tagWAVEOUTCAPSW {
1.1.1.2   root      461:     WORD    wMid;                   // manufacturer ID
                    462:     WORD    wPid;                   // product ID
                    463:     MMVERSION vDriverVersion;       // version of the driver
                    464:     WCHAR   szPname[MAXPNAMELEN];   // product name (NULL terminated string)
                    465:     DWORD   dwFormats;              // formats supported
                    466:     WORD    wChannels;              // number of sources supported
                    467:     DWORD   dwSupport;              // functionality supported by driver
1.1       root      468: } WAVEOUTCAPSW;
1.1.1.2   root      469: #ifdef UNICODE
1.1.1.3 ! root      470: typedef WAVEOUTCAPSW WAVEOUTCAPS;
1.1.1.2   root      471: #else
1.1.1.3 ! root      472: typedef WAVEOUTCAPSA WAVEOUTCAPS;
1.1.1.2   root      473: #endif // UNICODE
1.1       root      474: 
                    475: typedef WAVEOUTCAPSA     *PWAVEOUTCAPSA;
                    476: typedef WAVEOUTCAPSW     *PWAVEOUTCAPSW;
1.1.1.2   root      477: #ifdef UNICODE
1.1.1.3 ! root      478: typedef PWAVEOUTCAPSW PWAVEOUTCAPS;
1.1.1.2   root      479: #else
1.1.1.3 ! root      480: typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
1.1.1.2   root      481: #endif // UNICODE
                    482: typedef WAVEOUTCAPSA     *NPWAVEOUTCAPSA;
1.1       root      483: typedef WAVEOUTCAPSW     *NPWAVEOUTCAPSW;
1.1.1.2   root      484: #ifdef UNICODE
1.1.1.3 ! root      485: typedef NPWAVEOUTCAPSW NPWAVEOUTCAPS;
1.1.1.2   root      486: #else
1.1.1.3 ! root      487: typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
1.1.1.2   root      488: #endif // UNICODE
                    489: typedef WAVEOUTCAPSA     *LPWAVEOUTCAPSA;
1.1       root      490: typedef WAVEOUTCAPSW     *LPWAVEOUTCAPSW;
                    491: #ifdef UNICODE
1.1.1.3 ! root      492: typedef LPWAVEOUTCAPSW LPWAVEOUTCAPS;
1.1.1.2   root      493: #else
1.1.1.3 ! root      494: typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
1.1.1.2   root      495: #endif // UNICODE
1.1       root      496: 
                    497: // flags for dwSupport field of WAVEOUTCAPS
                    498: #define WAVECAPS_PITCH        0x00000001  // supports pitch control
                    499: #define WAVECAPS_PLAYBACKRATE 0x00000002  // supports playback rate control
                    500: #define WAVECAPS_VOLUME       0x00000004  // supports volume control
                    501: #define WAVECAPS_LRVOLUME     0x00000008  // separate left-right volume control
                    502: #define WAVECAPS_SYNC         0x00000010
                    503: 
1.1.1.2   root      504: // waveform input device capabilities structure
1.1       root      505: typedef struct tagWAVEINCAPSA {
                    506:     WORD    wMid;                    // manufacturer ID
                    507:     WORD    wPid;                    // product ID
                    508:     MMVERSION vDriverVersion;        // version of the driver
                    509:     CHAR    szPname[MAXPNAMELEN];    // product name (NULL terminated string)
                    510:     DWORD   dwFormats;               // formats supported
                    511:     WORD    wChannels;               // number of channels supported
1.1.1.2   root      512: } WAVEINCAPSA;
                    513: // waveform input device capabilities structure
1.1       root      514: typedef struct tagWAVEINCAPSW {
                    515:     WORD    wMid;                    // manufacturer ID
                    516:     WORD    wPid;                    // product ID
                    517:     MMVERSION vDriverVersion;        // version of the driver
                    518:     WCHAR   szPname[MAXPNAMELEN];    // product name (NULL terminated string)
                    519:     DWORD   dwFormats;               // formats supported
                    520:     WORD    wChannels;               // number of channels supported
1.1.1.2   root      521: } WAVEINCAPSW;
1.1       root      522: #ifdef UNICODE
1.1.1.3 ! root      523: typedef WAVEINCAPSW WAVEINCAPS;
1.1       root      524: #else
1.1.1.3 ! root      525: typedef WAVEINCAPSA WAVEINCAPS;
1.1.1.2   root      526: #endif // UNICODE
                    527: typedef WAVEINCAPSA  *PWAVEINCAPSA;
                    528: typedef WAVEINCAPSW  *PWAVEINCAPSW;
                    529: #ifdef UNICODE
1.1.1.3 ! root      530: typedef PWAVEINCAPSW PWAVEINCAPS;
1.1.1.2   root      531: #else
1.1.1.3 ! root      532: typedef PWAVEINCAPSA PWAVEINCAPS;
1.1.1.2   root      533: #endif // UNICODE
                    534: typedef WAVEINCAPSA  *LPWAVEINCAPSA;
                    535: typedef WAVEINCAPSW  *LPWAVEINCAPSW;
                    536: #ifdef UNICODE
1.1.1.3 ! root      537: typedef LPWAVEINCAPSW LPWAVEINCAPS;
1.1.1.2   root      538: #else
1.1.1.3 ! root      539: typedef LPWAVEINCAPSA LPWAVEINCAPS;
1.1.1.2   root      540: #endif // UNICODE
1.1       root      541: 
                    542: // defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
                    543: #define WAVE_INVALIDFORMAT     0x00000000       // invalid format
                    544: #define WAVE_FORMAT_1M08       0x00000001       // 11.025 kHz, Mono,   8-bit
                    545: #define WAVE_FORMAT_1S08       0x00000002       // 11.025 kHz, Stereo, 8-bit
                    546: #define WAVE_FORMAT_1M16       0x00000004       // 11.025 kHz, Mono,   16-bit
                    547: #define WAVE_FORMAT_1S16       0x00000008       // 11.025 kHz, Stereo, 16-bit
                    548: #define WAVE_FORMAT_2M08       0x00000010       // 22.05  kHz, Mono,   8-bit
                    549: #define WAVE_FORMAT_2S08       0x00000020       // 22.05  kHz, Stereo, 8-bit
                    550: #define WAVE_FORMAT_2M16       0x00000040       // 22.05  kHz, Mono,   16-bit
                    551: #define WAVE_FORMAT_2S16       0x00000080       // 22.05  kHz, Stereo, 16-bit
                    552: #define WAVE_FORMAT_4M08       0x00000100       // 44.1   kHz, Mono,   8-bit
                    553: #define WAVE_FORMAT_4S08       0x00000200       // 44.1   kHz, Stereo, 8-bit
                    554: #define WAVE_FORMAT_4M16       0x00000400       // 44.1   kHz, Mono,   16-bit
                    555: #define WAVE_FORMAT_4S16       0x00000800       // 44.1   kHz, Stereo, 16-bit
                    556: 
                    557: // flags for wFormatTag field of WAVEFORMAT
1.1.1.2   root      558: #define WAVE_FORMAT_PCM     1  // Needed in resource files so outside #ifndef RC_INVOKED
1.1       root      559: 
                    560: #ifndef RC_INVOKED             // RC gets upset by #pragma pack()
                    561: 
                    562: // general waveform format (information common to all formats)
                    563: // as read from a file.  See Multimedia file formats in Programmer Reference
                    564: #pragma pack(2)                // File format is not double word aligned
                    565: typedef struct {
                    566:     WORD    wFormatTag;        // format type
                    567:     WORD    nChannels;         // number of channels (i.e. mono, stereo, etc.)
                    568:     DWORD   nSamplesPerSec;    // sample rate
                    569:     DWORD   nAvgBytesPerSec;   // for buffer estimation
                    570:     WORD    nBlockAlign;       // block size of data
                    571: } WAVEFORMAT;
                    572: typedef WAVEFORMAT       *PWAVEFORMAT;
                    573: typedef WAVEFORMAT      *NPWAVEFORMAT;
                    574: typedef WAVEFORMAT      *LPWAVEFORMAT;
                    575: // NOTE:  The fields in the structure above are copied into
                    576: // the MCI_WAVE_SET_PARMS structure during execution
                    577: 
                    578: // specific waveform format for PCM data
                    579: typedef struct tagPCMWAVEFORMAT {
                    580:     WAVEFORMAT  wf;
                    581:     WORD        wBitsPerSample;        // corresponds to MCI_WAVE_SET_.... structure
                    582: } PCMWAVEFORMAT;
                    583: typedef PCMWAVEFORMAT       *PPCMWAVEFORMAT;
                    584: typedef PCMWAVEFORMAT      *NPPCMWAVEFORMAT;
                    585: typedef PCMWAVEFORMAT      *LPPCMWAVEFORMAT;
                    586: 
                    587: #pragma pack()                    // revert to command line packing
                    588: 
                    589: // waveform audio function prototypes
                    590: UINT APIENTRY waveOutGetNumDevs(VOID);
                    591: 
                    592: MMRESULT APIENTRY waveOutGetDevCapsA(UINT uDeviceID, LPWAVEOUTCAPSA lpCaps,
                    593:     UINT uSize);
                    594: MMRESULT APIENTRY waveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW lpCaps,
                    595:     UINT uSize);
                    596: #ifdef UNICODE
1.1.1.3 ! root      597: #define waveOutGetDevCaps  waveOutGetDevCapsW
1.1       root      598: #else
1.1.1.3 ! root      599: #define waveOutGetDevCaps  waveOutGetDevCapsA
1.1.1.2   root      600: #endif // !UNICODE
1.1       root      601: 
                    602: MMRESULT APIENTRY waveOutGetVolume(UINT uDeviceID, LPDWORD lpdwVolume);
                    603: MMRESULT APIENTRY waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
                    604: 
                    605: MMRESULT APIENTRY waveOutGetErrorTextA(MMRESULT err, LPSTR lpText, UINT uSize);
                    606: MMRESULT APIENTRY waveOutGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT uSize);
                    607: #ifdef UNICODE
1.1.1.3 ! root      608: #define waveOutGetErrorText  waveOutGetErrorTextW
1.1       root      609: #else
1.1.1.3 ! root      610: #define waveOutGetErrorText  waveOutGetErrorTextA
1.1.1.2   root      611: #endif // !UNICODE
1.1       root      612: 
                    613: MMRESULT APIENTRY waveOutOpen(LPHWAVEOUT lphWaveOut, UINT uDeviceID,
                    614:     LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
                    615: MMRESULT APIENTRY waveOutClose(HWAVEOUT hWaveOut);
                    616: MMRESULT APIENTRY waveOutPrepareHeader(HWAVEOUT hWaveOut,
                    617:      LPWAVEHDR lpWaveOutHdr, UINT uSize);
                    618: MMRESULT APIENTRY waveOutUnprepareHeader(HWAVEOUT hWaveOut,
                    619:     LPWAVEHDR lpWaveOutHdr, UINT uSize);
                    620: MMRESULT APIENTRY waveOutWrite(HWAVEOUT hWaveOut, LPWAVEHDR lpWaveOutHdr,
                    621:     UINT uSize);
                    622: MMRESULT APIENTRY waveOutPause(HWAVEOUT hWaveOut);
                    623: MMRESULT APIENTRY waveOutRestart(HWAVEOUT hWaveOut);
                    624: MMRESULT APIENTRY waveOutReset(HWAVEOUT hWaveOut);
                    625: MMRESULT APIENTRY waveOutBreakLoop(HWAVEOUT hWaveOut);
                    626: MMRESULT APIENTRY waveOutGetPosition(HWAVEOUT hWaveOut, LPMMTIME lpInfo,
                    627:     UINT uSize);
                    628: MMRESULT APIENTRY waveOutGetPitch(HWAVEOUT hWaveOut, LPDWORD lpdwPitch);
                    629: MMRESULT APIENTRY waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
                    630: MMRESULT APIENTRY waveOutGetPlaybackRate(HWAVEOUT hWaveOut, LPDWORD lpdwRate);
                    631: MMRESULT APIENTRY waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
                    632: MMRESULT APIENTRY waveOutGetID(HWAVEOUT hWaveOut, PUINT lpuDeviceID);
                    633: MMRESULT APIENTRY waveOutMessage(HWAVEOUT hWaveOut, UINT msg, DWORD dw1, DWORD dw2);
                    634: UINT APIENTRY waveInGetNumDevs(VOID);
                    635: 
                    636: MMRESULT APIENTRY waveInGetDevCapsA(UINT uDeviceID, LPWAVEINCAPSA lpCaps,
                    637:     UINT uSize);
                    638: MMRESULT APIENTRY waveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW lpCaps,
                    639:     UINT uSize);
                    640: #ifdef UNICODE
1.1.1.3 ! root      641: #define waveInGetDevCaps  waveInGetDevCapsW
1.1       root      642: #else
1.1.1.3 ! root      643: #define waveInGetDevCaps  waveInGetDevCapsA
1.1.1.2   root      644: #endif // !UNICODE
1.1       root      645: 
                    646: MMRESULT APIENTRY waveInGetErrorTextA(MMRESULT err, LPSTR lpText, UINT uSize);
                    647: MMRESULT APIENTRY waveInGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT uSize);
                    648: #ifdef UNICODE
1.1.1.3 ! root      649: #define waveInGetErrorText  waveInGetErrorTextW
1.1       root      650: #else
1.1.1.3 ! root      651: #define waveInGetErrorText  waveInGetErrorTextA
1.1.1.2   root      652: #endif // !UNICODE
1.1       root      653: 
                    654: MMRESULT APIENTRY waveInOpen(LPHWAVEIN lphWaveIn, UINT uDeviceID,
                    655:     LPWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
                    656: MMRESULT APIENTRY waveInClose(HWAVEIN hWaveIn);
                    657: MMRESULT APIENTRY waveInPrepareHeader(HWAVEIN hWaveIn,
                    658:     LPWAVEHDR lpWaveInHdr, UINT uSize);
                    659: MMRESULT APIENTRY waveInUnprepareHeader(HWAVEIN hWaveIn,
                    660:     LPWAVEHDR lpWaveInHdr, UINT uSize);
                    661: MMRESULT APIENTRY waveInAddBuffer(HWAVEIN hWaveIn,
                    662:     LPWAVEHDR lpWaveInHdr, UINT uSize);
                    663: MMRESULT APIENTRY waveInStart(HWAVEIN hWaveIn);
                    664: MMRESULT APIENTRY waveInStop(HWAVEIN hWaveIn);
                    665: MMRESULT APIENTRY waveInReset(HWAVEIN hWaveIn);
                    666: MMRESULT APIENTRY waveInGetPosition(HWAVEIN hWaveIn, LPMMTIME lpInfo,
                    667:     UINT uSize);
                    668: MMRESULT APIENTRY waveInGetID(HWAVEIN hWaveIn, PUINT lpuDeviceID);
                    669: MMRESULT APIENTRY waveInMessage(HWAVEIN hWaveIn, UINT msg, DWORD dw1, DWORD dw2);
                    670: 
                    671: #endif /* RC_INVOKED */
                    672: #endif  //ifndef MMNOWAVE
                    673: 
                    674: #ifndef MMNOMIDI
                    675: /****************************************************************************
                    676: 
                    677:                             MIDI audio support
                    678: 
                    679: ****************************************************************************/
                    680: 
                    681: // MIDI error return values
                    682: #define MIDIERR_UNPREPARED    (MIDIERR_BASE + 0)   /* header not prepared */
                    683: #define MIDIERR_STILLPLAYING  (MIDIERR_BASE + 1)   /* still something playing */
                    684: #define MIDIERR_NOMAP         (MIDIERR_BASE + 2)   /* no current map */
                    685: #define MIDIERR_NOTREADY      (MIDIERR_BASE + 3)   /* hardware is still busy */
                    686: #define MIDIERR_NODEVICE      (MIDIERR_BASE + 4)   /* port no longer connected */
                    687: #define MIDIERR_INVALIDSETUP  (MIDIERR_BASE + 5)   /* invalid setup */
                    688: #define MIDIERR_LASTERROR     (MIDIERR_BASE + 5)   /* last error in range */
                    689: 
                    690: // MIDI audio data types
                    691: typedef HANDLE  HMIDI;
                    692: typedef HMIDI   HMIDIIN;
                    693: typedef HMIDI   HMIDIOUT;
                    694: typedef HMIDIIN *LPHMIDIIN;
                    695: typedef HMIDIOUT *LPHMIDIOUT;
                    696: typedef DRVCALLBACK MIDICALLBACK;
                    697: typedef MIDICALLBACK *LPMIDICALLBACK;
                    698: #define MIDIPATCHSIZE   128
                    699: typedef WORD PATCHARRAY[MIDIPATCHSIZE];
                    700: typedef WORD     *LPPATCHARRAY;
                    701: typedef WORD KEYARRAY[MIDIPATCHSIZE];
                    702: typedef WORD     *LPKEYARRAY;
                    703: 
                    704: // MIDI callback messages
                    705: #define MIM_OPEN        MM_MIM_OPEN
                    706: #define MIM_CLOSE       MM_MIM_CLOSE
                    707: #define MIM_DATA        MM_MIM_DATA
                    708: #define MIM_LONGDATA    MM_MIM_LONGDATA
                    709: #define MIM_ERROR       MM_MIM_ERROR
                    710: #define MIM_LONGERROR   MM_MIM_LONGERROR
                    711: #define MOM_OPEN        MM_MOM_OPEN
                    712: #define MOM_CLOSE       MM_MOM_CLOSE
                    713: #define MOM_DONE        MM_MOM_DONE
                    714: 
                    715: // device ID for MIDI mapper
1.1.1.2   root      716: #define MIDIMAPPER     (-1)       /* Cannot be cast to DWORD as RC complains */
                    717: #define MIDI_MAPPER    ((DWORD)(-1))
1.1       root      718: 
                    719: // flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
                    720: #define MIDI_CACHE_ALL      1
                    721: #define MIDI_CACHE_BESTFIT  2
                    722: #define MIDI_CACHE_QUERY    3
                    723: #define MIDI_UNCACHE        4
                    724: #define MIDI_CACHE_VALID    (MIDI_CACHE_ALL | MIDI_CACHE_BESTFIT | MIDI_CACHE_QUERY | MIDI_UNCACHE) /* ;Internal */
                    725: 
1.1.1.2   root      726: // MIDI output device capabilities structure
1.1       root      727: typedef struct tagMIDIOUTCAPSA {
                    728:     WORD    wMid;                  // manufacturer ID
                    729:     WORD    wPid;                  // product ID
                    730:     MMVERSION vDriverVersion;      // version of the driver
                    731:     CHAR    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
                    732:     WORD    wTechnology;           // type of device
                    733:     WORD    wVoices;               // # of voices (internal synth only)
                    734:     WORD    wNotes;                // max # of notes (internal synth only)
                    735:     WORD    wChannelMask;          // channels used (internal synth only)
                    736:     DWORD   dwSupport;             // functionality supported by driver
                    737: } MIDIOUTCAPSA;
1.1.1.2   root      738: // MIDI output device capabilities structure
1.1       root      739: typedef struct tagMIDIOUTCAPSW {
                    740:     WORD    wMid;                  // manufacturer ID
                    741:     WORD    wPid;                  // product ID
                    742:     MMVERSION vDriverVersion;      // version of the driver
                    743:     WCHAR   szPname[MAXPNAMELEN];  // product name (NULL terminated string)
                    744:     WORD    wTechnology;           // type of device
                    745:     WORD    wVoices;               // # of voices (internal synth only)
                    746:     WORD    wNotes;                // max # of notes (internal synth only)
                    747:     WORD    wChannelMask;          // channels used (internal synth only)
                    748:     DWORD   dwSupport;             // functionality supported by driver
                    749: } MIDIOUTCAPSW;
1.1.1.2   root      750: #ifdef UNICODE
1.1.1.3 ! root      751: typedef MIDIOUTCAPSW MIDIOUTCAPS;
1.1.1.2   root      752: #else
1.1.1.3 ! root      753: typedef MIDIOUTCAPSA MIDIOUTCAPS;
1.1.1.2   root      754: #endif // UNICODE
                    755: typedef MIDIOUTCAPSA    *PMIDIOUTCAPSA;
1.1       root      756: typedef MIDIOUTCAPSW    *PMIDIOUTCAPSW;
1.1.1.2   root      757: #ifdef UNICODE
1.1.1.3 ! root      758: typedef PMIDIOUTCAPSW PMIDIOUTCAPS;
1.1.1.2   root      759: #else
1.1.1.3 ! root      760: typedef PMIDIOUTCAPSA PMIDIOUTCAPS;
1.1.1.2   root      761: #endif // UNICODE
                    762: typedef MIDIOUTCAPSA    *NPMIDIOUTCAPSA;
1.1       root      763: typedef MIDIOUTCAPSW    *NPMIDIOUTCAPSW;
1.1.1.2   root      764: #ifdef UNICODE
1.1.1.3 ! root      765: typedef NPMIDIOUTCAPSW NPMIDIOUTCAPS;
1.1.1.2   root      766: #else
1.1.1.3 ! root      767: typedef NPMIDIOUTCAPSA NPMIDIOUTCAPS;
1.1.1.2   root      768: #endif // UNICODE
                    769: typedef MIDIOUTCAPSA    *LPMIDIOUTCAPSA;
1.1       root      770: typedef MIDIOUTCAPSW    *LPMIDIOUTCAPSW;
                    771: #ifdef UNICODE
1.1.1.3 ! root      772: typedef LPMIDIOUTCAPSW LPMIDIOUTCAPS;
1.1.1.2   root      773: #else
1.1.1.3 ! root      774: typedef LPMIDIOUTCAPSA LPMIDIOUTCAPS;
1.1.1.2   root      775: #endif // UNICODE
1.1       root      776: 
                    777: // flags for wTechnology field of MIDIOUTCAPS structure
                    778: #define MOD_MIDIPORT    1  // output port
                    779: #define MOD_SYNTH       2  // generic internal synth
                    780: #define MOD_SQSYNTH     3  // square wave internal synth
                    781: #define MOD_FMSYNTH     4  // FM internal synth
                    782: #define MOD_MAPPER      5  // MIDI mapper
                    783: 
                    784: // flags for dwSupport field of MIDIOUTCAPS
                    785: #define MIDICAPS_VOLUME     0x00000001  // supports volume control
                    786: #define MIDICAPS_LRVOLUME   0x00000002  // separate left-right volume control
                    787: #define MIDICAPS_CACHE      0x00000004
                    788: 
1.1.1.2   root      789: // MIDI input device capabilities structure
1.1       root      790: typedef struct tagMIDIINCAPSA {
                    791:     WORD        wMid;                   // manufacturer ID
                    792:     WORD        wPid;                   // product ID
                    793:     MMVERSION   vDriverVersion;         // version of the driver
                    794:     CHAR        szPname[MAXPNAMELEN];   // product name (NULL terminated string)
                    795: } MIDIINCAPSA;
1.1.1.2   root      796: // MIDI input device capabilities structure
1.1       root      797: typedef struct tagMIDIINCAPSW {
                    798:     WORD        wMid;                   // manufacturer ID
                    799:     WORD        wPid;                   // product ID
                    800:     MMVERSION   vDriverVersion;         // version of the driver
                    801:     WCHAR       szPname[MAXPNAMELEN];   // product name (NULL terminated string)
                    802: } MIDIINCAPSW;
1.1.1.2   root      803: #ifdef UNICODE
1.1.1.3 ! root      804: typedef MIDIINCAPSW MIDIINCAPS;
1.1.1.2   root      805: #else
1.1.1.3 ! root      806: typedef MIDIINCAPSA MIDIINCAPS;
1.1.1.2   root      807: #endif // UNICODE
                    808: typedef MIDIINCAPSA     *PMIDIINCAPSA;
1.1       root      809: typedef MIDIINCAPSW     *PMIDIINCAPSW;
1.1.1.2   root      810: #ifdef UNICODE
1.1.1.3 ! root      811: typedef PMIDIINCAPSW PMIDIINCAPS;
1.1.1.2   root      812: #else
1.1.1.3 ! root      813: typedef PMIDIINCAPSA PMIDIINCAPS;
1.1.1.2   root      814: #endif // UNICODE
                    815: typedef MIDIINCAPSA     *NPMIDIINCAPSA;
1.1       root      816: typedef MIDIINCAPSW     *NPMIDIINCAPSW;
1.1.1.2   root      817: #ifdef UNICODE
1.1.1.3 ! root      818: typedef NPMIDIINCAPSW NPMIDIINCAPS;
1.1.1.2   root      819: #else
1.1.1.3 ! root      820: typedef NPMIDIINCAPSA NPMIDIINCAPS;
1.1.1.2   root      821: #endif // UNICODE
                    822: typedef MIDIINCAPSA     *LPMIDIINCAPSA;
1.1       root      823: typedef MIDIINCAPSW     *LPMIDIINCAPSW;
                    824: #ifdef UNICODE
1.1.1.3 ! root      825: typedef LPMIDIINCAPSW LPMIDIINCAPS;
1.1.1.2   root      826: #else
1.1.1.3 ! root      827: typedef LPMIDIINCAPSA LPMIDIINCAPS;
1.1.1.2   root      828: #endif // UNICODE
1.1       root      829: 
                    830: // MIDI data block header
                    831: typedef struct midihdr_tag {
                    832:     LPSTR       lpData;               // pointer to locked data block
                    833:     DWORD       dwBufferLength;       // length of data in data block
                    834:     DWORD       dwBytesRecorded;      // used for input only
                    835:     DWORD       dwUser;               // for client's use
                    836:     DWORD       dwFlags;              // assorted flags (see defines)
                    837:     struct midihdr_tag *lpNext;   // reserved for driver
                    838:     DWORD       reserved;             // reserved for driver
                    839: } MIDIHDR;
                    840: typedef MIDIHDR       *PMIDIHDR;
                    841: typedef MIDIHDR      *NPMIDIHDR;
                    842: typedef MIDIHDR      *LPMIDIHDR;
                    843: 
                    844: // flags for dwFlags field of MIDIHDR structure
                    845: #define MHDR_DONE       0x00000001       // done bit
                    846: #define MHDR_PREPARED   0x00000002       // set if header prepared
                    847: #define MHDR_INQUEUE    0x00000004       // reserved for driver
                    848: #define MHDR_VALID      0x00000007       // valid flags /* ;Internal */
                    849: 
                    850: // MIDI function prototypes
                    851: UINT APIENTRY midiOutGetNumDevs(VOID);
                    852: 
1.1.1.2   root      853: MMRESULT APIENTRY midiOutGetDevCapsA(UINT uDeviceID,
1.1       root      854:     LPMIDIOUTCAPSA lpCaps, UINT uSize);
1.1.1.2   root      855: MMRESULT APIENTRY midiOutGetDevCapsW(UINT uDeviceID,
                    856:     LPMIDIOUTCAPSW lpCaps, UINT uSize);
1.1       root      857: #ifdef UNICODE
1.1.1.3 ! root      858: #define midiOutGetDevCaps  midiOutGetDevCapsW
1.1       root      859: #else
1.1.1.3 ! root      860: #define midiOutGetDevCaps  midiOutGetDevCapsA
1.1.1.2   root      861: #endif // !UNICODE
1.1       root      862: 
                    863: MMRESULT APIENTRY midiOutGetVolume(UINT uDeviceID, LPDWORD lpdwVolume);
                    864: MMRESULT APIENTRY midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
                    865: 
                    866: MMRESULT APIENTRY midiOutGetErrorTextA(MMRESULT err, LPSTR lpText, UINT uSize);
                    867: MMRESULT APIENTRY midiOutGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT uSize);
                    868: #ifdef UNICODE
1.1.1.3 ! root      869: #define midiOutGetErrorText  midiOutGetErrorTextW
1.1       root      870: #else
1.1.1.3 ! root      871: #define midiOutGetErrorText  midiOutGetErrorTextA
1.1.1.2   root      872: #endif // !UNICODE
1.1       root      873: 
                    874: MMRESULT APIENTRY midiOutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID,
                    875:     DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
                    876: MMRESULT APIENTRY midiOutClose(HMIDIOUT hMidiOut);
                    877: MMRESULT APIENTRY midiOutPrepareHeader(HMIDIOUT hMidiOut,
                    878:     LPMIDIHDR lpMidiOutHdr, UINT uSize);
                    879: MMRESULT APIENTRY midiOutUnprepareHeader(HMIDIOUT hMidiOut,
                    880:     LPMIDIHDR lpMidiOutHdr, UINT uSize);
                    881: MMRESULT APIENTRY midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
                    882: MMRESULT APIENTRY midiOutLongMsg(HMIDIOUT hMidiOut,
                    883:     LPMIDIHDR lpMidiOutHdr, UINT uSize);
                    884: MMRESULT APIENTRY midiOutReset(HMIDIOUT hMidiOut);
                    885: MMRESULT APIENTRY midiOutCachePatches(HMIDIOUT hMidiOut,
                    886:     UINT uBank, LPWORD lpPatchArray, UINT uFlags);
                    887: MMRESULT APIENTRY midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
                    888:     UINT uPatch, LPWORD lpKeyArray, UINT uFlags);
                    889: MMRESULT APIENTRY midiOutGetID(HMIDIOUT hMidiOut, PUINT lpuDeviceID);
                    890: MMRESULT APIENTRY
                    891:              midiOutMessage(HMIDIOUT hMidiOut, UINT msg, DWORD dw1, DWORD dw2);
                    892: 
                    893: UINT APIENTRY midiInGetNumDevs(VOID);
                    894: 
1.1.1.2   root      895: MMRESULT APIENTRY midiInGetDevCapsA(UINT uDeviceID,
1.1       root      896:     LPMIDIINCAPSA lpCaps, UINT uSize);
1.1.1.2   root      897: MMRESULT APIENTRY midiInGetDevCapsW(UINT uDeviceID,
                    898:     LPMIDIINCAPSW lpCaps, UINT uSize);
1.1       root      899: #ifdef UNICODE
1.1.1.3 ! root      900: #define midiInGetDevCaps  midiInGetDevCapsW
1.1       root      901: #else
1.1.1.3 ! root      902: #define midiInGetDevCaps  midiInGetDevCapsA
1.1.1.2   root      903: #endif // !UNICODE
1.1       root      904: 
                    905: MMRESULT APIENTRY midiInGetErrorTextA(MMRESULT err, LPSTR lpText, UINT uSize);
1.1.1.2   root      906: MMRESULT APIENTRY midiInGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT uSize);
1.1       root      907: #ifdef UNICODE
1.1.1.3 ! root      908: #define midiInGetErrorText  midiInGetErrorTextW
1.1       root      909: #else
1.1.1.3 ! root      910: #define midiInGetErrorText  midiInGetErrorTextA
1.1.1.2   root      911: #endif // !UNICODE
1.1       root      912: 
                    913: MMRESULT APIENTRY midiInOpen(LPHMIDIIN lphMidiIn, UINT uDeviceID,
                    914:     DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
                    915: MMRESULT APIENTRY midiInClose(HMIDIIN hMidiIn);
                    916: MMRESULT APIENTRY midiInPrepareHeader(HMIDIIN hMidiIn,
                    917:     LPMIDIHDR lpMidiInHdr, UINT uSize);
                    918: MMRESULT APIENTRY midiInUnprepareHeader(HMIDIIN hMidiIn,
                    919:     LPMIDIHDR lpMidiInHdr, UINT uSize);
                    920: MMRESULT APIENTRY midiInAddBuffer(HMIDIIN hMidiIn,
                    921:     LPMIDIHDR lpMidiInHdr, UINT uSize);
                    922: MMRESULT APIENTRY midiInStart(HMIDIIN hMidiIn);
                    923: MMRESULT APIENTRY midiInStop(HMIDIIN hMidiIn);
                    924: MMRESULT APIENTRY midiInReset(HMIDIIN hMidiIn);
                    925: MMRESULT APIENTRY midiInGetID(HMIDIIN hMidiIn, PUINT lpuDeviceID);
                    926: MMRESULT APIENTRY
                    927:                  midiInMessage(HMIDIIN hMidiIn, UINT msg, DWORD dw1, DWORD dw2);
                    928: 
                    929: #endif  //ifndef MMNOMIDI
                    930: 
                    931: 
                    932: #ifndef MMNOAUX
                    933: /****************************************************************************
                    934: 
                    935:                         Auxiliary audio support
                    936: 
                    937: ****************************************************************************/
                    938: 
                    939: // device ID for aux device mapper
1.1.1.2   root      940: #define AUX_MAPPER     ((DWORD)(-1))
1.1       root      941: 
1.1.1.2   root      942: // Auxiliary audio device capabilities structure
                    943: typedef struct tagAUXCAPSA {
1.1       root      944:     WORD        wMid;                   // manufacturer ID
                    945:     WORD        wPid;                   // product ID
                    946:     MMVERSION   vDriverVersion;         // version of the driver
1.1.1.2   root      947:     CHAR        szPname[MAXPNAMELEN];   // product name (NULL terminated string)
1.1       root      948:     WORD        wTechnology;            // type of device
                    949:     DWORD       dwSupport;              // functionality supported by driver
1.1.1.2   root      950: } AUXCAPSA;
                    951: // Auxiliary audio device capabilities structure
                    952: typedef struct tagAUXCAPSW {
1.1       root      953:     WORD        wMid;                   // manufacturer ID
                    954:     WORD        wPid;                   // product ID
                    955:     MMVERSION   vDriverVersion;         // version of the driver
1.1.1.2   root      956:     WCHAR       szPname[MAXPNAMELEN];   // product name (NULL terminated string)
1.1       root      957:     WORD        wTechnology;            // type of device
                    958:     DWORD       dwSupport;              // functionality supported by driver
1.1.1.2   root      959: } AUXCAPSW;
1.1       root      960: #ifdef UNICODE
1.1.1.3 ! root      961: typedef AUXCAPSW AUXCAPS;
1.1.1.2   root      962: #else
1.1.1.3 ! root      963: typedef AUXCAPSA AUXCAPS;
1.1.1.2   root      964: #endif // UNICODE
                    965: typedef AUXCAPSA      *PAUXCAPSA;
                    966: typedef AUXCAPSW      *PAUXCAPSW;
                    967: #ifdef UNICODE
1.1.1.3 ! root      968: typedef PAUXCAPSW PAUXCAPS;
1.1.1.2   root      969: #else
1.1.1.3 ! root      970: typedef PAUXCAPSA PAUXCAPS;
1.1.1.2   root      971: #endif // UNICODE
                    972: typedef AUXCAPSA     *NPAUXCAPSA;
                    973: typedef AUXCAPSW     *NPAUXCAPSW;
                    974: #ifdef UNICODE
1.1.1.3 ! root      975: typedef NPAUXCAPSW NPAUXCAPS;
1.1.1.2   root      976: #else
1.1.1.3 ! root      977: typedef NPAUXCAPSA NPAUXCAPS;
1.1.1.2   root      978: #endif // UNICODE
                    979: typedef AUXCAPSA     *LPAUXCAPSA;
                    980: typedef AUXCAPSW     *LPAUXCAPSW;
                    981: #ifdef UNICODE
1.1.1.3 ! root      982: typedef LPAUXCAPSW LPAUXCAPS;
1.1.1.2   root      983: #else
1.1.1.3 ! root      984: typedef LPAUXCAPSA LPAUXCAPS;
1.1.1.2   root      985: #endif // UNICODE
1.1       root      986: 
                    987: // flags for wTechnology field in AUXCAPS structure
                    988: #define AUXCAPS_CDAUDIO    1       // audio from internal CD-ROM drive
                    989: #define AUXCAPS_AUXIN      2       // audio from auxiliary input jacks
                    990: 
                    991: // flags for dwSupport field in AUXCAPS structure
                    992: #define AUXCAPS_VOLUME     0x00000001   // supports volume control
                    993: #define AUXCAPS_LRVOLUME   0x00000002   // separate left-right volume control
                    994: 
                    995: // auxiliary audio function prototypes
                    996: UINT APIENTRY auxGetNumDevs(VOID);
                    997: MMRESULT APIENTRY auxGetDevCapsA(UINT uDeviceID, LPAUXCAPSA lpCaps, UINT uSize);
1.1.1.2   root      998: MMRESULT APIENTRY auxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW lpCaps, UINT uSize);
1.1       root      999: #ifdef UNICODE
1.1.1.3 ! root     1000: #define auxGetDevCaps  auxGetDevCapsW
1.1       root     1001: #else
1.1.1.3 ! root     1002: #define auxGetDevCaps  auxGetDevCapsA
1.1.1.2   root     1003: #endif // !UNICODE
1.1       root     1004: 
                   1005: MMRESULT APIENTRY auxSetVolume(UINT uDeviceID, DWORD dwVolume);
                   1006: MMRESULT APIENTRY auxGetVolume(UINT uDeviceID, LPDWORD lpdwVolume);
                   1007: MMRESULT APIENTRY auxOutMessage(UINT uDeviceID, UINT msg, DWORD dw1, DWORD dw2);
                   1008: 
                   1009: #endif  //ifndef MMNOAUX
                   1010: 
                   1011: 
                   1012: #ifndef MMNOTIMER
                   1013: /****************************************************************************
                   1014: 
                   1015:                             Timer support
                   1016: 
                   1017: ****************************************************************************/
                   1018: 
                   1019: // timer error return values
                   1020: #define TIMERR_NOERROR        (0)                  // no error
                   1021: #define TIMERR_NOCANDO        (TIMERR_BASE+1)      // request not completed
                   1022: #define TIMERR_STRUCT         (TIMERR_BASE+33)     // time struct size
                   1023: 
                   1024: // timer data types
                   1025: typedef VOID TIMECALLBACK
                   1026:              (UINT uTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2);
                   1027: typedef TIMECALLBACK  *LPTIMECALLBACK;
                   1028: 
                   1029: // flags for wFlags parameter of timeSetEvent() function
                   1030: #define TIME_ONESHOT    0   // program timer for single event
                   1031: #define TIME_PERIODIC   1   // program for continuous periodic event
                   1032: 
                   1033: // timer device capabilities data structure
                   1034: typedef struct timecaps_tag {
                   1035:     UINT    wPeriodMin;     // minimum period supported
                   1036:     UINT    wPeriodMax;     // maximum period supported
                   1037:     } TIMECAPS;
                   1038: typedef TIMECAPS       *PTIMECAPS;
                   1039: typedef TIMECAPS      *NPTIMECAPS;
                   1040: typedef TIMECAPS      *LPTIMECAPS;
                   1041: 
                   1042: // timer function prototypes
                   1043: MMRESULT APIENTRY timeGetSystemTime(LPMMTIME lpTime, UINT uSize);
                   1044: DWORD APIENTRY timeGetTime(VOID);
                   1045: UINT APIENTRY timeSetEvent(UINT uDelay, UINT uResolution,
                   1046:     LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
                   1047: MMRESULT APIENTRY timeKillEvent(UINT uId);
                   1048: MMRESULT APIENTRY timeGetDevCaps(LPTIMECAPS lpTimeCaps, UINT uSize);
                   1049: MMRESULT APIENTRY timeBeginPeriod(UINT uPeriod);
                   1050: MMRESULT APIENTRY timeEndPeriod(UINT uPeriod);
                   1051: 
                   1052: #endif  //ifndef MMNOTIMER
                   1053: 
                   1054: 
                   1055: #ifndef MMNOJOY
                   1056: /****************************************************************************
                   1057: 
                   1058:                             Joystick support
                   1059: 
                   1060: ****************************************************************************/
                   1061: 
                   1062: // joystick error return values
                   1063: #define JOYERR_NOERROR        (0)                  // no error
                   1064: #define JOYERR_PARMS          (JOYERR_BASE+5)      // bad parameters
                   1065: #define JOYERR_NOCANDO        (JOYERR_BASE+6)      // request not completed
                   1066: #define JOYERR_UNPLUGGED      (JOYERR_BASE+7)      // joystick is unplugged
                   1067: 
                   1068: // constants used with JOYINFO structure and MM_JOY* messages
                   1069: #define JOY_BUTTON1         0x0001
                   1070: #define JOY_BUTTON2         0x0002
                   1071: #define JOY_BUTTON3         0x0004
                   1072: #define JOY_BUTTON4         0x0008
                   1073: #define JOY_BUTTON1CHG      0x0100
                   1074: #define JOY_BUTTON2CHG      0x0200
                   1075: #define JOY_BUTTON3CHG      0x0400
                   1076: #define JOY_BUTTON4CHG      0x0800
                   1077: 
                   1078: // joystick ID constants
                   1079: #define JOYSTICKID1         0
                   1080: #define JOYSTICKID2         1
                   1081: 
1.1.1.2   root     1082: // joystick device capabilities data structure
                   1083: typedef struct tagJOYCAPSA {
                   1084:     WORD    wMid;                  // manufacturer ID
                   1085:     WORD    wPid;                  // product ID
                   1086:     CHAR    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
                   1087:     UINT    wXmin;                 // minimum x position value
                   1088:     UINT    wXmax;                 // maximum x position value
                   1089:     UINT    wYmin;                 // minimum y position value
                   1090:     UINT    wYmax;                 // maximum y position value
                   1091:     UINT    wZmin;                 // minimum z position value
                   1092:     UINT    wZmax;                 // maximum z position value
                   1093:     UINT    wNumButtons;           // number of buttons
                   1094:     UINT    wPeriodMin;            // minimum message period when captured
                   1095:     UINT    wPeriodMax;            // maximum message period when captured
                   1096: } JOYCAPSA;
                   1097: // joystick device capabilities data structure
                   1098: typedef struct tagJOYCAPSW {
1.1       root     1099:     WORD    wMid;                  // manufacturer ID
                   1100:     WORD    wPid;                  // product ID
                   1101:     WCHAR   szPname[MAXPNAMELEN];  // product name (NULL terminated string)
1.1.1.2   root     1102:     UINT    wXmin;                 // minimum x position value
                   1103:     UINT    wXmax;                 // maximum x position value
                   1104:     UINT    wYmin;                 // minimum y position value
                   1105:     UINT    wYmax;                 // maximum y position value
                   1106:     UINT    wZmin;                 // minimum z position value
                   1107:     UINT    wZmax;                 // maximum z position value
                   1108:     UINT    wNumButtons;           // number of buttons
                   1109:     UINT    wPeriodMin;            // minimum message period when captured
                   1110:     UINT    wPeriodMax;            // maximum message period when captured
                   1111: } JOYCAPSW;
                   1112: #ifdef UNICODE
1.1.1.3 ! root     1113: typedef JOYCAPSW JOYCAPS;
1.1.1.2   root     1114: #else
1.1.1.3 ! root     1115: typedef JOYCAPSA JOYCAPS;
1.1.1.2   root     1116: #endif // UNICODE
                   1117: typedef JOYCAPSA      *PJOYCAPSA;
1.1       root     1118: typedef JOYCAPSW      *PJOYCAPSW;
1.1.1.2   root     1119: #ifdef UNICODE
1.1.1.3 ! root     1120: typedef PJOYCAPSW PJOYCAPS;
1.1.1.2   root     1121: #else
1.1.1.3 ! root     1122: typedef PJOYCAPSA PJOYCAPS;
1.1.1.2   root     1123: #endif // UNICODE
                   1124: typedef JOYCAPSA     *NPJOYCAPSA;
1.1       root     1125: typedef JOYCAPSW     *NPJOYCAPSW;
1.1.1.2   root     1126: #ifdef UNICODE
1.1.1.3 ! root     1127: typedef NPJOYCAPSW NPJOYCAPS;
1.1.1.2   root     1128: #else
1.1.1.3 ! root     1129: typedef NPJOYCAPSA NPJOYCAPS;
1.1.1.2   root     1130: #endif // UNICODE
                   1131: typedef JOYCAPSA     *LPJOYCAPSA;
1.1       root     1132: typedef JOYCAPSW     *LPJOYCAPSW;
1.1.1.2   root     1133: #ifdef UNICODE
1.1.1.3 ! root     1134: typedef LPJOYCAPSW LPJOYCAPS;
1.1.1.2   root     1135: #else
1.1.1.3 ! root     1136: typedef LPJOYCAPSA LPJOYCAPS;
1.1.1.2   root     1137: #endif // UNICODE
1.1       root     1138: 
                   1139: // joystick information data structure
                   1140: typedef struct joyinfo_tag {
1.1.1.2   root     1141:     UINT wXpos;                 // x position
                   1142:     UINT wYpos;                 // y position
                   1143:     UINT wZpos;                 // z position
                   1144:     UINT wButtons;              // button states
1.1       root     1145:     } JOYINFO;
                   1146: typedef JOYINFO       *PJOYINFO;
                   1147: typedef JOYINFO      *NPJOYINFO;
                   1148: typedef JOYINFO      *LPJOYINFO;
                   1149: 
                   1150: // joystick function prototypes
                   1151: MMRESULT APIENTRY joyGetDevCapsA(UINT id, LPJOYCAPSA lpCaps, UINT uSize);
1.1.1.2   root     1152: // joystick function prototypes
                   1153: MMRESULT APIENTRY joyGetDevCapsW(UINT id, LPJOYCAPSW lpCaps, UINT uSize);
1.1       root     1154: #ifdef UNICODE
1.1.1.3 ! root     1155: #define joyGetDevCaps  joyGetDevCapsW
1.1       root     1156: #else
1.1.1.3 ! root     1157: #define joyGetDevCaps  joyGetDevCapsA
1.1.1.2   root     1158: #endif // !UNICODE
1.1       root     1159: 
                   1160: UINT     APIENTRY joyGetNumDevs(VOID);
                   1161: MMRESULT APIENTRY joyGetPos(UINT id, LPJOYINFO lpInfo);
1.1.1.2   root     1162: MMRESULT APIENTRY joyGetThreshold(UINT id, PUINT lpuThreshold);
1.1       root     1163: MMRESULT APIENTRY joyReleaseCapture(UINT id);
                   1164: MMRESULT APIENTRY joySetCapture(HWND hwnd, UINT uId, UINT uPeriod,
                   1165:     BOOL bChanged);
                   1166: MMRESULT APIENTRY joySetThreshold(UINT id, UINT uThreshold);
1.1.1.2   root     1167: UINT APIENTRY joySetCalibration(UINT id, PUINT pwXbase,       /* ;Internal */
                   1168:     PUINT pwXdelta, PUINT pwYbase, PUINT pwYdelta,            /* ;Internal */
                   1169:     PUINT pwZbase, PUINT pwZdelta);                           /* ;Internal */
1.1       root     1170: 
                   1171: #endif  //ifndef MMNOJOY
                   1172: 
                   1173: #ifndef MMNOMMIO
                   1174: /****************************************************************************
                   1175: 
                   1176:                         Multimedia File I/O support
                   1177: 
                   1178: ****************************************************************************/
                   1179: 
                   1180: // MMIO error return values
                   1181: #define MMIOERR_BASE            256
                   1182: #define MMIOERR_FILENOTFOUND    (MMIOERR_BASE + 1)  // file not found
                   1183: #define MMIOERR_OUTOFMEMORY     (MMIOERR_BASE + 2)  // out of memory
                   1184: #define MMIOERR_CANNOTOPEN      (MMIOERR_BASE + 3)  // cannot open
                   1185: #define MMIOERR_CANNOTCLOSE     (MMIOERR_BASE + 4)  // cannot close
                   1186: #define MMIOERR_CANNOTREAD      (MMIOERR_BASE + 5)  // cannot read
                   1187: #define MMIOERR_CANNOTWRITE     (MMIOERR_BASE + 6)  // cannot write
                   1188: #define MMIOERR_CANNOTSEEK      (MMIOERR_BASE + 7)  // cannot seek
                   1189: #define MMIOERR_CANNOTEXPAND    (MMIOERR_BASE + 8)  // cannot expand file
                   1190: #define MMIOERR_CHUNKNOTFOUND   (MMIOERR_BASE + 9)  // chunk not found
                   1191: #define MMIOERR_UNBUFFERED      (MMIOERR_BASE + 10) // file is unbuffered
                   1192: 
                   1193: // MMIO constants
                   1194: #define CFSEPCHAR       '+'             // compound file name separator char.
                   1195: 
                   1196: // MMIO data types
                   1197: typedef DWORD           FOURCC;         // a four character code
                   1198: typedef HANDLE          HMMIO;          // a handle to an open file
                   1199: typedef LPSTR           HPSTR;          // a huge version of LPSTR
                   1200: 
                   1201: typedef LRESULT MMIOPROC
                   1202:                     (LPSTR lpmmioinfo, UINT uMsg, LONG lParam1, LONG lParam2);
                   1203: typedef MMIOPROC *LPMMIOPROC;
                   1204: 
                   1205: // general MMIO information data structure
                   1206: typedef struct                  // The MMIO state
                   1207: {
                   1208:         /* general fields */
                   1209:         DWORD           dwFlags;        // general status flags
                   1210:         FOURCC          fccIOProc;      // 4 char id for the I/O procedure
                   1211:         LPMMIOPROC      pIOProc;        // pointer to I/O procedure
                   1212:         UINT            wErrorRet;      // place for error to be returned
                   1213:         HANDLE          htask;          //
                   1214: 
                   1215:         /* fields maintained by MMIO functions during buffered I/O */
                   1216:         LONG            cchBuffer;      // size of I/O buffer (or 0L)
                   1217:         LPSTR           pchBuffer;      // start of I/O buffer (or NULL)
                   1218:         LPSTR           pchNext;        // pointer to next byte to read/write
                   1219:         LPSTR           pchEndRead;     // pointer to last valid byte to read
                   1220:         LPSTR           pchEndWrite;    // pointer to last byte to write
                   1221:         LONG            lBufOffset;     // disk offset of start of buffer
                   1222: 
                   1223:         /* fields maintained by I/O procedure */
                   1224:         LONG            lDiskOffset;    // disk offset of next read or write
                   1225:         DWORD           adwInfo[3];     // data specific to type of MMIOPROC
                   1226: 
                   1227:         /* other fields maintained by MMIO */
                   1228:         DWORD           dwReserved1;    // reserved for MMIO use
                   1229:         DWORD           dwReserved2;    // reserved for MMIO use
                   1230:         HMMIO           hmmio;          // handle to open file
                   1231: 
                   1232: } MMIOINFO;
                   1233: typedef MMIOINFO       *PMMIOINFO;
                   1234: typedef MMIOINFO      *NPMMIOINFO;
                   1235: typedef MMIOINFO      *LPMMIOINFO;
                   1236: 
                   1237: // RIFF chunk information data structure
                   1238: typedef struct MMCKINFO_tag      // structure for representing RIFF chunk info.
                   1239: {
                   1240:         FOURCC          ckid;           // chunk ID
                   1241:         DWORD           cksize;         // chunk size
                   1242:         FOURCC          fccType;        // form type or list type
                   1243:         DWORD           dwDataOffset;   // offset of data portion of chunk
                   1244:         DWORD           dwFlags;        // flags used by MMIO functions
                   1245: } MMCKINFO;
                   1246: typedef MMCKINFO       *PMMCKINFO;
                   1247: typedef MMCKINFO      *NPMMCKINFO;
                   1248: typedef MMCKINFO      *LPMMCKINFO;
                   1249: 
                   1250: /* <dwFlags> field of MMIOINFO structure -- many same as OpenFile() flags */
                   1251: /* Low word of flags will be passed to OpenFile() -- therefore, any MMIO-
                   1252:     specific flags should be in the high word.  */
                   1253: #define MMIO_RWMODE     0x00000003      // mask to get bits used for opening
                   1254:                                         // file for reading/writing/both
                   1255: #define MMIO_SHAREMODE  0x00000070      // file sharing mode number
                   1256: 
                   1257: // constants for dwFlags field of MMIOINFO
                   1258: #define MMIO_CREATE     0x00001000      // create new file (or truncate file)
                   1259: #define MMIO_PARSE      0x00000100      // parse new file returning path
                   1260: #define MMIO_DELETE     0x00000200      // create new file (or truncate file)
                   1261: #define MMIO_EXIST      0x00004000      // checks for existence of file
                   1262: #define MMIO_ALLOCBUF   0x00010000      // mmioOpen() should allocate a buffer
                   1263: #define MMIO_GETTEMP    0x00020000      // mmioOpen() should retrieve temp name
                   1264: 
                   1265: #define MMIO_DIRTY      0x10000000      // I/O buffer is dirty
                   1266: /* MMIO_DIRTY is also used in the <dwFlags> field of MMCKINFO structure */
                   1267: 
                   1268: #define MMIO_OPEN_VALID 0x0003FFFF      // valid flags for mmioOpen /* ;Internal */
                   1269: 
                   1270: /* read/write mode numbers (bit field MMIO_RWMODE) */
                   1271: #define MMIO_READ       0x00000000      // open file for reading only
                   1272: #define MMIO_WRITE      0x00000001      // open file for writing only
                   1273: #define MMIO_READWRITE  0x00000002      // open file for reading and writing
                   1274: 
                   1275: /* share mode numbers (bit field MMIO_SHAREMODE) */
                   1276: #define MMIO_COMPAT     0x00000000      // compatibility mode
                   1277: #define MMIO_EXCLUSIVE  0x00000010      // exclusive-access mode
                   1278: #define MMIO_DENYWRITE  0x00000020      // deny writing to other processes
                   1279: #define MMIO_DENYREAD   0x00000030      // deny reading to other processes
                   1280: #define MMIO_DENYNONE   0x00000040      // deny nothing to other processes
                   1281: 
                   1282: /* flags for other functions */
                   1283: #define MMIO_FHOPEN             0x0010  // mmioClose(): keep file handle open
                   1284: #define MMIO_EMPTYBUF           0x0010  // mmioFlush(): empty the I/O buffer
                   1285: #define MMIO_TOUPPER            0x0010  // mmioStringToFOURCC(): cvt. to u-case
                   1286: #define MMIO_INSTALLPROC    0x00010000  // mmioInstallIOProc(): install MMIOProc
                   1287: #define MMIO_GLOBALPROC     0x10000000  // mmioInstallIOProc: install globally
                   1288: #define MMIO_UNICODEPROC    0x01000000  // mmioInstallIOProc(): Unicode MMIOProc
                   1289: #define MMIO_REMOVEPROC     0x00020000  // mmioInstallIOProc(): remove MMIOProc
                   1290: #define MMIO_FINDPROC       0x00040000  // mmioInstallIOProc(): find an MMIOProc
                   1291: #define MMIO_FINDCHUNK          0x0010  // mmioDescend(): find a chunk by ID
                   1292: #define MMIO_FINDRIFF           0x0020  // mmioDescend(): find a LIST chunk
                   1293:                                         // ???
                   1294: #define MMIO_FINDLIST           0x0040  // mmioDescend(): find a RIFF chunk
                   1295:                                         // ???
                   1296: #define MMIO_CREATERIFF         0x0020  // mmioCreateChunk(): make a LIST chunk
                   1297:                                         // ???
                   1298: #define MMIO_CREATELIST         0x0040  // mmioCreateChunk(): make a RIFF chunk
                   1299:                                         // ???
                   1300: 
                   1301: #define MMIO_VALIDPROC      0x11070000  // valid for mmioInstallIOProc /* ;Internal */
                   1302: 
                   1303: /* message numbers for MMIOPROC I/O procedure functions */
                   1304: #define MMIOM_READ      MMIO_READ       // read (must equal MMIO_READ!)
                   1305: #define MMIOM_WRITE    MMIO_WRITE       // write (must equal MMIO_WRITE!)
                   1306: #define MMIOM_SEEK              2       // seek to a new position in file
                   1307: #define MMIOM_OPEN              3       // open file
                   1308: #define MMIOM_CLOSE             4       // close file
                   1309: #define MMIOM_WRITEFLUSH        5       // write and flush
                   1310: #define MMIOM_RENAME            6       // rename specified file
                   1311: #define MMIOM_USER         0x8000       // beginning of user-defined messages
                   1312: 
                   1313: /* standard four character codes */
                   1314: #define FOURCC_RIFF     mmioFOURCC('R', 'I', 'F', 'F')
                   1315: #define FOURCC_LIST     mmioFOURCC('L', 'I', 'S', 'T')
                   1316: 
                   1317: /* four character codes used to identify standard built-in I/O procedures */
                   1318: #define FOURCC_DOS      mmioFOURCC('D', 'O', 'S', ' ')
                   1319: #define FOURCC_MEM      mmioFOURCC('M', 'E', 'M', ' ')
                   1320: 
                   1321: // flags for mmioSeek()
                   1322: #ifndef SEEK_SET
                   1323: #define SEEK_SET        0               // seek to an absolute position
                   1324: #define SEEK_CUR        1               // seek relative to current position
                   1325: #define SEEK_END        2               // seek relative to end of file
                   1326: #endif  //ifndef SEEK_SET
                   1327: 
                   1328: /* other constants */
                   1329: #define MMIO_DEFAULTBUFFER      8192    // default buffer size
                   1330: 
                   1331: /* MMIO macros */
                   1332: #define mmioFOURCC( ch0, ch1, ch2, ch3 )                                \
                   1333:                 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) |    \
                   1334:                 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
                   1335: // This macro is machine byte-sex and word-sex dependent!!
                   1336: // The characters are BYTES, so compatible with ANSI, not at all with UNICODE
                   1337: 
                   1338: 
                   1339: /* MMIO prototypes */
                   1340: 
1.1.1.2   root     1341: FOURCC APIENTRY mmioStringToFOURCCA(LPCSTR sz, UINT uFlags);
                   1342: FOURCC APIENTRY mmioStringToFOURCCW(LPCWSTR sz, UINT uFlags);
1.1       root     1343: #ifdef UNICODE
1.1.1.3 ! root     1344: #define mmioStringToFOURCC  mmioStringToFOURCCW
1.1       root     1345: #else
1.1.1.3 ! root     1346: #define mmioStringToFOURCC  mmioStringToFOURCCA
1.1.1.2   root     1347: #endif // !UNICODE
1.1       root     1348: 
                   1349: LPMMIOPROC APIENTRY mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc,
                   1350:                                         DWORD dwFlags);
                   1351: LPMMIOPROC APIENTRY mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc,
                   1352:                                         DWORD dwFlags);
                   1353: #ifdef UNICODE
1.1.1.3 ! root     1354: #define mmioInstallIOProc  mmioInstallIOProcW
1.1       root     1355: #else
1.1.1.3 ! root     1356: #define mmioInstallIOProc  mmioInstallIOProcA
1.1.1.2   root     1357: #endif // !UNICODE
1.1       root     1358: HMMIO APIENTRY mmioOpenA( LPSTR szFileName, LPMMIOINFO lpmmioinfo,
                   1359:                           DWORD dwOpenFlags);
                   1360: HMMIO APIENTRY mmioOpenW( LPWSTR szFileName, LPMMIOINFO lpmmioinfo,
                   1361:                           DWORD dwOpenFlags);
                   1362: #ifdef UNICODE
1.1.1.3 ! root     1363: #define mmioOpen  mmioOpenW
1.1       root     1364: #else
1.1.1.3 ! root     1365: #define mmioOpen  mmioOpenA
1.1.1.2   root     1366: #endif // !UNICODE
1.1       root     1367: 
1.1.1.2   root     1368: MMRESULT APIENTRY mmioRenameA( LPCSTR szFileName, LPCSTR szNewFileName,
1.1       root     1369:                                LPMMIOINFO lpmmioinfo, DWORD dwRenameFlags);
1.1.1.2   root     1370: MMRESULT APIENTRY mmioRenameW( LPCWSTR szFileName, LPCWSTR szNewFileName,
1.1       root     1371:                                LPMMIOINFO lpmmioinfo, DWORD dwRenameFlags);
                   1372: #ifdef UNICODE
1.1.1.3 ! root     1373: #define mmioRename  mmioRenameW
1.1       root     1374: #else
1.1.1.3 ! root     1375: #define mmioRename  mmioRenameA
1.1.1.2   root     1376: #endif // !UNICODE
1.1       root     1377: 
                   1378: MMRESULT APIENTRY mmioClose(HMMIO hmmio, UINT uFlags);
                   1379: LRESULT APIENTRY mmioRead(HMMIO hmmio, LPSTR pch, LONG cch);
                   1380: LRESULT APIENTRY mmioWrite(HMMIO hmmio, LPSTR pch, LONG cch);
                   1381: LRESULT APIENTRY mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
                   1382: MMRESULT APIENTRY mmioGetInfo(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT uFlags);
                   1383: MMRESULT APIENTRY mmioSetInfo(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT uFlags);
                   1384: MMRESULT APIENTRY mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
                   1385:                                  UINT uFlags);
                   1386: MMRESULT APIENTRY mmioFlush(HMMIO hmmio, UINT uFlags);
                   1387: MMRESULT APIENTRY mmioAdvance(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT uFlags);
                   1388: LRESULT APIENTRY mmioSendMessage( HMMIO hmmio, UINT uMsg,
                   1389:                                   LONG lParam1, LONG lParam2);
                   1390: 
                   1391: /* RIFF I/O prototypes */
                   1392: MMRESULT APIENTRY mmioDescend( HMMIO hmmio, LPMMCKINFO lpck,
                   1393:                             LPMMCKINFO lpckParent, UINT uFlags);
                   1394: MMRESULT APIENTRY mmioAscend(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags);
                   1395: MMRESULT APIENTRY mmioCreateChunk(HMMIO hmmio, LPMMCKINFO lpck, UINT uFlags);
                   1396: 
                   1397: #endif  //ifndef MMNOMMIO
                   1398: 
                   1399: typedef  UINT    MCIDEVICEID;  // MCI device ID type
                   1400: // BEWARE:  MCI device ids can be stored and read from Win 3 compatible
                   1401: // files when the device id will be WORD size.
                   1402: 
                   1403: #ifndef MMNOMCI
                   1404: /****************************************************************************
                   1405: 
                   1406:                             MCI support
                   1407: 
                   1408: ****************************************************************************/
                   1409: 
                   1410: /*--------------------------------------------------------------------*\
                   1411:  *
                   1412:  *                           MCI functions
                   1413:  *
                   1414:  *--------------------------------------------------------------------
                   1415:  * msiSendCommand
                   1416: \*--------------------------------------------------------------------*/
                   1417: MCIERROR APIENTRY mciSendCommandA(
                   1418:     MCIDEVICEID wDeviceID,
                   1419:     UINT uMessage,
                   1420:     DWORD dwParam1,
                   1421:     DWORD dwParam2 );
1.1.1.2   root     1422: /*--------------------------------------------------------------------*\
                   1423:  *
                   1424:  *                           MCI functions
                   1425:  *
                   1426:  *--------------------------------------------------------------------
                   1427:  * msiSendCommand
                   1428: \*--------------------------------------------------------------------*/
1.1       root     1429: MCIERROR APIENTRY mciSendCommandW(
                   1430:     MCIDEVICEID wDeviceID,
                   1431:     UINT uMessage,
                   1432:     DWORD dwParam1,
                   1433:     DWORD dwParam2 );
                   1434: #ifdef UNICODE
1.1.1.3 ! root     1435: #define mciSendCommand  mciSendCommandW
1.1       root     1436: #else
1.1.1.3 ! root     1437: #define mciSendCommand  mciSendCommandA
1.1.1.2   root     1438: #endif // !UNICODE
1.1       root     1439: 
                   1440: /*--------------------------------------------------------------------*\
                   1441:  * mciSendString
                   1442: \*--------------------------------------------------------------------*/
                   1443: MCIERROR APIENTRY mciSendStringA(
                   1444:     LPCSTR lpstrCommand,
                   1445:     LPSTR lpstrReturnString,
                   1446:     UINT uReturnLength,
1.1.1.2   root     1447:     HANDLE hwndCallback );
                   1448: /*--------------------------------------------------------------------*\
                   1449:  * mciSendString
                   1450: \*--------------------------------------------------------------------*/
1.1       root     1451: MCIERROR APIENTRY mciSendStringW(
                   1452:     LPCWSTR lpstrCommand,
                   1453:     LPWSTR lpstrReturnString,
                   1454:     UINT uReturnLength,
1.1.1.2   root     1455:     HANDLE hwndCallback );
1.1       root     1456: #ifdef UNICODE
1.1.1.3 ! root     1457: #define mciSendString  mciSendStringW
1.1       root     1458: #else
1.1.1.3 ! root     1459: #define mciSendString  mciSendStringA
1.1.1.2   root     1460: #endif // !UNICODE
1.1       root     1461: 
                   1462: /*--------------------------------------------------------------------*\
                   1463:  *  mciGetCreatorTask
                   1464: \*--------------------------------------------------------------------*/
                   1465: HANDLE APIENTRY mciGetCreatorTask(
                   1466:     MCIDEVICEID wDeviceID);
                   1467: 
                   1468: 
                   1469: /*--------------------------------------------------------------------*\
                   1470:  *  mciGetDeviceID
                   1471: \*--------------------------------------------------------------------*/
                   1472: MCIDEVICEID APIENTRY mciGetDeviceIDA(
                   1473:     LPCSTR lpstrName );
1.1.1.2   root     1474: /*--------------------------------------------------------------------*\
                   1475:  *  mciGetDeviceID
                   1476: \*--------------------------------------------------------------------*/
1.1       root     1477: MCIDEVICEID APIENTRY mciGetDeviceIDW(
                   1478:     LPCWSTR lpstrName );
                   1479: #ifdef UNICODE
1.1.1.3 ! root     1480: #define mciGetDeviceID  mciGetDeviceIDW
1.1       root     1481: #else
1.1.1.3 ! root     1482: #define mciGetDeviceID  mciGetDeviceIDA
1.1.1.2   root     1483: #endif // !UNICODE
1.1       root     1484: 
                   1485: /*--------------------------------------------------------------------*\
                   1486:  *  mciGetDeviceIDFromElementID
                   1487: \*--------------------------------------------------------------------*/
                   1488: MCIDEVICEID APIENTRY mciGetDeviceIDFromElementIDA(
                   1489:     DWORD dwElementID,
                   1490:     LPCSTR lpstrType );
1.1.1.2   root     1491: /*--------------------------------------------------------------------*\
                   1492:  *  mciGetDeviceIDFromElementID
                   1493: \*--------------------------------------------------------------------*/
1.1       root     1494: MCIDEVICEID APIENTRY mciGetDeviceIDFromElementIDW(
                   1495:     DWORD dwElementID,
                   1496:     LPCWSTR lpstrType );
                   1497: #ifdef UNICODE
1.1.1.3 ! root     1498: #define mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDW
1.1       root     1499: #else
1.1.1.3 ! root     1500: #define mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDA
1.1.1.2   root     1501: #endif // !UNICODE
1.1       root     1502: 
                   1503: /*--------------------------------------------------------------------*\
                   1504:  * mciGetErrorString
                   1505: \*--------------------------------------------------------------------*/
                   1506: BOOL APIENTRY mciGetErrorStringA(
1.1.1.3 ! root     1507:     DWORD dwError,           // Should be type==MCIERROR...
1.1       root     1508:     LPSTR lpstrBuffer,
                   1509:     UINT uLength );
1.1.1.2   root     1510: /*--------------------------------------------------------------------*\
                   1511:  * mciGetErrorString
                   1512: \*--------------------------------------------------------------------*/
1.1       root     1513: BOOL APIENTRY mciGetErrorStringW(
1.1.1.3 ! root     1514:     DWORD dwError,           // Should be type==MCIERROR...
1.1       root     1515:     LPWSTR lpstrBuffer,
                   1516:     UINT uLength );
                   1517: #ifdef UNICODE
1.1.1.3 ! root     1518: #define mciGetErrorString  mciGetErrorStringW
1.1       root     1519: #else
1.1.1.3 ! root     1520: #define mciGetErrorString  mciGetErrorStringA
1.1.1.2   root     1521: #endif // !UNICODE
1.1       root     1522: 
                   1523: typedef UINT (*YIELDPROC) (MCIDEVICEID wDeviceID, DWORD dwYieldData);
                   1524: 
1.1.1.2   root     1525: BOOL APIENTRY mciSetYieldProc ( MCIDEVICEID wDeviceID
                   1526:                               , YIELDPROC fpYieldProc
                   1527:                               , DWORD dwYieldData
                   1528:                               );
                   1529: YIELDPROC APIENTRY mciGetYieldProc ( MCIDEVICEID wDeviceID
                   1530:                                    , LPDWORD lpdwYieldData
                   1531:                                    );
                   1532: 
                   1533: #if (WINVER < 0x030a)
                   1534: BOOL WINAPI mciExecute (LPCSTR lpstrCommand);
                   1535: #endif /* ifdef WINVER < 0x030a */
                   1536: 
1.1       root     1537: // THIS NUMBER IS HARDCODED WHERE THE MCI_FORMAT_<x>'s ARE #define'd
                   1538: // You must change those definitions if you change this number
                   1539: 
                   1540: //  MCI error return values
                   1541: #define MCIERR_INVALID_DEVICE_ID        (MCIERR_BASE + 1)
                   1542: #define MCIERR_UNRECOGNIZED_KEYWORD     (MCIERR_BASE + 3)
                   1543: #define MCIERR_UNRECOGNIZED_COMMAND     (MCIERR_BASE + 5)
                   1544: #define MCIERR_HARDWARE                 (MCIERR_BASE + 6)
                   1545: #define MCIERR_INVALID_DEVICE_NAME      (MCIERR_BASE + 7)
                   1546: #define MCIERR_OUT_OF_MEMORY            (MCIERR_BASE + 8)
                   1547: #define MCIERR_DEVICE_OPEN              (MCIERR_BASE + 9)
                   1548: #define MCIERR_CANNOT_LOAD_DRIVER       (MCIERR_BASE + 10)
                   1549: #define MCIERR_MISSING_COMMAND_STRING   (MCIERR_BASE + 11)
                   1550: #define MCIERR_PARAM_OVERFLOW           (MCIERR_BASE + 12)
                   1551: #define MCIERR_MISSING_STRING_ARGUMENT  (MCIERR_BASE + 13)
                   1552: #define MCIERR_BAD_INTEGER              (MCIERR_BASE + 14)
                   1553: #define MCIERR_PARSER_INTERNAL          (MCIERR_BASE + 15)
                   1554: #define MCIERR_DRIVER_INTERNAL          (MCIERR_BASE + 16)
                   1555: #define MCIERR_MISSING_PARAMETER        (MCIERR_BASE + 17)
                   1556: #define MCIERR_UNSUPPORTED_FUNCTION     (MCIERR_BASE + 18)
                   1557: #define MCIERR_FILE_NOT_FOUND           (MCIERR_BASE + 19)
                   1558: #define MCIERR_DEVICE_NOT_READY         (MCIERR_BASE + 20)
                   1559: #define MCIERR_INTERNAL                 (MCIERR_BASE + 21)
                   1560: #define MCIERR_DRIVER                   (MCIERR_BASE + 22)
                   1561: #define MCIERR_CANNOT_USE_ALL           (MCIERR_BASE + 23)
                   1562: #define MCIERR_MULTIPLE                 (MCIERR_BASE + 24)
                   1563: #define MCIERR_EXTENSION_NOT_FOUND      (MCIERR_BASE + 25)
                   1564: #define MCIERR_OUTOFRANGE               (MCIERR_BASE + 26)
                   1565: #define MCIERR_FLAGS_NOT_COMPATIBLE     (MCIERR_BASE + 28)
                   1566: #define MCIERR_FILE_NOT_SAVED           (MCIERR_BASE + 30)
                   1567: #define MCIERR_DEVICE_TYPE_REQUIRED     (MCIERR_BASE + 31)
                   1568: #define MCIERR_DEVICE_LOCKED            (MCIERR_BASE + 32)
                   1569: #define MCIERR_DUPLICATE_ALIAS          (MCIERR_BASE + 33)
                   1570: #define MCIERR_BAD_CONSTANT             (MCIERR_BASE + 34)
                   1571: #define MCIERR_MUST_USE_SHAREABLE       (MCIERR_BASE + 35)
                   1572: #define MCIERR_MISSING_DEVICE_NAME      (MCIERR_BASE + 36)
                   1573: #define MCIERR_BAD_TIME_FORMAT          (MCIERR_BASE + 37)
                   1574: #define MCIERR_NO_CLOSING_QUOTE         (MCIERR_BASE + 38)
                   1575: #define MCIERR_DUPLICATE_FLAGS          (MCIERR_BASE + 39)
                   1576: #define MCIERR_INVALID_FILE             (MCIERR_BASE + 40)
                   1577: #define MCIERR_NULL_PARAMETER_BLOCK     (MCIERR_BASE + 41)
                   1578: #define MCIERR_UNNAMED_RESOURCE         (MCIERR_BASE + 42)
                   1579: #define MCIERR_NEW_REQUIRES_ALIAS       (MCIERR_BASE + 43)
                   1580: #define MCIERR_NOTIFY_ON_AUTO_OPEN      (MCIERR_BASE + 44)
                   1581: #define MCIERR_NO_ELEMENT_ALLOWED       (MCIERR_BASE + 45)
                   1582: #define MCIERR_NONAPPLICABLE_FUNCTION   (MCIERR_BASE + 46)
                   1583: #define MCIERR_ILLEGAL_FOR_AUTO_OPEN    (MCIERR_BASE + 47)
                   1584: #define MCIERR_FILENAME_REQUIRED        (MCIERR_BASE + 48)
                   1585: #define MCIERR_EXTRA_CHARACTERS         (MCIERR_BASE + 49)
                   1586: #define MCIERR_DEVICE_NOT_INSTALLED     (MCIERR_BASE + 50)
                   1587: #define MCIERR_GET_CD                   (MCIERR_BASE + 51)
                   1588: #define MCIERR_SET_CD                   (MCIERR_BASE + 52)
                   1589: #define MCIERR_SET_DRIVE                (MCIERR_BASE + 53)
                   1590: #define MCIERR_DEVICE_LENGTH            (MCIERR_BASE + 54)
                   1591: #define MCIERR_DEVICE_ORD_LENGTH        (MCIERR_BASE + 55)
                   1592: #define MCIERR_NO_INTEGER               (MCIERR_BASE + 56)
                   1593: 
                   1594: #define MCIERR_WAVE_OUTPUTSINUSE        (MCIERR_BASE + 64)
                   1595: #define MCIERR_WAVE_SETOUTPUTINUSE      (MCIERR_BASE + 65)
                   1596: #define MCIERR_WAVE_INPUTSINUSE         (MCIERR_BASE + 66)
                   1597: #define MCIERR_WAVE_SETINPUTINUSE       (MCIERR_BASE + 67)
                   1598: #define MCIERR_WAVE_OUTPUTUNSPECIFIED   (MCIERR_BASE + 68)
                   1599: #define MCIERR_WAVE_INPUTUNSPECIFIED    (MCIERR_BASE + 69)
                   1600: #define MCIERR_WAVE_OUTPUTSUNSUITABLE   (MCIERR_BASE + 70)
                   1601: #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
                   1602: #define MCIERR_WAVE_INPUTSUNSUITABLE    (MCIERR_BASE + 72)
                   1603: #define MCIERR_WAVE_SETINPUTUNSUITABLE  (MCIERR_BASE + 73)
                   1604: 
                   1605: #define MCIERR_SEQ_DIV_INCOMPATIBLE     (MCIERR_BASE + 80)
                   1606: #define MCIERR_SEQ_PORT_INUSE           (MCIERR_BASE + 81)
                   1607: #define MCIERR_SEQ_PORT_NONEXISTENT     (MCIERR_BASE + 82)
                   1608: #define MCIERR_SEQ_PORT_MAPNODEVICE     (MCIERR_BASE + 83)
                   1609: #define MCIERR_SEQ_PORT_MISCERROR       (MCIERR_BASE + 84)
                   1610: #define MCIERR_SEQ_TIMER                (MCIERR_BASE + 85)
                   1611: #define MCIERR_SEQ_PORTUNSPECIFIED      (MCIERR_BASE + 86)
                   1612: #define MCIERR_SEQ_NOMIDIPRESENT        (MCIERR_BASE + 87)
                   1613: 
                   1614: #define MCIERR_NO_WINDOW                (MCIERR_BASE + 90)
                   1615: #define MCIERR_CREATEWINDOW             (MCIERR_BASE + 91)
                   1616: #define MCIERR_FILE_READ                (MCIERR_BASE + 92)
                   1617: #define MCIERR_FILE_WRITE               (MCIERR_BASE + 93)
                   1618: 
                   1619: // All custom device driver errors must be >= this value
                   1620: #define MCIERR_CUSTOM_DRIVER_BASE       (MCIERR_BASE + 256)
                   1621: 
                   1622: /****************************************************************************
                   1623: *          MCI command message identifiers
                   1624: *****************************************************************************/
                   1625: // Message numbers are hard coded because the resource compiler
                   1626: // will otherwise fail on the RCDATA command table in mmsystem.rc
                   1627: 
                   1628: // They must be in the range between MCI_FIRST and MCI_LAST
                   1629: 
                   1630: #define MCI_FIRST                       0x0800
                   1631: // Messages 0x801 and 0x802 are reserved
                   1632: #define MCI_OPEN                        0x0803
                   1633: #define MCI_CLOSE                       0x0804
                   1634: #define MCI_ESCAPE                      0x0805
                   1635: #define MCI_PLAY                        0x0806
                   1636: #define MCI_SEEK                        0x0807
                   1637: #define MCI_STOP                        0x0808
                   1638: #define MCI_PAUSE                       0x0809
                   1639: #define MCI_INFO                        0x080A
                   1640: #define MCI_GETDEVCAPS                  0x080B
                   1641: #define MCI_SPIN                        0x080C
                   1642: #define MCI_SET                         0x080D
                   1643: #define MCI_STEP                        0x080E
                   1644: #define MCI_RECORD                      0x080F
                   1645: #define MCI_SYSINFO                     0x0810
                   1646: #define MCI_BREAK                       0x0811
                   1647: #define MCI_SOUND                       0x0812
                   1648: #define MCI_SAVE                        0x0813
                   1649: #define MCI_STATUS                      0x0814
                   1650: 
                   1651: #define MCI_CUE                         0x0830
                   1652: 
                   1653: #define MCI_REALIZE                     0x0840
                   1654: #define MCI_WINDOW                      0x0841
                   1655: #define MCI_PUT                         0x0842
                   1656: #define MCI_WHERE                       0x0843
                   1657: #define MCI_FREEZE                      0x0844
                   1658: #define MCI_UNFREEZE                    0x0845
                   1659: 
                   1660: #define MCI_LOAD                        0x0850
                   1661: #define MCI_CUT                         0x0851
                   1662: #define MCI_COPY                        0x0852
                   1663: #define MCI_PASTE                       0x0853
                   1664: #define MCI_UPDATE                      0x0854
                   1665: #define MCI_RESUME                      0x0855
                   1666: #define MCI_DELETE                      0x0856
                   1667: 
                   1668: #define MCI_LAST                        0x0FFF
                   1669: 
                   1670: // the next 0x400 message ID's are reserved for custom drivers
                   1671: // all custom MCI command messages must be >= than this value
                   1672: #define MCI_USER_MESSAGES               (0x400 + MCI_FIRST)
                   1673: 
                   1674: 
                   1675: /****************************************************************************
                   1676: *   Structures for the lpdwParams (dwParam2) of mciSendCommand for those
                   1677: *   command messages that may be parsed in string form.
                   1678: *****************************************************************************/
                   1679: 
                   1680: 
                   1681: 
1.1.1.3 ! root     1682: #define MCI_ALL_DEVICE_ID               ((MCIDEVICEID)-1)    // Matches all MCI devices
1.1       root     1683: 
                   1684: // constants for predefined MCI device types
                   1685: //#define MCI_DEVTYPE_VCR                 (MCI_STRING_OFFSET + 1)
                   1686: //#define MCI_DEVTYPE_VIDEODISC           (MCI_STRING_OFFSET + 2)
                   1687: //#define MCI_DEVTYPE_OVERLAY             (MCI_STRING_OFFSET + 3)
                   1688: //#define MCI_DEVTYPE_CD_AUDIO            (MCI_STRING_OFFSET + 4)
                   1689: //#define MCI_DEVTYPE_DAT                 (MCI_STRING_OFFSET + 5)
                   1690: //#define MCI_DEVTYPE_SCANNER             (MCI_STRING_OFFSET + 6)
                   1691: //#define MCI_DEVTYPE_ANIMATION           (MCI_STRING_OFFSET + 7)
                   1692: //#define MCI_DEVTYPE_DIGITAL_VIDEO       (MCI_STRING_OFFSET + 8)
                   1693: //#define MCI_DEVTYPE_OTHER               (MCI_STRING_OFFSET + 9)
                   1694: //#define MCI_DEVTYPE_WAVEFORM_AUDIO      (MCI_STRING_OFFSET + 10)
                   1695: //#define MCI_DEVTYPE_SEQUENCER           (MCI_STRING_OFFSET + 11)
                   1696: 
                   1697: // Constant values are used because RC does not like the parentheses
                   1698: #define MCI_DEVTYPE_VCR                 513
                   1699: #define MCI_DEVTYPE_VIDEODISC           514
                   1700: #define MCI_DEVTYPE_OVERLAY             515
                   1701: #define MCI_DEVTYPE_CD_AUDIO            516
                   1702: #define MCI_DEVTYPE_DAT                 517
                   1703: #define MCI_DEVTYPE_SCANNER             518
                   1704: #define MCI_DEVTYPE_ANIMATION           519
                   1705: #define MCI_DEVTYPE_DIGITAL_VIDEO       520
                   1706: #define MCI_DEVTYPE_OTHER               521
                   1707: #define MCI_DEVTYPE_WAVEFORM_AUDIO      522
                   1708: #define MCI_DEVTYPE_SEQUENCER           523
                   1709: 
                   1710: #define MCI_DEVTYPE_FIRST               MCI_DEVTYPE_VCR
                   1711: #define MCI_DEVTYPE_LAST                MCI_DEVTYPE_SEQUENCER
                   1712: 
                   1713: 
                   1714: #define MCI_DEVTYPE_FIRST_USER          0x1000
                   1715: 
                   1716: // return values for 'status mode' command
                   1717: #define MCI_MODE_NOT_READY              (MCI_STRING_OFFSET + 12)
                   1718: #define MCI_MODE_STOP                   (MCI_STRING_OFFSET + 13)
                   1719: #define MCI_MODE_PLAY                   (MCI_STRING_OFFSET + 14)
                   1720: #define MCI_MODE_RECORD                 (MCI_STRING_OFFSET + 15)
                   1721: #define MCI_MODE_SEEK                   (MCI_STRING_OFFSET + 16)
                   1722: #define MCI_MODE_PAUSE                  (MCI_STRING_OFFSET + 17)
                   1723: #define MCI_MODE_OPEN                   (MCI_STRING_OFFSET + 18)
                   1724: 
                   1725: // constants used in 'set time format' and 'status time format' commands
                   1726: // These are not based on MCI_FORMATS_OFFSET because of resource
                   1727: // compiler limitations
                   1728: #define MCI_FORMAT_MILLISECONDS         0
                   1729: #define MCI_FORMAT_HMS                  1
                   1730: #define MCI_FORMAT_MSF                  2
                   1731: #define MCI_FORMAT_FRAMES               3
                   1732: #define MCI_FORMAT_SMPTE_24             4
                   1733: #define MCI_FORMAT_SMPTE_25             5
                   1734: #define MCI_FORMAT_SMPTE_30             6
                   1735: #define MCI_FORMAT_SMPTE_30DROP         7
                   1736: #define MCI_FORMAT_BYTES                8
                   1737: #define MCI_FORMAT_SAMPLES              9
                   1738: #define MCI_FORMAT_TMSF                 10
                   1739: 
                   1740: // MCI time format conversion macros
                   1741: // Note that these macros are byte-sex dependent as the SMPT format gives
                   1742: // the layout in storage that's wanted.
                   1743: #define MCI_MSF_MINUTE(msf)             ((BYTE)(msf))
                   1744: #define MCI_MSF_SECOND(msf)             ((BYTE)(((WORD)(msf)) >> 8))
                   1745: #define MCI_MSF_FRAME(msf)              ((BYTE)((msf)>>16))
                   1746: 
                   1747: #define MCI_MAKE_MSF(m, s, f)           ((DWORD)(((BYTE)(m) | \
                   1748:                                                   ((WORD)(s)<<8)) | \
                   1749:                                                  (((DWORD)(BYTE)(f))<<16)))
                   1750: 
                   1751: #define MCI_TMSF_TRACK(tmsf)            ((BYTE)(tmsf))
                   1752: #define MCI_TMSF_MINUTE(tmsf)           ((BYTE)(((WORD)(tmsf)) >> 8))
                   1753: #define MCI_TMSF_SECOND(tmsf)           ((BYTE)((tmsf)>>16))
                   1754: #define MCI_TMSF_FRAME(tmsf)            ((BYTE)((tmsf)>>24))
                   1755: 
                   1756: #define MCI_MAKE_TMSF(t, m, s, f)       ( (DWORD)( ( (BYTE)(t)            \
                   1757:                                                    | ( (WORD)(m) << 8 )   \
                   1758:                                                    )                      \
                   1759:                                                  | ( ( (DWORD)(BYTE)(s)   \
                   1760:                                                      | ( (WORD)(f) <<8 )  \
                   1761:                                                      )                    \
                   1762:                                                    << 16                  \
                   1763:                                                    )                      \
                   1764:                                                  )                        \
                   1765:                                         )
                   1766: 
                   1767: #define MCI_HMS_HOUR(hms)               ((BYTE)(hms))
                   1768: #define MCI_HMS_MINUTE(hms)             ((BYTE)(((WORD)(hms)) >> 8))
                   1769: #define MCI_HMS_SECOND(hms)             ((BYTE)((hms)>>16))
                   1770: 
                   1771: #define MCI_MAKE_HMS(h, m, s)           ( (DWORD)( ( (BYTE)(h)            \
                   1772:                                                    | ( (WORD)(m) <<8 )    \
                   1773:                                                    )                      \
                   1774:                                                  | ( ( (DWORD)(BYTE)(s) ) \
                   1775:                                                    <<16                   \
                   1776:                                                    )                      \
                   1777:                                                  )                        \
                   1778:                                         )
                   1779: 
                   1780: 
                   1781: 
                   1782: /* Flags for wParam of the MM_MCINOTIFY message */
                   1783: #define MCI_NOTIFY_SUCCESSFUL           0x0001
                   1784: #define MCI_NOTIFY_SUPERSEDED           0x0002
                   1785: #define MCI_NOTIFY_ABORTED              0x0004
                   1786: #define MCI_NOTIFY_FAILURE              0x0008
                   1787: 
                   1788: // NOTE: All flags must have an "L" suffix in order to be parsed as
                   1789: // DWORDs by the resource compiler
                   1790: 
                   1791: // common flags for dwFlags parameter of MCI command messages
                   1792: #define MCI_NOTIFY                      0x00000001L
                   1793: #define MCI_WAIT                        0x00000002L
                   1794: #define MCI_FROM                        0x00000004L
                   1795: #define MCI_TO                          0x00000008L
                   1796: #define MCI_TRACK                       0x00000010L
                   1797: 
                   1798: // flags for dwFlags parameter of MCI_OPEN command message
                   1799: #define MCI_OPEN_SHAREABLE              0x00000100L
                   1800: #define MCI_OPEN_ELEMENT                0x00000200L
                   1801: #define MCI_OPEN_ALIAS                  0x00000400L
                   1802: #define MCI_OPEN_ELEMENT_ID             0x00000800L
                   1803: #define MCI_OPEN_TYPE_ID                0x00001000L
                   1804: #define MCI_OPEN_TYPE                   0x00002000L
                   1805: 
                   1806: // flags for dwFlags parameter of MCI_SEEK command message
                   1807: #define MCI_SEEK_TO_START               0x00000100L
                   1808: #define MCI_SEEK_TO_END                 0x00000200L
                   1809: 
                   1810: // flags for dwFlags parameter of MCI_STATUS command message
                   1811: #define MCI_STATUS_ITEM                 0x00000100L
                   1812: #define MCI_STATUS_START                0x00000200L
                   1813: 
                   1814: // flags for dwItem field of the MCI_STATUS_PARMS parameter block
                   1815: #define MCI_STATUS_LENGTH               0x00000001L
                   1816: #define MCI_STATUS_POSITION             0x00000002L
                   1817: #define MCI_STATUS_NUMBER_OF_TRACKS     0x00000003L
                   1818: #define MCI_STATUS_MODE                 0x00000004L
                   1819: #define MCI_STATUS_MEDIA_PRESENT        0x00000005L
                   1820: #define MCI_STATUS_TIME_FORMAT          0x00000006L
                   1821: #define MCI_STATUS_READY                0x00000007L
                   1822: #define MCI_STATUS_CURRENT_TRACK        0x00000008L
                   1823: 
                   1824: // flags for dwFlags parameter of MCI_INFO command message
                   1825: #define MCI_INFO_PRODUCT                0x00000100L
                   1826: #define MCI_INFO_FILE                   0x00000200L
                   1827: 
                   1828: // flags for dwFlags parameter of MCI_GETDEVCAPS command message
                   1829: #define MCI_GETDEVCAPS_ITEM             0x00000100L
                   1830: 
                   1831: // flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block
                   1832: #define MCI_GETDEVCAPS_CAN_RECORD       0x00000001L
                   1833: #define MCI_GETDEVCAPS_HAS_AUDIO        0x00000002L
                   1834: #define MCI_GETDEVCAPS_HAS_VIDEO        0x00000003L
                   1835: #define MCI_GETDEVCAPS_DEVICE_TYPE      0x00000004L
                   1836: #define MCI_GETDEVCAPS_USES_FILES       0x00000005L
                   1837: #define MCI_GETDEVCAPS_COMPOUND_DEVICE  0x00000006L
                   1838: #define MCI_GETDEVCAPS_CAN_EJECT        0x00000007L
                   1839: #define MCI_GETDEVCAPS_CAN_PLAY         0x00000008L
                   1840: #define MCI_GETDEVCAPS_CAN_SAVE         0x00000009L
                   1841: 
                   1842: // flags for dwFlags parameter of MCI_SYSINFO command message
                   1843: #define MCI_SYSINFO_QUANTITY            0x00000100L
                   1844: #define MCI_SYSINFO_OPEN                0x00000200L
                   1845: #define MCI_SYSINFO_NAME                0x00000400L
                   1846: #define MCI_SYSINFO_INSTALLNAME         0x00000800L
                   1847: 
                   1848: // flags for dwFlags parameter of MCI_SET command message
                   1849: #define MCI_SET_DOOR_OPEN               0x00000100L
                   1850: #define MCI_SET_DOOR_CLOSED             0x00000200L
                   1851: #define MCI_SET_TIME_FORMAT             0x00000400L
                   1852: #define MCI_SET_AUDIO                   0x00000800L
                   1853: #define MCI_SET_VIDEO                   0x00001000L
                   1854: #define MCI_SET_ON                      0x00002000L
                   1855: #define MCI_SET_OFF                     0x00004000L
                   1856: 
                   1857: // flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS
                   1858: #define MCI_SET_AUDIO_ALL               0x00004001L
                   1859: #define MCI_SET_AUDIO_LEFT              0x00004002L
                   1860: #define MCI_SET_AUDIO_RIGHT             0x00004003L
                   1861: 
                   1862: // flags for dwFlags parameter of MCI_BREAK command message
                   1863: #define MCI_BREAK_KEY                   0x00000100L
                   1864: #define MCI_BREAK_HWND                  0x00000200L
                   1865: #define MCI_BREAK_OFF                   0x00000400L
                   1866: 
                   1867: // flags for dwFlags parameter of MCI_RECORD command message
                   1868: #define MCI_RECORD_INSERT               0x00000100L
                   1869: #define MCI_RECORD_OVERWRITE            0x00000200L
                   1870: 
                   1871: // flags for dwFlags parameter of MCI_SOUND command message
                   1872: #define MCI_SOUND_NAME                  0x00000100L
                   1873: 
                   1874: // flags for dwFlags parameter of MCI_SAVE command message
                   1875: #define MCI_SAVE_FILE                   0x00000100L
                   1876: 
                   1877: // flags for dwFlags parameter of MCI_LOAD command message
                   1878: #define MCI_LOAD_FILE                   0x00000100L
                   1879: 
                   1880: /* Note that some structures below do not have all the fields of the
                   1881: // corresponding Win 3.1 structures.  Some reserved WORD sized fields
                   1882: // have disappeared.  This is deliberate.  The structures are the same
                   1883: // size (with one exception which is two bytes longer).
                   1884: //
                   1885: // The FIRST entry in each structure must be dwCallback.  A large union
                   1886: // could be defined... but...
                   1887: */
                   1888: 
                   1889: // generic parameter block for MCI command messages with no special parameters
                   1890: typedef struct tagMCI_GENERIC_PARMS {
                   1891:     DWORD   dwCallback;
                   1892: } MCI_GENERIC_PARMS;
                   1893: typedef MCI_GENERIC_PARMS     *PMCI_GENERIC_PARMS;
                   1894: typedef MCI_GENERIC_PARMS     *LPMCI_GENERIC_PARMS;
                   1895: 
1.1.1.2   root     1896: // parameter block for MCI_OPEN command message
1.1       root     1897: typedef struct tagMCI_OPEN_PARMSA {
                   1898:     DWORD   dwCallback;
                   1899:     MCIDEVICEID wDeviceID;
1.1.1.2   root     1900:     LPCSTR     lpstrDeviceType;
                   1901:     LPCSTR     lpstrElementName;
                   1902:     LPCSTR     lpstrAlias;
1.1       root     1903: } MCI_OPEN_PARMSA;
1.1.1.2   root     1904: // parameter block for MCI_OPEN command message
1.1       root     1905: typedef struct tagMCI_OPEN_PARMSW {
                   1906:     DWORD   dwCallback;
                   1907:     MCIDEVICEID wDeviceID;
1.1.1.2   root     1908:     LPCWSTR    lpstrDeviceType;
                   1909:     LPCWSTR    lpstrElementName;
                   1910:     LPCWSTR    lpstrAlias;
1.1       root     1911: } MCI_OPEN_PARMSW;
1.1.1.2   root     1912: #ifdef UNICODE
1.1.1.3 ! root     1913: typedef MCI_OPEN_PARMSW MCI_OPEN_PARMS;
1.1.1.2   root     1914: #else
1.1.1.3 ! root     1915: typedef MCI_OPEN_PARMSA MCI_OPEN_PARMS;
1.1.1.2   root     1916: #endif // UNICODE
                   1917: typedef MCI_OPEN_PARMSA     *PMCI_OPEN_PARMSA;
1.1       root     1918: typedef MCI_OPEN_PARMSW     *PMCI_OPEN_PARMSW;
1.1.1.2   root     1919: #ifdef UNICODE
1.1.1.3 ! root     1920: typedef PMCI_OPEN_PARMSW PMCI_OPEN_PARMS;
1.1.1.2   root     1921: #else
1.1.1.3 ! root     1922: typedef PMCI_OPEN_PARMSA PMCI_OPEN_PARMS;
1.1.1.2   root     1923: #endif // UNICODE
                   1924: typedef MCI_OPEN_PARMSA     *LPMCI_OPEN_PARMSA;
1.1       root     1925: typedef MCI_OPEN_PARMSW     *LPMCI_OPEN_PARMSW;
                   1926: #ifdef UNICODE
1.1.1.3 ! root     1927: typedef LPMCI_OPEN_PARMSW LPMCI_OPEN_PARMS;
1.1.1.2   root     1928: #else
1.1.1.3 ! root     1929: typedef LPMCI_OPEN_PARMSA LPMCI_OPEN_PARMS;
1.1.1.2   root     1930: #endif // UNICODE
1.1       root     1931: 
                   1932: // parameter block for MCI_PLAY command message
                   1933: typedef struct tagMCI_PLAY_PARMS {
                   1934:     DWORD   dwCallback;
                   1935:     DWORD   dwFrom;
                   1936:     DWORD   dwTo;
                   1937: } MCI_PLAY_PARMS;
                   1938: typedef MCI_PLAY_PARMS     *PMCI_PLAY_PARMS;
                   1939: typedef MCI_PLAY_PARMS     *LPMCI_PLAY_PARMS;
                   1940: 
                   1941: // parameter block for MCI_SEEK command message
                   1942: typedef struct tagMCI_SEEK_PARMS {
                   1943:     DWORD   dwCallback;
                   1944:     DWORD   dwTo;
                   1945: } MCI_SEEK_PARMS;
                   1946: typedef MCI_SEEK_PARMS     *PMCI_SEEK_PARMS;
                   1947: typedef MCI_SEEK_PARMS     *LPMCI_SEEK_PARMS;
                   1948: 
                   1949: // parameter block for MCI_STATUS command message
                   1950: typedef struct tagMCI_STATUS_PARMS {
                   1951:     DWORD   dwCallback;
                   1952:     DWORD   dwReturn;
                   1953:     DWORD   dwItem;
                   1954:     DWORD   dwTrack;
                   1955: } MCI_STATUS_PARMS;
                   1956: typedef MCI_STATUS_PARMS     * PMCI_STATUS_PARMS;
                   1957: typedef MCI_STATUS_PARMS     * LPMCI_STATUS_PARMS;
                   1958: 
1.1.1.2   root     1959: // parameter block for MCI_INFO command message
1.1       root     1960: typedef struct tagMCI_INFO_PARMSA {
                   1961:     DWORD   dwCallback;
                   1962:     LPSTR   lpstrReturn;
                   1963:     DWORD   dwRetSize;
                   1964: } MCI_INFO_PARMSA;
1.1.1.2   root     1965: // parameter block for MCI_INFO command message
1.1       root     1966: typedef struct tagMCI_INFO_PARMSW {
                   1967:     DWORD   dwCallback;
1.1.1.2   root     1968:     LPWSTR  lpstrReturn;
1.1       root     1969:     DWORD   dwRetSize;
                   1970: } MCI_INFO_PARMSW;
1.1.1.2   root     1971: #ifdef UNICODE
1.1.1.3 ! root     1972: typedef MCI_INFO_PARMSW MCI_INFO_PARMS;
1.1.1.2   root     1973: #else
1.1.1.3 ! root     1974: typedef MCI_INFO_PARMSA MCI_INFO_PARMS;
1.1.1.2   root     1975: #endif // UNICODE
                   1976: typedef MCI_INFO_PARMSA     * PMCI_INFO_PARMSA;
1.1       root     1977: typedef MCI_INFO_PARMSW     * PMCI_INFO_PARMSW;
1.1.1.2   root     1978: #ifdef UNICODE
1.1.1.3 ! root     1979: typedef PMCI_INFO_PARMSW PMCI_INFO_PARMS;
1.1.1.2   root     1980: #else
1.1.1.3 ! root     1981: typedef PMCI_INFO_PARMSA PMCI_INFO_PARMS;
1.1.1.2   root     1982: #endif // UNICODE
                   1983: typedef MCI_INFO_PARMSA     * LPMCI_INFO_PARMSA;
1.1       root     1984: typedef MCI_INFO_PARMSW     * LPMCI_INFO_PARMSW;
                   1985: #ifdef UNICODE
1.1.1.3 ! root     1986: typedef LPMCI_INFO_PARMSW LPMCI_INFO_PARMS;
1.1.1.2   root     1987: #else
1.1.1.3 ! root     1988: typedef LPMCI_INFO_PARMSA LPMCI_INFO_PARMS;
1.1.1.2   root     1989: #endif // UNICODE
1.1       root     1990: 
                   1991: // parameter block for MCI_GETDEVCAPS command message
                   1992: typedef struct tagMCI_GETDEVCAPS_PARMS {
                   1993:     DWORD   dwCallback;
                   1994:     DWORD   dwReturn;
                   1995:     DWORD   dwItem;
                   1996: } MCI_GETDEVCAPS_PARMS;
                   1997: typedef MCI_GETDEVCAPS_PARMS     * PMCI_GETDEVCAPS_PARMS;
                   1998: typedef MCI_GETDEVCAPS_PARMS     * LPMCI_GETDEVCAPS_PARMS;
                   1999: 
1.1.1.2   root     2000: // parameter block for MCI_SYSINFO command message
1.1       root     2001: typedef struct tagMCI_SYSINFO_PARMSA {
                   2002:     DWORD   dwCallback;
                   2003:     LPSTR   lpstrReturn;
                   2004:     DWORD   dwRetSize;
                   2005:     DWORD   dwNumber;
                   2006:     UINT    wDeviceType;
                   2007: } MCI_SYSINFO_PARMSA;
1.1.1.2   root     2008: // parameter block for MCI_SYSINFO command message
1.1       root     2009: typedef struct tagMCI_SYSINFO_PARMSW {
                   2010:     DWORD   dwCallback;
                   2011:     LPWSTR  lpstrReturn;
                   2012:     DWORD   dwRetSize;
                   2013:     DWORD   dwNumber;
                   2014:     UINT    wDeviceType;
                   2015: } MCI_SYSINFO_PARMSW;
1.1.1.2   root     2016: #ifdef UNICODE
1.1.1.3 ! root     2017: typedef MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS;
1.1.1.2   root     2018: #else
1.1.1.3 ! root     2019: typedef MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS;
1.1.1.2   root     2020: #endif // UNICODE
                   2021: typedef MCI_SYSINFO_PARMSA     *PMCI_SYSINFO_PARMSA;
1.1       root     2022: typedef MCI_SYSINFO_PARMSW     *PMCI_SYSINFO_PARMSW;
1.1.1.2   root     2023: #ifdef UNICODE
1.1.1.3 ! root     2024: typedef PMCI_SYSINFO_PARMSW PMCI_SYSINFO_PARMS;
1.1.1.2   root     2025: #else
1.1.1.3 ! root     2026: typedef PMCI_SYSINFO_PARMSA PMCI_SYSINFO_PARMS;
1.1.1.2   root     2027: #endif // UNICODE
                   2028: typedef MCI_SYSINFO_PARMSA     *LPMCI_SYSINFO_PARMSA;
1.1       root     2029: typedef MCI_SYSINFO_PARMSW     *LPMCI_SYSINFO_PARMSW;
                   2030: #ifdef UNICODE
1.1.1.3 ! root     2031: typedef LPMCI_SYSINFO_PARMSW LPMCI_SYSINFO_PARMS;
1.1.1.2   root     2032: #else
1.1.1.3 ! root     2033: typedef LPMCI_SYSINFO_PARMSA LPMCI_SYSINFO_PARMS;
1.1.1.2   root     2034: #endif // UNICODE
1.1       root     2035: 
                   2036: // parameter block for MCI_SET command message
                   2037: typedef struct tagMCI_SET_PARMS {
                   2038:     DWORD   dwCallback;
                   2039:     DWORD   dwTimeFormat;
                   2040:     DWORD   dwAudio;
                   2041: } MCI_SET_PARMS;
                   2042: typedef MCI_SET_PARMS     *PMCI_SET_PARMS;
                   2043: typedef MCI_SET_PARMS     *LPMCI_SET_PARMS;
                   2044: 
                   2045: // parameter block for MCI_BREAK command message
                   2046: typedef struct tagMCI_BREAK_PARMS {
                   2047:     DWORD   dwCallback;
                   2048:     int     nVirtKey;
                   2049:     HWND    hwndBreak;
                   2050: } MCI_BREAK_PARMS;
                   2051: typedef MCI_BREAK_PARMS     * PMCI_BREAK_PARMS;
                   2052: typedef MCI_BREAK_PARMS     * LPMCI_BREAK_PARMS;
                   2053: 
1.1.1.2   root     2054: // parameter block for MCI_SOUND command message
1.1       root     2055: typedef struct tagMCI_SOUND_PARMSA {
                   2056:     DWORD   dwCallback;
1.1.1.2   root     2057:     LPCSTR   lpstrSoundName;
1.1       root     2058: } MCI_SOUND_PARMSA;
1.1.1.2   root     2059: // parameter block for MCI_SOUND command message
1.1       root     2060: typedef struct tagMCI_SOUND_PARMSW {
                   2061:     DWORD   dwCallback;
1.1.1.2   root     2062:     LPCWSTR  lpstrSoundName;
1.1       root     2063: } MCI_SOUND_PARMSW;
1.1.1.2   root     2064: #ifdef UNICODE
1.1.1.3 ! root     2065: typedef MCI_SOUND_PARMSW MCI_SOUND_PARMS;
1.1.1.2   root     2066: #else
1.1.1.3 ! root     2067: typedef MCI_SOUND_PARMSA MCI_SOUND_PARMS;
1.1.1.2   root     2068: #endif // UNICODE
                   2069: typedef MCI_SOUND_PARMSA     *PMCI_SOUND_PARMSA;
1.1       root     2070: typedef MCI_SOUND_PARMSW     *PMCI_SOUND_PARMSW;
1.1.1.2   root     2071: #ifdef UNICODE
1.1.1.3 ! root     2072: typedef PMCI_SOUND_PARMSW PMCI_SOUND_PARMS;
1.1.1.2   root     2073: #else
1.1.1.3 ! root     2074: typedef PMCI_SOUND_PARMSA PMCI_SOUND_PARMS;
1.1.1.2   root     2075: #endif // UNICODE
                   2076: typedef MCI_SOUND_PARMSA     *LPMCI_SOUND_PARMSA;
1.1       root     2077: typedef MCI_SOUND_PARMSW     *LPMCI_SOUND_PARMSW;
                   2078: #ifdef UNICODE
1.1.1.3 ! root     2079: typedef LPMCI_SOUND_PARMSW LPMCI_SOUND_PARMS;
1.1.1.2   root     2080: #else
1.1.1.3 ! root     2081: typedef LPMCI_SOUND_PARMSA LPMCI_SOUND_PARMS;
1.1.1.2   root     2082: #endif // UNICODE
1.1       root     2083: 
1.1.1.2   root     2084: // parameter block for MCI_SAVE command message
1.1       root     2085: typedef struct tagMCI_SAVE_PARMSA {
1.1.1.2   root     2086:     DWORD    dwCallback;
                   2087:     LPCSTR    lpfilename;
1.1       root     2088: } MCI_SAVE_PARMSA;
1.1.1.2   root     2089: // parameter block for MCI_SAVE command message
1.1       root     2090: typedef struct tagMCI_SAVE_PARMSW {
                   2091:     DWORD    dwCallback;
1.1.1.2   root     2092:     LPCWSTR   lpfilename;
1.1       root     2093: } MCI_SAVE_PARMSW;
1.1.1.2   root     2094: #ifdef UNICODE
1.1.1.3 ! root     2095: typedef MCI_SAVE_PARMSW MCI_SAVE_PARMS;
1.1.1.2   root     2096: #else
1.1.1.3 ! root     2097: typedef MCI_SAVE_PARMSA MCI_SAVE_PARMS;
1.1.1.2   root     2098: #endif // UNICODE
                   2099: typedef MCI_SAVE_PARMSA     *PMCI_SAVE_PARMSA;
1.1       root     2100: typedef MCI_SAVE_PARMSW     *PMCI_SAVE_PARMSW;
1.1.1.2   root     2101: #ifdef UNICODE
1.1.1.3 ! root     2102: typedef PMCI_SAVE_PARMSW PMCI_SAVE_PARMS;
1.1.1.2   root     2103: #else
1.1.1.3 ! root     2104: typedef PMCI_SAVE_PARMSA PMCI_SAVE_PARMS;
1.1.1.2   root     2105: #endif // UNICODE
                   2106: typedef MCI_SAVE_PARMSA     *LPMCI_SAVE_PARMSA;
1.1       root     2107: typedef MCI_SAVE_PARMSW     *LPMCI_SAVE_PARMSW;
                   2108: #ifdef UNICODE
1.1.1.3 ! root     2109: typedef LPMCI_SAVE_PARMSW LPMCI_SAVE_PARMS;
1.1.1.2   root     2110: #else
1.1.1.3 ! root     2111: typedef LPMCI_SAVE_PARMSA LPMCI_SAVE_PARMS;
1.1.1.2   root     2112: #endif // UNICODE
1.1       root     2113: 
1.1.1.2   root     2114: // parameter block for MCI_LOAD command message
1.1       root     2115: typedef struct tagMCI_LOAD_PARMSA {
                   2116:     DWORD   dwCallback;
1.1.1.2   root     2117:     LPCSTR   lpfilename;
1.1       root     2118: } MCI_LOAD_PARMSA;
1.1.1.2   root     2119: // parameter block for MCI_LOAD command message
1.1       root     2120: typedef struct tagMCI_LOAD_PARMSW {
                   2121:     DWORD   dwCallback;
1.1.1.2   root     2122:     LPCWSTR  lpfilename;
1.1       root     2123: } MCI_LOAD_PARMSW;
1.1.1.2   root     2124: #ifdef UNICODE
1.1.1.3 ! root     2125: typedef MCI_LOAD_PARMSW MCI_LOAD_PARMS;
1.1.1.2   root     2126: #else
1.1.1.3 ! root     2127: typedef MCI_LOAD_PARMSA MCI_LOAD_PARMS;
1.1.1.2   root     2128: #endif // UNICODE
                   2129: typedef MCI_LOAD_PARMSA     *PMCI_LOAD_PARMSA;
1.1       root     2130: typedef MCI_LOAD_PARMSW     *PMCI_LOAD_PARMSW;
1.1.1.2   root     2131: #ifdef UNICODE
1.1.1.3 ! root     2132: typedef PMCI_LOAD_PARMSW PMCI_LOAD_PARMS;
1.1.1.2   root     2133: #else
1.1.1.3 ! root     2134: typedef PMCI_LOAD_PARMSA PMCI_LOAD_PARMS;
1.1.1.2   root     2135: #endif // UNICODE
                   2136: typedef MCI_LOAD_PARMSA     *LPMCI_LOAD_PARMSA;
1.1       root     2137: typedef MCI_LOAD_PARMSW     *LPMCI_LOAD_PARMSW;
                   2138: #ifdef UNICODE
1.1.1.3 ! root     2139: typedef LPMCI_LOAD_PARMSW LPMCI_LOAD_PARMS;
1.1.1.2   root     2140: #else
1.1.1.3 ! root     2141: typedef LPMCI_LOAD_PARMSA LPMCI_LOAD_PARMS;
1.1.1.2   root     2142: #endif // UNICODE
1.1       root     2143: 
                   2144: // parameter block for MCI_RECORD command message
                   2145: typedef struct tagMCI_RECORD_PARMS {
                   2146:     DWORD   dwCallback;
                   2147:     DWORD   dwFrom;
                   2148:     DWORD   dwTo;
                   2149: } MCI_RECORD_PARMS;
                   2150: typedef MCI_RECORD_PARMS     *PMCI_RECORD_PARMS;
                   2151: typedef MCI_RECORD_PARMS     *LPMCI_RECORD_PARMS;
                   2152: 
                   2153: /*****************************************************************************
                   2154: *    Standard command parameters for videodisc drivers                       *
                   2155: *****************************************************************************/
                   2156: 
                   2157: // string resource ID's for videodisc players
                   2158: // return ID's for videodisc status command
                   2159: // flag for dwReturn field of MCI_STATUS_PARMS
                   2160: // MCI_STATUS command, (dwItem == MCI_STATUS_MODE)
                   2161: #define MCI_VD_MODE_PARK                (MCI_VD_OFFSET + 1)
                   2162: 
                   2163: // return ID's for videodisc MCI_GETDEVCAPS command
                   2164: 
                   2165: // flag for dwReturn field of MCI_STATUS_PARMS
                   2166: // MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE)
                   2167: #define MCI_VD_MEDIA_CLV                (MCI_VD_OFFSET + 2)
                   2168: #define MCI_VD_MEDIA_CAV                (MCI_VD_OFFSET + 3)
                   2169: #define MCI_VD_MEDIA_OTHER              (MCI_VD_OFFSET + 4)
                   2170: 
                   2171: #define MCI_VD_FORMAT_TRACK             0x4001
                   2172: 
                   2173: // flags for dwFlags parameter of MCI_PLAY command message
                   2174: #define MCI_VD_PLAY_REVERSE             0x00010000L
                   2175: #define MCI_VD_PLAY_FAST                0x00020000L
                   2176: #define MCI_VD_PLAY_SPEED               0x00040000L
                   2177: #define MCI_VD_PLAY_SCAN                0x00080000L
                   2178: #define MCI_VD_PLAY_SLOW                0x00100000L
                   2179: 
                   2180: // flag for dwFlags parameter of MCI_SEEK command message
                   2181: #define MCI_VD_SEEK_REVERSE             0x00010000L
                   2182: 
                   2183: // flags for dwItem field of MCI_STATUS_PARMS parameter block
                   2184: #define MCI_VD_STATUS_SPEED             0x00004002L
                   2185: #define MCI_VD_STATUS_FORWARD           0x00004003L
                   2186: #define MCI_VD_STATUS_MEDIA_TYPE        0x00004004L
                   2187: #define MCI_VD_STATUS_SIDE              0x00004005L
                   2188: #define MCI_VD_STATUS_DISC_SIZE         0x00004006L
                   2189: 
                   2190: // flags for dwFlags parameter of MCI_GETDEVCAPS command message
                   2191: #define MCI_VD_GETDEVCAPS_CLV           0x00010000L
                   2192: #define MCI_VD_GETDEVCAPS_CAV           0x00020000L
                   2193: 
                   2194: #define MCI_VD_SPIN_UP                  0x00010000L
                   2195: #define MCI_VD_SPIN_DOWN                0x00020000L
                   2196: 
                   2197: // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
                   2198: #define MCI_VD_GETDEVCAPS_CAN_REVERSE   0x00004002L
                   2199: #define MCI_VD_GETDEVCAPS_FAST_RATE     0x00004003L
                   2200: #define MCI_VD_GETDEVCAPS_SLOW_RATE     0x00004004L
                   2201: #define MCI_VD_GETDEVCAPS_NORMAL_RATE   0x00004005L
                   2202: 
                   2203: // flags for the dwFlags parameter of MCI_STEP command message
                   2204: #define MCI_VD_STEP_FRAMES              0x00010000L
                   2205: #define MCI_VD_STEP_REVERSE             0x00020000L
                   2206: 
                   2207: // flag for the MCI_ESCAPE command message
                   2208: #define MCI_VD_ESCAPE_STRING            0x00000100L
                   2209: 
                   2210: // parameter block for MCI_PLAY command message
                   2211: typedef struct tagMCI_VD_PLAY_PARMS {
                   2212:     DWORD   dwCallback;
                   2213:     DWORD   dwFrom;
                   2214:     DWORD   dwTo;
                   2215:     DWORD   dwSpeed;
                   2216: } MCI_VD_PLAY_PARMS;
                   2217: typedef MCI_VD_PLAY_PARMS     *PMCI_VD_PLAY_PARMS;
                   2218: typedef MCI_VD_PLAY_PARMS     *LPMCI_VD_PLAY_PARMS;
                   2219: 
                   2220: // parameter block for MCI_STEP command message
                   2221: typedef struct tagMCI_VD_STEP_PARMS {
                   2222:     DWORD   dwCallback;
                   2223:     DWORD   dwFrames;
                   2224: } MCI_VD_STEP_PARMS;
                   2225: typedef MCI_VD_STEP_PARMS     *PMCI_VD_STEP_PARMS;
                   2226: typedef MCI_VD_STEP_PARMS     *LPMCI_VD_STEP_PARMS;
                   2227: 
1.1.1.2   root     2228: // parameter block for MCI_ESCAPE command message
1.1       root     2229: typedef struct tagMCI_VD_ESCAPE_PARMSA {
                   2230:     DWORD   dwCallback;
1.1.1.2   root     2231:     LPCSTR    lpstrCommand;
1.1       root     2232: } MCI_VD_ESCAPE_PARMSA;
1.1.1.2   root     2233: // parameter block for MCI_ESCAPE command message
1.1       root     2234: typedef struct tagMCI_VD_ESCAPE_PARMSW {
                   2235:     DWORD   dwCallback;
                   2236:     LPCWSTR   lpstrCommand;
                   2237: } MCI_VD_ESCAPE_PARMSW;
1.1.1.2   root     2238: #ifdef UNICODE
1.1.1.3 ! root     2239: typedef MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2240: #else
1.1.1.3 ! root     2241: typedef MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2242: #endif // UNICODE
                   2243: typedef MCI_VD_ESCAPE_PARMSA     *PMCI_VD_ESCAPE_PARMSA;
1.1       root     2244: typedef MCI_VD_ESCAPE_PARMSW     *PMCI_VD_ESCAPE_PARMSW;
1.1.1.2   root     2245: #ifdef UNICODE
1.1.1.3 ! root     2246: typedef PMCI_VD_ESCAPE_PARMSW PMCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2247: #else
1.1.1.3 ! root     2248: typedef PMCI_VD_ESCAPE_PARMSA PMCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2249: #endif // UNICODE
                   2250: typedef MCI_VD_ESCAPE_PARMSA     *LPMCI_VD_ESCAPE_PARMSA;
1.1       root     2251: typedef MCI_VD_ESCAPE_PARMSW     *LPMCI_VD_ESCAPE_PARMSW;
                   2252: #ifdef UNICODE
1.1.1.3 ! root     2253: typedef LPMCI_VD_ESCAPE_PARMSW LPMCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2254: #else
1.1.1.3 ! root     2255: typedef LPMCI_VD_ESCAPE_PARMSA LPMCI_VD_ESCAPE_PARMS;
1.1.1.2   root     2256: #endif // UNICODE
1.1       root     2257: 
                   2258: /*****************************************************************************
                   2259: *   Standard command parameters for waveform audio drivers
                   2260: *****************************************************************************/
                   2261: 
                   2262: #define MCI_WAVE_PCM            (MCI_WAVE_OFFSET+0)
                   2263: #define MCI_WAVE_MAPPER         (MCI_WAVE_OFFSET+1)
                   2264: 
                   2265: // flags for the dwFlags parameter of MCI_OPEN command message
                   2266: #define MCI_WAVE_OPEN_BUFFER            0x00010000L
                   2267: 
                   2268: // flags for the dwFlags parameter of MCI_SET command message
                   2269: #define MCI_WAVE_SET_FORMATTAG          0x00010000L
                   2270: #define MCI_WAVE_SET_CHANNELS           0x00020000L
                   2271: #define MCI_WAVE_SET_SAMPLESPERSEC      0x00040000L
                   2272: #define MCI_WAVE_SET_AVGBYTESPERSEC     0x00080000L
                   2273: #define MCI_WAVE_SET_BLOCKALIGN         0x00100000L
                   2274: #define MCI_WAVE_SET_BITSPERSAMPLE      0x00200000L
                   2275: 
                   2276: // flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages
                   2277: #define MCI_WAVE_INPUT                  0x00400000L
                   2278: #define MCI_WAVE_OUTPUT                 0x00800000L
                   2279: 
                   2280: // flags for the dwItem field of MCI_STATUS_PARMS parameter block
                   2281: #define MCI_WAVE_STATUS_FORMATTAG       0x00004001L
                   2282: #define MCI_WAVE_STATUS_CHANNELS        0x00004002L
                   2283: #define MCI_WAVE_STATUS_SAMPLESPERSEC   0x00004003L
                   2284: #define MCI_WAVE_STATUS_AVGBYTESPERSEC  0x00004004L
                   2285: #define MCI_WAVE_STATUS_BLOCKALIGN      0x00004005L
                   2286: #define MCI_WAVE_STATUS_BITSPERSAMPLE   0x00004006L
                   2287: #define MCI_WAVE_STATUS_LEVEL           0x00004007L
                   2288: 
                   2289: // flags for the dwFlags parameter of MCI_SET command message
                   2290: #define MCI_WAVE_SET_ANYINPUT           0x04000000L
                   2291: #define MCI_WAVE_SET_ANYOUTPUT          0x08000000L
                   2292: 
                   2293: // flags for the dwFlags parameter of MCI_GETDEVCAPS command message
                   2294: #define MCI_WAVE_GETDEVCAPS_INPUTS      0x00004001L
                   2295: #define MCI_WAVE_GETDEVCAPS_OUTPUTS     0x00004002L
                   2296: 
1.1.1.2   root     2297: // parameter block for MCI_OPEN command message
1.1       root     2298: typedef struct tagMCI_WAVE_OPEN_PARMSA {
                   2299:     DWORD   dwCallback;
                   2300:     MCIDEVICEID wDeviceID;
1.1.1.2   root     2301:     LPCSTR    lpstrDeviceType;
                   2302:     LPCSTR    lpstrElementName;
                   2303:     LPCSTR    lpstrAlias;
1.1       root     2304:     DWORD   dwBufferSeconds;
                   2305: } MCI_WAVE_OPEN_PARMSA;
1.1.1.2   root     2306: // parameter block for MCI_OPEN command message
1.1       root     2307: typedef struct tagMCI_WAVE_OPEN_PARMSW {
                   2308:     DWORD   dwCallback;
                   2309:     MCIDEVICEID wDeviceID;
                   2310:     LPCWSTR   lpstrDeviceType;
                   2311:     LPCWSTR   lpstrElementName;
                   2312:     LPCWSTR   lpstrAlias;
                   2313:     DWORD   dwBufferSeconds;
                   2314: } MCI_WAVE_OPEN_PARMSW;
1.1.1.2   root     2315: #ifdef UNICODE
1.1.1.3 ! root     2316: typedef MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2317: #else
1.1.1.3 ! root     2318: typedef MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2319: #endif // UNICODE
                   2320: typedef MCI_WAVE_OPEN_PARMSA     *PMCI_WAVE_OPEN_PARMSA;
1.1       root     2321: typedef MCI_WAVE_OPEN_PARMSW     *PMCI_WAVE_OPEN_PARMSW;
1.1.1.2   root     2322: #ifdef UNICODE
1.1.1.3 ! root     2323: typedef PMCI_WAVE_OPEN_PARMSW PMCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2324: #else
1.1.1.3 ! root     2325: typedef PMCI_WAVE_OPEN_PARMSA PMCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2326: #endif // UNICODE
                   2327: typedef MCI_WAVE_OPEN_PARMSA     *LPMCI_WAVE_OPEN_PARMSA;
1.1       root     2328: typedef MCI_WAVE_OPEN_PARMSW     *LPMCI_WAVE_OPEN_PARMSW;
                   2329: #ifdef UNICODE
1.1.1.3 ! root     2330: typedef LPMCI_WAVE_OPEN_PARMSW LPMCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2331: #else
1.1.1.3 ! root     2332: typedef LPMCI_WAVE_OPEN_PARMSA LPMCI_WAVE_OPEN_PARMS;
1.1.1.2   root     2333: #endif // UNICODE
1.1       root     2334: 
                   2335: // parameter block for MCI_DELETE command message
                   2336: typedef struct tagMCI_WAVE_DELETE_PARMS {
                   2337:     DWORD   dwCallback;
                   2338:     DWORD   dwFrom;
                   2339:     DWORD   dwTo;
                   2340: } MCI_WAVE_DELETE_PARMS;
                   2341: typedef MCI_WAVE_DELETE_PARMS     *PMCI_WAVE_DELETE_PARMS;
                   2342: typedef MCI_WAVE_DELETE_PARMS     *LPMCI_WAVE_DELETE_PARMS;
                   2343: 
                   2344: // parameter block for MCI_SET command message
                   2345: typedef struct tagMCI_WAVE_SET_PARMS {
                   2346:     DWORD   dwCallback;
                   2347:     DWORD   dwTimeFormat;
                   2348:     DWORD   dwAudio;
                   2349:     UINT    wInput;
                   2350:     UINT    wOutput;
                   2351:     WORD    wFormatTag;                // corresponds to WAVEFORMAT structure
                   2352:     WORD    wReserved2;
                   2353:     WORD    nChannels;                 // corresponds to WAVEFORMAT structure
                   2354:     WORD    wReserved3;
                   2355:     DWORD   nSamplesPerSec;
                   2356:     DWORD   nAvgBytesPerSec;
                   2357:     WORD    nBlockAlign;               // corresponds to WAVEFORMAT structure
                   2358:     WORD    wReserved4;
                   2359:     WORD    wBitsPerSample;            // corresponds to PCMWAVEFORMAT structure
                   2360:     WORD    wReserved5;
                   2361: } MCI_WAVE_SET_PARMS;
                   2362: typedef MCI_WAVE_SET_PARMS     * PMCI_WAVE_SET_PARMS;
                   2363: typedef MCI_WAVE_SET_PARMS     * LPMCI_WAVE_SET_PARMS;
                   2364: 
                   2365: /*****************************************************************************
                   2366: *   Standard command parameters for CD audio drivers
                   2367: *****************************************************************************/
                   2368: 
                   2369: // None
                   2370: 
                   2371: /*****************************************************************************
                   2372: *        Standard command parameters for Sequencer drivers
                   2373: *****************************************************************************/
                   2374: 
                   2375: // string resource ID's for sequencers
                   2376: // return ids for status division type
                   2377: 
                   2378: // flags for the dwReturn field of MCI_STATUS_PARMS parameter block
                   2379: // MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE)
                   2380: #define     MCI_SEQ_DIV_PPQN              (0 + MCI_SEQ_OFFSET)
                   2381: #define     MCI_SEQ_DIV_SMPTE_24        (1 + MCI_SEQ_OFFSET)
                   2382: #define     MCI_SEQ_DIV_SMPTE_25        (2 + MCI_SEQ_OFFSET)
                   2383: #define     MCI_SEQ_DIV_SMPTE_30DROP    (3 + MCI_SEQ_OFFSET)
                   2384: #define     MCI_SEQ_DIV_SMPTE_30        (4 + MCI_SEQ_OFFSET)
                   2385: 
                   2386: // flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block
                   2387: // MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER)
                   2388: #define     MCI_SEQ_FORMAT_SONGPTR      0x4001
                   2389: #define     MCI_SEQ_FILE                0x4002
                   2390: #define     MCI_SEQ_MIDI                0x4003
                   2391: #define     MCI_SEQ_SMPTE               0x4004
                   2392: #define     MCI_SEQ_NONE                65533
                   2393: 
                   2394: #define     MCI_SEQ_MAPPER          65535
                   2395: 
                   2396: // flags for the dwItem field of MCI_STATUS_PARMS parameter block
                   2397: #define MCI_SEQ_STATUS_TEMPO              0x00004002L
                   2398: #define MCI_SEQ_STATUS_PORT              0x00004003L
                   2399: #define MCI_SEQ_STATUS_SLAVE             0x00004007L
                   2400: #define MCI_SEQ_STATUS_MASTER           0x00004008L
                   2401: #define MCI_SEQ_STATUS_OFFSET             0x00004009L
                   2402: #define MCI_SEQ_STATUS_DIVTYPE          0x0000400AL
                   2403: 
                   2404: // flags for the dwFlags parameter of MCI_SET command message
                   2405: #define MCI_SEQ_SET_TEMPO                 0x00010000L
                   2406: #define MCI_SEQ_SET_PORT                  0x00020000L
                   2407: #define MCI_SEQ_SET_SLAVE               0x00040000L
                   2408: #define MCI_SEQ_SET_MASTER              0x00080000L
                   2409: #define MCI_SEQ_SET_OFFSET                0x01000000L
                   2410: 
                   2411: // parameter block for MCI_SET command message
                   2412: typedef struct tagMCI_SEQ_SET_PARMS {
                   2413:     DWORD   dwCallback;
                   2414:     DWORD   dwTimeFormat;
                   2415:     DWORD   dwAudio;
                   2416:     DWORD   dwTempo;
                   2417:     DWORD   dwPort;
                   2418:     DWORD   dwSlave;
                   2419:     DWORD   dwMaster;
                   2420:     DWORD   dwOffset;
                   2421: } MCI_SEQ_SET_PARMS;
                   2422: typedef MCI_SEQ_SET_PARMS     * PMCI_SEQ_SET_PARMS;
                   2423: typedef MCI_SEQ_SET_PARMS     * LPMCI_SEQ_SET_PARMS;
                   2424: 
                   2425: /*****************************************************************************
                   2426: *      Standard command parameters for animation
                   2427: *****************************************************************************/
                   2428: 
                   2429: 
                   2430: // flags for dwFlags parameter of MCI_OPEN command message
                   2431: #define MCI_ANIM_OPEN_WS                0x00010000L
                   2432: #define MCI_ANIM_OPEN_PARENT            0x00020000L
                   2433: #define MCI_ANIM_OPEN_NOSTATIC          0x00040000L
                   2434: 
                   2435: // flags for dwFlags parameter of MCI_PLAY command message
                   2436: #define MCI_ANIM_PLAY_SPEED             0x00010000L
                   2437: #define MCI_ANIM_PLAY_REVERSE           0x00020000L
                   2438: #define MCI_ANIM_PLAY_FAST              0x00040000L
                   2439: #define MCI_ANIM_PLAY_SLOW              0x00080000L
                   2440: #define MCI_ANIM_PLAY_SCAN              0x00100000L
                   2441: 
                   2442: // flags for dwFlags parameter of MCI_STEP command message
                   2443: #define MCI_ANIM_STEP_REVERSE           0x00010000L
                   2444: #define MCI_ANIM_STEP_FRAMES            0x00020000L
                   2445: 
                   2446: // flags for dwItem field of MCI_STATUS_PARMS parameter block
                   2447: #define MCI_ANIM_STATUS_SPEED           0x00004001L
                   2448: #define MCI_ANIM_STATUS_FORWARD         0x00004002L
                   2449: #define MCI_ANIM_STATUS_HWND            0x00004003L
                   2450: #define MCI_ANIM_STATUS_HPAL            0x00004004L
                   2451: #define MCI_ANIM_STATUS_STRETCH         0x00004005L
                   2452: 
                   2453: // flags for the dwFlags parameter of MCI_INFO command message
                   2454: #define MCI_ANIM_INFO_TEXT              0x00010000L
                   2455: 
                   2456: // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
                   2457: #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
                   2458: #define MCI_ANIM_GETDEVCAPS_FAST_RATE   0x00004002L
                   2459: #define MCI_ANIM_GETDEVCAPS_SLOW_RATE   0x00004003L
                   2460: #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
                   2461: #define MCI_ANIM_GETDEVCAPS_PALETTES    0x00004006L
                   2462: #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
                   2463: #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
                   2464: 
                   2465: // flags for the MCI_REALIZE command message
                   2466: #define MCI_ANIM_REALIZE_NORM           0x00010000L
                   2467: #define MCI_ANIM_REALIZE_BKGD           0x00020000L
                   2468: 
                   2469: // flags for dwFlags parameter of MCI_WINDOW command message
                   2470: #define MCI_ANIM_WINDOW_HWND            0x00010000L
                   2471: #define MCI_ANIM_WINDOW_STATE           0x00040000L
                   2472: #define MCI_ANIM_WINDOW_TEXT            0x00080000L
                   2473: #define MCI_ANIM_WINDOW_ENABLE_STRETCH  0x00100000L
                   2474: #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
                   2475: 
                   2476: // flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block
                   2477: // MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND)
                   2478: #define MCI_ANIM_WINDOW_DEFAULT         0x00000000L
                   2479: 
                   2480: // flags for dwFlags parameter of MCI_PUT command message
                   2481: #define MCI_ANIM_RECT                   0x00010000L
                   2482: #define MCI_ANIM_PUT_SOURCE             0x00020000L  // also  MCI_WHERE
                   2483: #define MCI_ANIM_PUT_DESTINATION        0x00040000L  // also  MCI_WHERE
                   2484: 
                   2485: // flags for dwFlags parameter of MCI_WHERE command message
                   2486: #define MCI_ANIM_WHERE_SOURCE           0x00020000L
                   2487: #define MCI_ANIM_WHERE_DESTINATION      0x00040000L
                   2488: 
                   2489: // flags for dwFlags parameter of MCI_UPDATE command message
                   2490: #define MCI_ANIM_UPDATE_HDC             0x00020000L
                   2491: 
1.1.1.2   root     2492: // parameter block for MCI_OPEN command message
1.1       root     2493: typedef struct tagMCI_ANIM_OPEN_PARMSA {
                   2494:     DWORD   dwCallback;
                   2495:     MCIDEVICEID wDeviceID;
1.1.1.2   root     2496:     LPCSTR    lpstrDeviceType;
                   2497:     LPCSTR    lpstrElementName;
                   2498:     LPCSTR    lpstrAlias;
1.1       root     2499:     DWORD   dwStyle;
                   2500:     HWND    hWndParent;
                   2501: } MCI_ANIM_OPEN_PARMSA;
1.1.1.2   root     2502: // parameter block for MCI_OPEN command message
1.1       root     2503: typedef struct tagMCI_ANIM_OPEN_PARMSW {
                   2504:     DWORD   dwCallback;
                   2505:     MCIDEVICEID wDeviceID;
                   2506:     LPCWSTR   lpstrDeviceType;
                   2507:     LPCWSTR   lpstrElementName;
                   2508:     LPCWSTR   lpstrAlias;
                   2509:     DWORD   dwStyle;
                   2510:     HWND    hWndParent;
                   2511: } MCI_ANIM_OPEN_PARMSW;
1.1.1.2   root     2512: #ifdef UNICODE
1.1.1.3 ! root     2513: typedef MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2514: #else
1.1.1.3 ! root     2515: typedef MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2516: #endif // UNICODE
                   2517: typedef MCI_ANIM_OPEN_PARMSA     *PMCI_ANIM_OPEN_PARMSA;
1.1       root     2518: typedef MCI_ANIM_OPEN_PARMSW     *PMCI_ANIM_OPEN_PARMSW;
1.1.1.2   root     2519: #ifdef UNICODE
1.1.1.3 ! root     2520: typedef PMCI_ANIM_OPEN_PARMSW PMCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2521: #else
1.1.1.3 ! root     2522: typedef PMCI_ANIM_OPEN_PARMSA PMCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2523: #endif // UNICODE
                   2524: typedef MCI_ANIM_OPEN_PARMSA     *LPMCI_ANIM_OPEN_PARMSA;
1.1       root     2525: typedef MCI_ANIM_OPEN_PARMSW     *LPMCI_ANIM_OPEN_PARMSW;
                   2526: #ifdef UNICODE
1.1.1.3 ! root     2527: typedef LPMCI_ANIM_OPEN_PARMSW LPMCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2528: #else
1.1.1.3 ! root     2529: typedef LPMCI_ANIM_OPEN_PARMSA LPMCI_ANIM_OPEN_PARMS;
1.1.1.2   root     2530: #endif // UNICODE
1.1       root     2531: 
                   2532: // parameter block for MCI_PLAY command message
                   2533: typedef struct tagMCI_ANIM_PLAY_PARMS {
                   2534:     DWORD   dwCallback;
                   2535:     DWORD   dwFrom;
                   2536:     DWORD   dwTo;
                   2537:     DWORD   dwSpeed;
                   2538: } MCI_ANIM_PLAY_PARMS;
                   2539: typedef MCI_ANIM_PLAY_PARMS     *PMCI_ANIM_PLAY_PARMS;
                   2540: typedef MCI_ANIM_PLAY_PARMS     *LPMCI_ANIM_PLAY_PARMS;
                   2541: 
                   2542: // parameter block for MCI_STEP command message
                   2543: typedef struct tagMCI_ANIM_STEP_PARMS {
                   2544:     DWORD   dwCallback;
                   2545:     DWORD   dwFrames;
                   2546: } MCI_ANIM_STEP_PARMS;
                   2547: typedef MCI_ANIM_STEP_PARMS     *PMCI_ANIM_STEP_PARMS;
                   2548: typedef MCI_ANIM_STEP_PARMS     *LPMCI_ANIM_STEP_PARMS;
                   2549: 
1.1.1.2   root     2550: // parameter block for MCI_WINDOW command message
1.1       root     2551: typedef struct tagMCI_ANIM_WINDOW_PARMSA {
                   2552:     DWORD   dwCallback;
1.1.1.3 ! root     2553:     HWND    hWnd;
1.1       root     2554:     UINT    nCmdShow;
1.1.1.2   root     2555:     LPCSTR   lpstrText;
1.1       root     2556: } MCI_ANIM_WINDOW_PARMSA;
1.1.1.2   root     2557: // parameter block for MCI_WINDOW command message
1.1       root     2558: typedef struct tagMCI_ANIM_WINDOW_PARMSW {
                   2559:     DWORD   dwCallback;
1.1.1.3 ! root     2560:     HWND    hWnd;
1.1       root     2561:     UINT    nCmdShow;
                   2562:     LPCWSTR  lpstrText;
                   2563: } MCI_ANIM_WINDOW_PARMSW;
1.1.1.2   root     2564: #ifdef UNICODE
1.1.1.3 ! root     2565: typedef MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2566: #else
1.1.1.3 ! root     2567: typedef MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2568: #endif // UNICODE
                   2569: typedef MCI_ANIM_WINDOW_PARMSA     * PMCI_ANIM_WINDOW_PARMSA;
1.1       root     2570: typedef MCI_ANIM_WINDOW_PARMSW     * PMCI_ANIM_WINDOW_PARMSW;
1.1.1.2   root     2571: #ifdef UNICODE
1.1.1.3 ! root     2572: typedef PMCI_ANIM_WINDOW_PARMSW PMCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2573: #else
1.1.1.3 ! root     2574: typedef PMCI_ANIM_WINDOW_PARMSA PMCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2575: #endif // UNICODE
                   2576: typedef MCI_ANIM_WINDOW_PARMSA     * LPMCI_ANIM_WINDOW_PARMSA;
1.1       root     2577: typedef MCI_ANIM_WINDOW_PARMSW     * LPMCI_ANIM_WINDOW_PARMSW;
                   2578: #ifdef UNICODE
1.1.1.3 ! root     2579: typedef LPMCI_ANIM_WINDOW_PARMSW LPMCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2580: #else
1.1.1.3 ! root     2581: typedef LPMCI_ANIM_WINDOW_PARMSA LPMCI_ANIM_WINDOW_PARMS;
1.1.1.2   root     2582: #endif // UNICODE
1.1       root     2583: 
                   2584: // parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages
                   2585: typedef struct tagMCI_ANIM_RECT_PARMS {
                   2586:     DWORD   dwCallback;
                   2587: #ifdef MCI_USE_OFFEXT
                   2588:     POINT   ptOffset;
                   2589:     POINT   ptExtent;
                   2590: #else   //ifdef MCI_USE_OFFEXT
                   2591:     RECT    rc;
                   2592: #endif  //ifdef MCI_USE_OFFEXT
                   2593: } MCI_ANIM_RECT_PARMS;
                   2594: typedef MCI_ANIM_RECT_PARMS     * PMCI_ANIM_RECT_PARMS;
                   2595: typedef MCI_ANIM_RECT_PARMS     * LPMCI_ANIM_RECT_PARMS;
                   2596: 
                   2597: // parameter block for MCI_UPDATE PARMS
                   2598: typedef struct tagMCI_ANIM_UPDATE_PARMS {
                   2599:     DWORD   dwCallback;
                   2600:     RECT    rc;
                   2601:     HDC     hDC;
                   2602: } MCI_ANIM_UPDATE_PARMS;
                   2603: typedef MCI_ANIM_UPDATE_PARMS     * PMCI_ANIM_UPDATE_PARMS;
                   2604: typedef MCI_ANIM_UPDATE_PARMS     * LPMCI_ANIM_UPDATE_PARMS;
                   2605: 
                   2606: 
                   2607: /*****************************************************************************
                   2608: 
                   2609:     Standard command parameters for overlay
                   2610: 
                   2611: *****************************************************************************/
                   2612: 
                   2613: 
                   2614: // flags for dwFlags parameter of MCI_OPEN command message
                   2615: #define MCI_OVLY_OPEN_WS                0x00010000L
                   2616: #define MCI_OVLY_OPEN_PARENT            0x00020000L
                   2617: 
                   2618: // flags for dwFlags parameter of MCI_STATUS command message
                   2619: #define MCI_OVLY_STATUS_HWND            0x00004001L
                   2620: #define MCI_OVLY_STATUS_STRETCH         0x00004002L
                   2621: 
                   2622: // flags for dwFlags parameter of MCI_INFO command message
                   2623: #define MCI_OVLY_INFO_TEXT              0x00010000L
                   2624: 
                   2625: // flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block
                   2626: #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
                   2627: #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE  0x00004002L
                   2628: #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
                   2629: 
                   2630: // flags for dwFlags parameter of MCI_WINDOW command message
                   2631: #define MCI_OVLY_WINDOW_HWND            0x00010000L
                   2632: #define MCI_OVLY_WINDOW_STATE           0x00040000L
                   2633: #define MCI_OVLY_WINDOW_TEXT            0x00080000L
                   2634: #define MCI_OVLY_WINDOW_ENABLE_STRETCH  0x00100000L
                   2635: #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
                   2636: 
                   2637: // flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block
                   2638: #define MCI_OVLY_WINDOW_DEFAULT         0x00000000L
                   2639: 
                   2640: // flags for dwFlags parameter of MCI_PUT command message
                   2641: #define MCI_OVLY_RECT                   0x00010000L
                   2642: #define MCI_OVLY_PUT_SOURCE             0x00020000L
                   2643: #define MCI_OVLY_PUT_DESTINATION        0x00040000L
                   2644: #define MCI_OVLY_PUT_FRAME              0x00080000L
                   2645: #define MCI_OVLY_PUT_VIDEO              0x00100000L
                   2646: 
                   2647: // flags for dwFlags parameter of MCI_WHERE command message
                   2648: #define MCI_OVLY_WHERE_SOURCE           0x00020000L
                   2649: #define MCI_OVLY_WHERE_DESTINATION      0x00040000L
                   2650: #define MCI_OVLY_WHERE_FRAME            0x00080000L
                   2651: #define MCI_OVLY_WHERE_VIDEO            0x00100000L
                   2652: 
                   2653: 
1.1.1.2   root     2654: // parameter block for MCI_OPEN command message
1.1       root     2655: typedef struct tagMCI_OVLY_OPEN_PARMSA {
                   2656:     DWORD   dwCallback;
                   2657:     MCIDEVICEID wDeviceID;
1.1.1.2   root     2658:     LPCSTR    lpstrDeviceType;
                   2659:     LPCSTR    lpstrElementName;
                   2660:     LPCSTR    lpstrAlias;
1.1       root     2661:     DWORD   dwStyle;
                   2662:     HWND    hWndParent;
                   2663:  } MCI_OVLY_OPEN_PARMSA;
1.1.1.2   root     2664: // parameter block for MCI_OPEN command message
1.1       root     2665: typedef struct tagMCI_OVLY_OPEN_PARMSW {
                   2666:     DWORD   dwCallback;
                   2667:     MCIDEVICEID wDeviceID;
                   2668:     LPCWSTR   lpstrDeviceType;
                   2669:     LPCWSTR   lpstrElementName;
                   2670:     LPCWSTR   lpstrAlias;
                   2671:     DWORD   dwStyle;
                   2672:     HWND    hWndParent;
                   2673:  } MCI_OVLY_OPEN_PARMSW;
1.1.1.2   root     2674: #ifdef UNICODE
1.1.1.3 ! root     2675: typedef MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2676: #else
1.1.1.3 ! root     2677: typedef MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2678: #endif // UNICODE
                   2679: typedef MCI_OVLY_OPEN_PARMSA     *PMCI_OVLY_OPEN_PARMSA;
1.1       root     2680: typedef MCI_OVLY_OPEN_PARMSW     *PMCI_OVLY_OPEN_PARMSW;
1.1.1.2   root     2681: #ifdef UNICODE
1.1.1.3 ! root     2682: typedef PMCI_OVLY_OPEN_PARMSW PMCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2683: #else
1.1.1.3 ! root     2684: typedef PMCI_OVLY_OPEN_PARMSA PMCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2685: #endif // UNICODE
                   2686: typedef MCI_OVLY_OPEN_PARMSA     *LPMCI_OVLY_OPEN_PARMSA;
1.1       root     2687: typedef MCI_OVLY_OPEN_PARMSW     *LPMCI_OVLY_OPEN_PARMSW;
                   2688: #ifdef UNICODE
1.1.1.3 ! root     2689: typedef LPMCI_OVLY_OPEN_PARMSW LPMCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2690: #else
1.1.1.3 ! root     2691: typedef LPMCI_OVLY_OPEN_PARMSA LPMCI_OVLY_OPEN_PARMS;
1.1.1.2   root     2692: #endif // UNICODE
1.1       root     2693: 
1.1.1.2   root     2694: // parameter block for MCI_WINDOW command message
1.1       root     2695: typedef struct tagMCI_OVLY_WINDOW_PARMSA {
                   2696:     DWORD   dwCallback;
                   2697:     HWND    hWnd;
                   2698:     UINT    nCmdShow;
1.1.1.2   root     2699:     LPCSTR    lpstrText;
1.1       root     2700: } MCI_OVLY_WINDOW_PARMSA;
1.1.1.2   root     2701: // parameter block for MCI_WINDOW command message
1.1       root     2702: typedef struct tagMCI_OVLY_WINDOW_PARMSW {
                   2703:     DWORD   dwCallback;
                   2704:     HWND    hWnd;
                   2705:     UINT    nCmdShow;
                   2706:     LPCWSTR   lpstrText;
                   2707: } MCI_OVLY_WINDOW_PARMSW;
1.1.1.2   root     2708: #ifdef UNICODE
1.1.1.3 ! root     2709: typedef MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2710: #else
1.1.1.3 ! root     2711: typedef MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2712: #endif // UNICODE
                   2713: typedef MCI_OVLY_WINDOW_PARMSA     * PMCI_OVLY_WINDOW_PARMSA;
1.1       root     2714: typedef MCI_OVLY_WINDOW_PARMSW     * PMCI_OVLY_WINDOW_PARMSW;
1.1.1.2   root     2715: #ifdef UNICODE
1.1.1.3 ! root     2716: typedef PMCI_OVLY_WINDOW_PARMSW PMCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2717: #else
1.1.1.3 ! root     2718: typedef PMCI_OVLY_WINDOW_PARMSA PMCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2719: #endif // UNICODE
                   2720: typedef MCI_OVLY_WINDOW_PARMSA     * LPMCI_OVLY_WINDOW_PARMSA;
1.1       root     2721: typedef MCI_OVLY_WINDOW_PARMSW     * LPMCI_OVLY_WINDOW_PARMSW;
                   2722: #ifdef UNICODE
1.1.1.3 ! root     2723: typedef LPMCI_OVLY_WINDOW_PARMSW LPMCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2724: #else
1.1.1.3 ! root     2725: typedef LPMCI_OVLY_WINDOW_PARMSA LPMCI_OVLY_WINDOW_PARMS;
1.1.1.2   root     2726: #endif // UNICODE
1.1       root     2727: 
                   2728: // parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages
                   2729: typedef struct tagMCI_OVLY_RECT_PARMS {
                   2730:     DWORD   dwCallback;
                   2731: #ifdef MCI_USE_OFFEXT
                   2732:     POINT   ptOffset;
                   2733:     POINT   ptExtent;
                   2734: #else   //ifdef MCI_USE_OFFEXT
                   2735:     RECT    rc;
                   2736: #endif  //ifdef MCI_USE_OFFEXT
                   2737: } MCI_OVLY_RECT_PARMS;
                   2738: typedef MCI_OVLY_RECT_PARMS     * PMCI_OVLY_RECT_PARMS;
                   2739: typedef MCI_OVLY_RECT_PARMS     * LPMCI_OVLY_RECT_PARMS;
                   2740: 
1.1.1.2   root     2741: // parameter block for MCI_SAVE command message
1.1       root     2742: typedef struct tagMCI_OVLY_SAVE_PARMSA {
                   2743:     DWORD   dwCallback;
1.1.1.2   root     2744:     LPCSTR    lpfilename;
1.1       root     2745:     RECT    rc;
                   2746: } MCI_OVLY_SAVE_PARMSA;
1.1.1.2   root     2747: // parameter block for MCI_SAVE command message
1.1       root     2748: typedef struct tagMCI_OVLY_SAVE_PARMSW {
                   2749:     DWORD   dwCallback;
                   2750:     LPCWSTR   lpfilename;
                   2751:     RECT    rc;
                   2752: } MCI_OVLY_SAVE_PARMSW;
1.1.1.2   root     2753: #ifdef UNICODE
1.1.1.3 ! root     2754: typedef MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2755: #else
1.1.1.3 ! root     2756: typedef MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2757: #endif // UNICODE
                   2758: typedef MCI_OVLY_SAVE_PARMSA     * PMCI_OVLY_SAVE_PARMSA;
1.1       root     2759: typedef MCI_OVLY_SAVE_PARMSW     * PMCI_OVLY_SAVE_PARMSW;
1.1.1.2   root     2760: #ifdef UNICODE
1.1.1.3 ! root     2761: typedef PMCI_OVLY_SAVE_PARMSW PMCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2762: #else
1.1.1.3 ! root     2763: typedef PMCI_OVLY_SAVE_PARMSA PMCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2764: #endif // UNICODE
                   2765: typedef MCI_OVLY_SAVE_PARMSA     * LPMCI_OVLY_SAVE_PARMSA;
1.1       root     2766: typedef MCI_OVLY_SAVE_PARMSW     * LPMCI_OVLY_SAVE_PARMSW;
                   2767: #ifdef UNICODE
1.1.1.3 ! root     2768: typedef LPMCI_OVLY_SAVE_PARMSW LPMCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2769: #else
1.1.1.3 ! root     2770: typedef LPMCI_OVLY_SAVE_PARMSA LPMCI_OVLY_SAVE_PARMS;
1.1.1.2   root     2771: #endif // UNICODE
1.1       root     2772: 
1.1.1.2   root     2773: // parameter block for MCI_LOAD command message
1.1       root     2774: typedef struct tagMCI_OVLY_LOAD_PARMSA {
                   2775:     DWORD   dwCallback;
1.1.1.2   root     2776:     LPCSTR    lpfilename;
1.1       root     2777:     RECT    rc;
                   2778: } MCI_OVLY_LOAD_PARMSA;
1.1.1.2   root     2779: // parameter block for MCI_LOAD command message
1.1       root     2780: typedef struct tagMCI_OVLY_LOAD_PARMSW {
                   2781:     DWORD   dwCallback;
                   2782:     LPCWSTR   lpfilename;
                   2783:     RECT    rc;
                   2784: } MCI_OVLY_LOAD_PARMSW;
1.1.1.2   root     2785: #ifdef UNICODE
1.1.1.3 ! root     2786: typedef MCI_OVLY_LOAD_PARMSW MCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2787: #else
1.1.1.3 ! root     2788: typedef MCI_OVLY_LOAD_PARMSA MCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2789: #endif // UNICODE
                   2790: typedef MCI_OVLY_LOAD_PARMSA     * PMCI_OVLY_LOAD_PARMSA;
1.1       root     2791: typedef MCI_OVLY_LOAD_PARMSW     * PMCI_OVLY_LOAD_PARMSW;
1.1.1.2   root     2792: #ifdef UNICODE
1.1.1.3 ! root     2793: typedef PMCI_OVLY_LOAD_PARMSW PMCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2794: #else
1.1.1.3 ! root     2795: typedef PMCI_OVLY_LOAD_PARMSA PMCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2796: #endif // UNICODE
                   2797: typedef MCI_OVLY_LOAD_PARMSA     * LPMCI_OVLY_LOAD_PARMSA;
1.1       root     2798: typedef MCI_OVLY_LOAD_PARMSW     * LPMCI_OVLY_LOAD_PARMSW;
                   2799: #ifdef UNICODE
1.1.1.3 ! root     2800: typedef LPMCI_OVLY_LOAD_PARMSW LPMCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2801: #else
1.1.1.3 ! root     2802: typedef LPMCI_OVLY_LOAD_PARMSA LPMCI_OVLY_LOAD_PARMS;
1.1.1.2   root     2803: #endif // UNICODE
1.1       root     2804: 
                   2805: #endif  //ifndef MMNOMCI
                   2806: 
                   2807: 
                   2808: /****************************************************************************
                   2809: 
                   2810:                         DISPLAY Driver extensions
                   2811: 
                   2812: ****************************************************************************/
                   2813: 
                   2814: #ifndef C1_TRANSPARENT
1.1.1.3 ! root     2815: #define CAPS1           94              // other caps
        !          2816: #define C1_TRANSPARENT  0x0001          // new raster cap
        !          2817: #define NEWTRANSPARENT  3               // use with SetBkMode()
1.1       root     2818: 
1.1.1.3 ! root     2819: #define QUERYROPSUPPORT 40              // use to determine ROP support
1.1       root     2820: #endif  //ifndef C1_TRANSPARENT
                   2821: 
                   2822: /****************************************************************************
                   2823: 
                   2824:                         DIB Driver extensions
                   2825: 
                   2826: ****************************************************************************/
                   2827: 
1.1.1.3 ! root     2828: #define SELECTDIB       41              // DIB.DRV select dib escape
1.1       root     2829: #define DIBINDEX(n)     MAKELONG((n),0x10FF)
                   2830: 
                   2831: 
                   2832: /****************************************************************************
                   2833: 
                   2834:                         ScreenSaver support
                   2835: 
                   2836:     The current application will receive a syscommand of SC_SCREENSAVE just
                   2837:     before the screen saver is invoked.  If the app wishes to prevent a
                   2838:     screen save, return non-zero value, otherwise call DefWindowProc().
                   2839: 
                   2840: ****************************************************************************/
                   2841: 
                   2842: #ifndef SC_SCREENSAVE
                   2843: 
1.1.1.3 ! root     2844: #define SC_SCREENSAVE   0xF140
1.1       root     2845: 
                   2846: #endif  //ifndef SC_SCREENSAVE
                   2847: 
1.1.1.3 ! root     2848: #ifdef __cplusplus
        !          2849: }
        !          2850: #endif
        !          2851: 
1.1.1.2   root     2852: #endif // _INC_MMSYSTEM

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.