home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sibdemo3.zip / SOURCE.DAT / SOURCE / WIN32 / MMSYSTEM.PAS < prev    next >
Pascal/Delphi Source File  |  1996-11-30  |  138KB  |  3,506 lines

  1. UNIT MMSystem;
  2.  
  3. INTERFACE
  4.  
  5. USES WinBase,WinNt,WinDef;
  6.  
  7. CONST
  8.      MAXPNAMELEN      =32;
  9.      MAXERRORLENGTH   =128;
  10.  
  11.      MM_MICROSOFT     =1;
  12.  
  13.      MM_MIDI_MAPPER   =1;
  14.      MM_WAVE_MAPPER   =2;
  15.  
  16.      MM_SNDBLST_MIDIOUT  =3;
  17.      MM_SNDBLST_MIDIIN   =4;
  18.      MM_SNDBLST_SYNTH    =5;
  19.      MM_SNDBLST_WAVEOUT  =6;
  20.      MM_SNDBLST_WAVEIN   =7;
  21.      MM_ADLIB            =9;
  22.      MM_MPU401_MIDIOUT   =10;
  23.      MM_MPU401_MIDIIN    =11;
  24.      MM_PC_JOYSTICK      =12;
  25.  
  26. TYPE
  27.     MMVERSION=LONGWORD;
  28.     MMRESULT=LONGWORD;
  29.     LPUINT=^LONGWORD;
  30.  
  31. TYPE
  32.     PMMTIME=^MMTIME;
  33.     MMTIME=RECORD
  34.                  wType:LONGWORD;
  35.                  CASE Integer OF
  36.                    1:(ms:LONGWORD);
  37.                    2:(sample:LONGWORD);
  38.                    3:(cb:LONGWORD);
  39.                    4:(ticks:LONGWORD);
  40.                    5:(smpte:RECORD
  41.                                   hour:BYTE;
  42.                                   min:BYTE;
  43.                                   sec:BYTE;
  44.                                   frame:BYTE;
  45.                                   fps:BYTE;
  46.                                   dummy:BYTE;
  47.                                   pad:ARRAY[0..1] OF BYTE;
  48.                             END);
  49.                    6:(midi:RECORD
  50.                                  songptrpos:LONGWORD;
  51.                            END);
  52.     END;
  53.  
  54. CONST
  55.      TIME_MS         =$0001;
  56.      TIME_SAMPLES    =$0002;
  57.      TIME_BYTES      =$0004;
  58.      TIME_SMPTE      =$0008;
  59.      TIME_MIDI       =$0010;
  60.      TIME_TICKS      =$0020;
  61.  
  62. CONST
  63.      MM_JOY1MOVE         =$3A0;
  64.      MM_JOY2MOVE         =$3A1;
  65.      MM_JOY1ZMOVE        =$3A2;
  66.      MM_JOY2ZMOVE        =$3A3;
  67.      MM_JOY1BUTTONDOWN   =$3B5;
  68.      MM_JOY2BUTTONDOWN   =$3B6;
  69.      MM_JOY1BUTTONUP     =$3B7;
  70.      MM_JOY2BUTTONUP     =$3B8;
  71.  
  72.      MM_MCINOTIFY        =$3B9;
  73.  
  74.      MM_WOM_OPEN         =$3BB;
  75.      MM_WOM_CLOSE        =$3BC;
  76.      MM_WOM_DONE         =$3BD;
  77.  
  78.      MM_WIM_OPEN         =$3BE;
  79.      MM_WIM_CLOSE        =$3BF;
  80.      MM_WIM_DATA         =$3C0;
  81.  
  82.      MM_MIM_OPEN         =$3C1;
  83.      MM_MIM_CLOSE        =$3C2;
  84.      MM_MIM_DATA         =$3C3;
  85.      MM_MIM_LONGDATA     =$3C4;
  86.      MM_MIM_ERROR        =$3C5;
  87.      MM_MIM_LONGERROR    =$3C6;
  88.  
  89.      MM_MOM_OPEN         =$3C7;
  90.      MM_MOM_CLOSE        =$3C8;
  91.      MM_MOM_DONE         =$3C9;
  92.      MM_MCISYSTEM_STRING =$3CA;
  93.  
  94.      MM_MIXM_LINE_CHANGE =$3D0;
  95.      MM_MIXM_CONTROL_CHANGE  =$3D1;
  96.  
  97. CONST
  98.      MMSYSERR_BASE          =0;
  99.      WAVERR_BASE            =32;
  100.      MIDIERR_BASE           =64;
  101.      TIMERR_BASE            =96;
  102.      JOYERR_BASE            =160;
  103.      MCIERR_BASE            =256;
  104.  
  105.      MCI_STRING_OFFSET      =512;
  106.  
  107.      MIXERR_BASE            =1024;
  108.  
  109.      MCI_VD_OFFSET          =1024;
  110.      MCI_CD_OFFSET          =1088;
  111.      MCI_WAVE_OFFSET        =1152;
  112.      MCI_SEQ_OFFSET         =1216;
  113.  
  114.      MMSYSERR_NOERROR      =0;
  115.      MMSYSERR_ERROR        =(MMSYSERR_BASE + 1);
  116.      MMSYSERR_BADDEVICEID  =(MMSYSERR_BASE + 2);
  117.      MMSYSERR_NOTENABLED   =(MMSYSERR_BASE + 3);
  118.      MMSYSERR_ALLOCATED    =(MMSYSERR_BASE + 4);
  119.      MMSYSERR_INVALHANDLE  =(MMSYSERR_BASE + 5);
  120.      MMSYSERR_NODRIVER     =(MMSYSERR_BASE + 6);
  121.      MMSYSERR_NOMEM        =(MMSYSERR_BASE + 7);
  122.      MMSYSERR_NOTSUPPORTED =(MMSYSERR_BASE + 8);
  123.      MMSYSERR_BADERRNUM    =(MMSYSERR_BASE + 9);
  124.      MMSYSERR_INVALFLAG    =(MMSYSERR_BASE + 10);
  125.      MMSYSERR_INVALPARAM   =(MMSYSERR_BASE + 11);
  126.      MMSYSERR_HANDLEBUSY   =(MMSYSERR_BASE + 12);
  127.      MMSYSERR_INVALIDALIAS =(MMSYSERR_BASE + 13);
  128.      MMSYSERR_LASTERROR    =(MMSYSERR_BASE + 13);
  129.  
  130. TYPE HDRVR=HANDLE;
  131.  
  132. CONST
  133.      DRV_LOAD            =$0001;
  134.      DRV_ENABLE          =$0002;
  135.      DRV_OPEN            =$0003;
  136.      DRV_CLOSE           =$0004;
  137.      DRV_DISABLE         =$0005;
  138.      DRV_FREE            =$0006;
  139.      DRV_CONFIGURE       =$0007;
  140.      DRV_QUERYCONFIGURE  =$0008;
  141.      DRV_INSTALL         =$0009;
  142.      DRV_REMOVE          =$000A;
  143.      DRV_EXITSESSION     =$000B;
  144.      DRV_POWER           =$000F;
  145.      DRV_RESERVED        =$0800;
  146.      DRV_USER            =$4000;
  147.  
  148. TYPE
  149.     PDRVCONFIGINFO=^DRVCONFIGINFO;
  150.     DRVCONFIGINFO=RECORD
  151.                         dwDCISize:LONGWORD;
  152.                         lpszDCISectionName:PChar;
  153.                         lpszDCIAliasName:PChar;
  154.     END;
  155.  
  156. CONST
  157.      DRVCNF_CANCEL       =$0000;
  158.      DRVCNF_OK           =$0001;
  159.      DRVCNF_RESTART      =$0002;
  160.  
  161.      DRV_CANCEL          =DRVCNF_CANCEL;
  162.      DRV_OK              =DRVCNF_OK;
  163.      DRV_RESTART         =DRVCNF_RESTART;
  164.  
  165.      DRV_MCI_FIRST       =DRV_RESERVED;
  166.      DRV_MCI_LAST        =DRV_RESERVED + $FFF;
  167.  
  168. CONST
  169.      CALLBACK_TYPEMASK   =$00070000;
  170.      CALLBACK_NULL       =$00000000;
  171.      CALLBACK_WINDOW     =$00010000;
  172.      CALLBACK_TASK       =$00020000;
  173.      CALLBACK_THREAD     =$00020000;
  174.      CALLBACK_FUNCTION   =$00030000;
  175.  
  176. TYPE
  177.     PDRVCALLBACK=^DRVCALLBACK;
  178.     DRVCALLBACK=PROCEDURE(ahdrvr:HDRVR;uMsg:LONGWORD;dwUser:LONGWORD;
  179.                            dw1,dw2:LONGWORD);APIENTRY;
  180.  
  181. CONST
  182.      SND_ALIAS      =$00010000;
  183.      SND_FILENAME   =$00020000;
  184.      SND_RESOURCE   =$00040004;
  185.  
  186.      SND_SYNC       =$00000000;
  187.      SND_ASYNC      =$00000001;
  188.      SND_NODEFAULT  =$00000002;
  189.      SND_MEMORY     =$00000004;
  190.      SND_LOOP       =$00000008;
  191.      SND_NOSTOP     =$00000010;
  192.  
  193.      SND_NOWAIT     =$00002000;
  194.      SND_VALIDFLAGS =$0017201F;
  195.      SND_RESERVED   =$FF000000;
  196.      SND_TYPE_MASK  =$00170007;
  197.      SND_ALIAS_ID   =$00110000;
  198.      SND_ALIAS_START=0;
  199.  
  200. (*
  201. /****************************************************************************
  202.  
  203.                         Waveform audio support
  204.  
  205. ****************************************************************************/
  206.  
  207. /* waveform audio error return values */
  208.      WAVERR_BADFORMAT      (WAVERR_BASE + 0)    // unsupported wave format
  209.      WAVERR_STILLPLAYING   (WAVERR_BASE + 1)    // still something playing
  210.      WAVERR_UNPREPARED     (WAVERR_BASE + 2)    // header not prepared
  211.      WAVERR_SYNC           (WAVERR_BASE + 3)    // device is synchronous
  212.      WAVERR_LASTERROR      (WAVERR_BASE + 3)    // last error in range
  213.  
  214. /* waveform audio data types */
  215. typedef HANDLE          HWAVE;
  216. typedef HWAVE           HWAVEIN;
  217. typedef HWAVE           HWAVEOUT;
  218.  
  219. typedef HWAVEIN     *LPHWAVEIN;
  220. typedef HWAVEOUT     *LPHWAVEOUT;
  221.  
  222. typedef DRVCALLBACK     WAVECALLBACK;
  223. typedef WAVECALLBACK     *LPWAVECALLBACK;
  224.  
  225. /* wave callback messages */
  226.      WOM_OPEN        MM_WOM_OPEN
  227.      WOM_CLOSE       MM_WOM_CLOSE
  228.      WOM_DONE        MM_WOM_DONE
  229.      WIM_OPEN        MM_WIM_OPEN
  230.      WIM_CLOSE       MM_WIM_CLOSE
  231.      WIM_DATA        MM_WIM_DATA
  232.  
  233. /* device ID for wave device mapper */
  234.      WAVE_MAPPER     ((DWORD)(-1))
  235.  
  236. /* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
  237.       WAVE_FORMAT_QUERY     $00000001
  238.       WAVE_ALLOWSYNC        $00000002
  239.  
  240. /* wave data block header */
  241. typedef struct wavehdr_tag {
  242.     LPBYTE      lpData;               // pointer to locked data buffer
  243.     DWORD       dwBufferLength;       // length of data buffer
  244.     DWORD       dwBytesRecorded;      // used for input only
  245.     DWORD       dwUser;               // for client's use
  246.     DWORD       dwFlags;              // assorted flags (see defines)
  247.     DWORD       dwLoops;              // loop control counter
  248.     struct wavehdr_tag     *lpNext;   // reserved for driver
  249.     DWORD                 reserved;   // reserved for driver
  250. } WAVEHDR;
  251. typedef WAVEHDR       *PWAVEHDR;
  252. typedef WAVEHDR      *NPWAVEHDR;
  253. typedef WAVEHDR      *LPWAVEHDR;
  254.  
  255. /* flags for dwFlags field of WAVEHDR */
  256.      WHDR_DONE       $00000001  // done bit
  257.      WHDR_PREPARED   $00000002  // set if this header has been prepared
  258.      WHDR_BEGINLOOP  $00000004  // loop start block
  259.      WHDR_ENDLOOP    $00000008  // loop end block
  260.      WHDR_INQUEUE    $00000010  // reserved for driver
  261.  
  262. /* waveform output device capabilities structure */
  263. typedef struct tagWAVEOUTCAPSA {
  264.     WORD    wMid;                   // manufacturer ID
  265.     WORD    wPid;                   // product ID
  266.     MMVERSION vDriverVersion;       // version of the driver
  267.     CHAR    szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  268.     DWORD   dwFormats;              // formats supported
  269.     WORD    wChannels;              // number of sources supported
  270.     WORD    wReserved1;             // packing
  271.     DWORD   dwSupport;              // functionality supported by driver
  272. } WAVEOUTCAPSA;
  273. /* waveform output device capabilities structure */
  274. typedef struct tagWAVEOUTCAPSW {
  275.     WORD    wMid;                   // manufacturer ID
  276.     WORD    wPid;                   // product ID
  277.     MMVERSION vDriverVersion;       // version of the driver
  278.     WCHAR   szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  279.     DWORD   dwFormats;              // formats supported
  280.     WORD    wChannels;              // number of sources supported
  281.     WORD    wReserved1;             // packing
  282.     DWORD   dwSupport;              // functionality supported by driver
  283. } WAVEOUTCAPSW;
  284. #ifdef UNICODE
  285. typedef WAVEOUTCAPSW WAVEOUTCAPS;
  286. #else
  287. typedef WAVEOUTCAPSA WAVEOUTCAPS;
  288. #endif // UNICODE
  289. typedef WAVEOUTCAPSA      *PWAVEOUTCAPSA;
  290. typedef WAVEOUTCAPSW      *PWAVEOUTCAPSW;
  291. #ifdef UNICODE
  292. typedef PWAVEOUTCAPSW PWAVEOUTCAPS;
  293. #else
  294. typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
  295. #endif // UNICODE
  296. typedef WAVEOUTCAPSA      *NPWAVEOUTCAPSA;
  297. typedef WAVEOUTCAPSW      *NPWAVEOUTCAPSW;
  298. #ifdef UNICODE
  299. typedef NPWAVEOUTCAPSW NPWAVEOUTCAPS;
  300. #else
  301. typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
  302. #endif // UNICODE
  303. typedef WAVEOUTCAPSA      *LPWAVEOUTCAPSA;
  304. typedef WAVEOUTCAPSW      *LPWAVEOUTCAPSW;
  305. #ifdef UNICODE
  306. typedef LPWAVEOUTCAPSW LPWAVEOUTCAPS;
  307. #else
  308. typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
  309. #endif // UNICODE
  310.  
  311. /* flags for dwSupport field of WAVEOUTCAPS */
  312.      WAVECAPS_PITCH        $00000001  // supports pitch control
  313.      WAVECAPS_PLAYBACKRATE $00000002  // supports playback rate control
  314.      WAVECAPS_VOLUME       $00000004  // supports volume control
  315.      WAVECAPS_LRVOLUME     $00000008  // separate left-right volume control
  316.      WAVECAPS_SYNC         $00000010
  317.  
  318. /* waveform input device capabilities structure */
  319. typedef struct tagWAVEINCAPSA {
  320.     WORD    wMid;                    // manufacturer ID
  321.     WORD    wPid;                    // product ID
  322.     MMVERSION vDriverVersion;        // version of the driver
  323.     CHAR    szPname[MAXPNAMELEN];    // product name (NULL terminated string)
  324.     DWORD   dwFormats;               // formats supported
  325.     WORD    wChannels;               // number of channels supported
  326.     WORD    wReserved1;              // structure packing
  327. } WAVEINCAPSA;
  328. /* waveform input device capabilities structure */
  329. typedef struct tagWAVEINCAPSW {
  330.     WORD    wMid;                    // manufacturer ID
  331.     WORD    wPid;                    // product ID
  332.     MMVERSION vDriverVersion;        // version of the driver
  333.     WCHAR   szPname[MAXPNAMELEN];    // product name (NULL terminated string)
  334.     DWORD   dwFormats;               // formats supported
  335.     WORD    wChannels;               // number of channels supported
  336.     WORD    wReserved1;              // structure packing
  337. } WAVEINCAPSW;
  338. #ifdef UNICODE
  339. typedef WAVEINCAPSW WAVEINCAPS;
  340. #else
  341. typedef WAVEINCAPSA WAVEINCAPS;
  342. #endif // UNICODE
  343. typedef WAVEINCAPSA     *PWAVEINCAPSA;
  344. typedef WAVEINCAPSW     *PWAVEINCAPSW;
  345. #ifdef UNICODE
  346. typedef PWAVEINCAPSW PWAVEINCAPS;
  347. #else
  348. typedef PWAVEINCAPSA PWAVEINCAPS;
  349. #endif // UNICODE
  350. typedef WAVEINCAPSA     *LPWAVEINCAPSA;
  351. typedef WAVEINCAPSW     *LPWAVEINCAPSW;
  352. #ifdef UNICODE
  353. typedef LPWAVEINCAPSW LPWAVEINCAPS;
  354. #else
  355. typedef LPWAVEINCAPSA LPWAVEINCAPS;
  356. #endif // UNICODE
  357.  
  358. /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */
  359.      WAVE_INVALIDFORMAT     $00000000       // invalid format
  360.      WAVE_FORMAT_1M08       $00000001       // 11.025 kHz, Mono,   8-bit
  361.      WAVE_FORMAT_1S08       $00000002       // 11.025 kHz, Stereo, 8-bit
  362.      WAVE_FORMAT_1M16       $00000004       // 11.025 kHz, Mono,   16-bit
  363.      WAVE_FORMAT_1S16       $00000008       // 11.025 kHz, Stereo, 16-bit
  364.      WAVE_FORMAT_2M08       $00000010       // 22.05  kHz, Mono,   8-bit
  365.      WAVE_FORMAT_2S08       $00000020       // 22.05  kHz, Stereo, 8-bit
  366.      WAVE_FORMAT_2M16       $00000040       // 22.05  kHz, Mono,   16-bit
  367.      WAVE_FORMAT_2S16       $00000080       // 22.05  kHz, Stereo, 16-bit
  368.      WAVE_FORMAT_4M08       $00000100       // 44.1   kHz, Mono,   8-bit
  369.      WAVE_FORMAT_4S08       $00000200       // 44.1   kHz, Stereo, 8-bit
  370.      WAVE_FORMAT_4M16       $00000400       // 44.1   kHz, Mono,   16-bit
  371.      WAVE_FORMAT_4S16       $00000800       // 44.1   kHz, Stereo, 16-bit
  372.  
  373. /* general waveform format (information common to all formats) */
  374. /* as read from a file.  See Multimedia file formats in Programmer Reference */
  375. typedef struct {
  376.     WORD    wFormatTag;        // format type
  377.     WORD    nChannels;         // number of channels (i.e. mono, stereo, etc.)
  378.     DWORD   nSamplesPerSec;    // sample rate
  379.     DWORD   nAvgBytesPerSec;   // for buffer estimation
  380.     WORD    nBlockAlign;       // block size of data
  381. } WAVEFORMAT;
  382. typedef WAVEFORMAT       *PWAVEFORMAT;
  383. typedef WAVEFORMAT      *NPWAVEFORMAT;
  384. typedef WAVEFORMAT      *LPWAVEFORMAT;
  385. typedef CONST WAVEFORMAT  *LPCWAVEFORMAT;
  386. /* NOTE:  The fields in the structure above are copied into */
  387. /* the MCI_WAVE_SET_PARMS structure during execution */
  388.  
  389. /* flags for wFormatTag field of WAVEFORMAT */
  390.      WAVE_FORMAT_PCM     1  // Needed in resource files so outside #ifndef RC_INVOKED #endif
  391.  
  392. #ifndef RC_INVOKED
  393.  
  394.  
  395. /* specific waveform format for PCM data */
  396. typedef struct tagPCMWAVEFORMAT {
  397.     WAVEFORMAT  wf;
  398.     WORD        wBitsPerSample;        // corresponds to MCI_WAVE_SET_.... structure
  399. } PCMWAVEFORMAT;
  400. typedef PCMWAVEFORMAT       *PPCMWAVEFORMAT;
  401. typedef PCMWAVEFORMAT      *NPPCMWAVEFORMAT;
  402. typedef PCMWAVEFORMAT      *LPPCMWAVEFORMAT;
  403.  
  404. #ifndef _WAVEFORMATEX_
  405.      _WAVEFORMATEX_
  406.  
  407. /*
  408.  *  extended waveform format structure used for all non-PCM formats. this
  409.  *  structure is common to all non-PCM formats.
  410.  */
  411. typedef struct tWAVEFORMATEX
  412. {
  413.     WORD        wFormatTag;         // format type
  414.     WORD        nChannels;          // number of channels (i.e. mono, stereo...)
  415.     DWORD       nSamplesPerSec;     // sample rate
  416.     DWORD       nAvgBytesPerSec;    // for buffer estimation
  417.     WORD        nBlockAlign;        // block size of data
  418.     WORD        wBitsPerSample;     // number of bits per sample of mono data
  419.     WORD        cbSize;             // the count in bytes of the size of
  420.                                     // extra information (after cbSize)
  421. } WAVEFORMATEX, *PWAVEFORMATEX,      *NPWAVEFORMATEX,     *LPWAVEFORMATEX;
  422. typedef CONST WAVEFORMATEX  *LPCWAVEFORMATEX;
  423.  
  424. #endif // _WAVEFORMATEX_
  425.  
  426. /* waveform audio function prototypes */
  427. UINT APIENTRY waveOutGetNumDevs(VOID);
  428. MMRESULT APIENTRY waveOutGetDevCapsA(UINT uDeviceID, LPWAVEOUTCAPSA lpCaps,
  429.     UINT cbCaps);
  430. MMRESULT APIENTRY waveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW lpCaps,
  431.     UINT cbCaps);
  432. #ifdef UNICODE
  433.      waveOutGetDevCaps  waveOutGetDevCapsW
  434. #else
  435.      waveOutGetDevCaps  waveOutGetDevCapsA
  436. #endif // !UNICODE
  437.  
  438. MMRESULT APIENTRY waveOutGetVolume(UINT uDeviceID, LPDWORD lpdwVolume);
  439. MMRESULT APIENTRY waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  440.  
  441. MMRESULT APIENTRY waveOutGetErrorTextA(MMRESULT err, LPSTR lpText, UINT cchText);
  442. MMRESULT APIENTRY waveOutGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT cchText);
  443. #ifdef UNICODE
  444.      waveOutGetErrorText  waveOutGetErrorTextW
  445. #else
  446.      waveOutGetErrorText  waveOutGetErrorTextA
  447. #endif // !UNICODE
  448.  
  449. MMRESULT APIENTRY waveOutOpen(LPHWAVEOUT lphwo, UINT uDeviceID,
  450.     LPCWAVEFORMAT lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  451.  
  452. MMRESULT APIENTRY waveOutClose(HWAVEOUT hwo);
  453. MMRESULT APIENTRY waveOutPrepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  454. MMRESULT APIENTRY waveOutUnprepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  455. MMRESULT APIENTRY waveOutWrite(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  456. MMRESULT APIENTRY waveOutPause(HWAVEOUT hwo);
  457. MMRESULT APIENTRY waveOutRestart(HWAVEOUT hwo);
  458. MMRESULT APIENTRY waveOutReset(HWAVEOUT hwo);
  459. MMRESULT APIENTRY waveOutBreakLoop(HWAVEOUT hwo);
  460. MMRESULT APIENTRY waveOutGetPosition(HWAVEOUT hwo, LPMMTIME lpmmt, UINT cbmmt);
  461. MMRESULT APIENTRY waveOutGetPitch(HWAVEOUT hwo, LPDWORD pdwPitch);
  462. MMRESULT APIENTRY waveOutSetPitch(HWAVEOUT hwo, DWORD dwPitch);
  463. MMRESULT APIENTRY waveOutGetPlaybackRate(HWAVEOUT hwo, LPDWORD lpdwRate);
  464. MMRESULT APIENTRY waveOutSetPlaybackRate(HWAVEOUT hwo, DWORD dwRate);
  465.  
  466. MMRESULT APIENTRY waveOutGetID(HWAVEOUT hwo, LPUINT lpuDeviceID);
  467.  
  468. MMRESULT APIENTRY waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
  469.  
  470. UINT APIENTRY waveInGetNumDevs(VOID);
  471.  
  472. MMRESULT APIENTRY waveInGetDevCapsA(UINT uDeviceID, LPWAVEINCAPSA lpCaps,
  473.     UINT cbCaps);
  474. MMRESULT APIENTRY waveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW lpCaps,
  475.     UINT cbCaps);
  476. #ifdef UNICODE
  477.      waveInGetDevCaps  waveInGetDevCapsW
  478. #else
  479.      waveInGetDevCaps  waveInGetDevCapsA
  480. #endif // !UNICODE
  481.  
  482. MMRESULT APIENTRY waveInGetErrorTextA(MMRESULT mmrError, LPSTR lpText, UINT cchText);
  483. MMRESULT APIENTRY waveInGetErrorTextW(MMRESULT mmrError, LPWSTR lpText, UINT cchText);
  484. #ifdef UNICODE
  485.      waveInGetErrorText  waveInGetErrorTextW
  486. #else
  487.      waveInGetErrorText  waveInGetErrorTextA
  488. #endif // !UNICODE
  489.  
  490. MMRESULT APIENTRY waveInOpen(LPHWAVEIN lphwi, UINT uDeviceID,
  491.     LPCWAVEFORMAT lpwf, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  492. MMRESULT APIENTRY waveInClose(HWAVEIN hwi);
  493. MMRESULT APIENTRY waveInPrepareHeader(HWAVEIN hwi, LPWAVEHDR lpwh, UINT cbwh);
  494. MMRESULT APIENTRY waveInUnprepareHeader(HWAVEIN hwi, LPWAVEHDR lpwh, UINT cbwh);
  495. MMRESULT APIENTRY waveInAddBuffer(HWAVEIN hwi, LPWAVEHDR lpwh, UINT cbwh);
  496. MMRESULT APIENTRY waveInStart(HWAVEIN hwi);
  497. MMRESULT APIENTRY waveInStop(HWAVEIN hwi);
  498. MMRESULT APIENTRY waveInReset(HWAVEIN hwi);
  499. MMRESULT APIENTRY waveInGetPosition(HWAVEIN hwi, LPMMTIME lpmmt, UINT cbmmt);
  500. MMRESULT APIENTRY waveInGetID(HWAVEIN hwi, LPUINT lpuDeviceID);
  501.  
  502. MMRESULT APIENTRY waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
  503.  
  504.  
  505. #endif  // RC_INVOKED
  506. #endif  //ifndef MMNOWAVE
  507.  
  508.  
  509.  
  510. #ifndef MMNOMIDI
  511. /****************************************************************************
  512.  
  513.                             MIDI audio support
  514.  
  515. ****************************************************************************/
  516.  
  517. /* MIDI error return values */
  518.      MIDIERR_UNPREPARED    (MIDIERR_BASE + 0)   // header not prepared
  519.      MIDIERR_STILLPLAYING  (MIDIERR_BASE + 1)   // still something playing
  520.      MIDIERR_NOMAP         (MIDIERR_BASE + 2)   // no current map
  521.      MIDIERR_NOTREADY      (MIDIERR_BASE + 3)   // hardware is still busy
  522.      MIDIERR_NODEVICE      (MIDIERR_BASE + 4)   // port no longer connected
  523.      MIDIERR_INVALIDSETUP  (MIDIERR_BASE + 5)   // invalid setup (invalid MIF)
  524.      MIDIERR_BADOPENMODE   (MIDIERR_BASE + 6)   // operation unsupported w/ open mode
  525.      MIDIERR_LASTERROR     (MIDIERR_BASE + 5)   // last error in range
  526.  
  527. /* MIDI audio data types */
  528. typedef HANDLE  HMIDI;
  529. typedef HMIDI   HMIDIIN;
  530. typedef HMIDI   HMIDIOUT;
  531.  
  532. typedef HMIDIIN     *LPHMIDIIN;
  533. typedef HMIDIOUT     *LPHMIDIOUT;
  534. typedef DRVCALLBACK MIDICALLBACK;
  535. typedef MIDICALLBACK     *LPMIDICALLBACK;
  536.      MIDIPATCHSIZE   128
  537. typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  538. typedef WORD     *LPPATCHARRAY;
  539. typedef WORD KEYARRAY[MIDIPATCHSIZE];
  540. typedef WORD     *LPKEYARRAY;
  541.  
  542. /* MIDI callback messages */
  543.      MIM_OPEN        MM_MIM_OPEN
  544.      MIM_CLOSE       MM_MIM_CLOSE
  545.      MIM_DATA        MM_MIM_DATA
  546.      MIM_LONGDATA    MM_MIM_LONGDATA
  547.      MIM_ERROR       MM_MIM_ERROR
  548.      MIM_LONGERROR   MM_MIM_LONGERROR
  549.      MOM_OPEN        MM_MOM_OPEN
  550.      MOM_CLOSE       MM_MOM_CLOSE
  551.      MOM_DONE        MM_MOM_DONE
  552.  
  553. /* device ID for MIDI mapper */
  554.      MIDIMAPPER     (-1)       // Cannot be cast to DWORD as RC complains
  555.      MIDI_MAPPER    ((DWORD)(-1))
  556.  
  557. /* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */
  558.      MIDI_CACHE_ALL      1
  559.      MIDI_CACHE_BESTFIT  2
  560.      MIDI_CACHE_QUERY    3
  561.      MIDI_UNCACHE        4
  562.  
  563. /* MIDI output device capabilities structure */
  564. typedef struct tagMIDIOUTCAPSA {
  565.     WORD    wMid;                  // manufacturer ID
  566.     WORD    wPid;                  // product ID
  567.     MMVERSION vDriverVersion;      // version of the driver
  568.     CHAR    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  569.     WORD    wTechnology;           // type of device
  570.     WORD    wVoices;               // # of voices (internal synth only)
  571.     WORD    wNotes;                // max # of notes (internal synth only)
  572.     WORD    wChannelMask;          // channels used (internal synth only)
  573.     DWORD   dwSupport;             // functionality supported by driver
  574. } MIDIOUTCAPSA;
  575. /* MIDI output device capabilities structure */
  576. typedef struct tagMIDIOUTCAPSW {
  577.     WORD    wMid;                  // manufacturer ID
  578.     WORD    wPid;                  // product ID
  579.     MMVERSION vDriverVersion;      // version of the driver
  580.     WCHAR   szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  581.     WORD    wTechnology;           // type of device
  582.     WORD    wVoices;               // # of voices (internal synth only)
  583.     WORD    wNotes;                // max # of notes (internal synth only)
  584.     WORD    wChannelMask;          // channels used (internal synth only)
  585.     DWORD   dwSupport;             // functionality supported by driver
  586. } MIDIOUTCAPSW;
  587. #ifdef UNICODE
  588. typedef MIDIOUTCAPSW MIDIOUTCAPS;
  589. #else
  590. typedef MIDIOUTCAPSA MIDIOUTCAPS;
  591. #endif // UNICODE
  592. typedef MIDIOUTCAPSA    *PMIDIOUTCAPSA;
  593. typedef MIDIOUTCAPSW    *PMIDIOUTCAPSW;
  594. #ifdef UNICODE
  595. typedef PMIDIOUTCAPSW PMIDIOUTCAPS;
  596. #else
  597. typedef PMIDIOUTCAPSA PMIDIOUTCAPS;
  598. #endif // UNICODE
  599. typedef MIDIOUTCAPSA      *NPMIDIOUTCAPSA;
  600. typedef MIDIOUTCAPSW      *NPMIDIOUTCAPSW;
  601. #ifdef UNICODE
  602. typedef NPMIDIOUTCAPSW NPMIDIOUTCAPS;
  603. #else
  604. typedef NPMIDIOUTCAPSA NPMIDIOUTCAPS;
  605. #endif // UNICODE
  606. typedef MIDIOUTCAPSA      *LPMIDIOUTCAPSA;
  607. typedef MIDIOUTCAPSW      *LPMIDIOUTCAPSW;
  608. #ifdef UNICODE
  609. typedef LPMIDIOUTCAPSW LPMIDIOUTCAPS;
  610. #else
  611. typedef LPMIDIOUTCAPSA LPMIDIOUTCAPS;
  612. #endif // UNICODE
  613.  
  614. /* flags for wTechnology field of MIDIOUTCAPS structure */
  615.      MOD_MIDIPORT    1  // output port
  616.      MOD_SYNTH       2  // generic internal synth
  617.      MOD_SQSYNTH     3  // square wave internal synth
  618.      MOD_FMSYNTH     4  // FM internal synth
  619.      MOD_MAPPER      5  // MIDI mapper
  620.  
  621. /* flags for dwSupport field of MIDIOUTCAPS */
  622.      MIDICAPS_VOLUME     $00000001  // supports volume control
  623.      MIDICAPS_LRVOLUME   $00000002  // separate left-right volume control
  624.      MIDICAPS_CACHE      $00000004
  625.  
  626. /* MIDI input device capabilities structure */
  627. typedef struct tagMIDIINCAPSA {
  628.     WORD        wMid;                   // manufacturer ID
  629.     WORD        wPid;                   // product ID
  630.     MMVERSION   vDriverVersion;         // version of the driver
  631.     CHAR        szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  632. } MIDIINCAPSA;
  633. /* MIDI input device capabilities structure */
  634. typedef struct tagMIDIINCAPSW {
  635.     WORD        wMid;                   // manufacturer ID
  636.     WORD        wPid;                   // product ID
  637.     MMVERSION   vDriverVersion;         // version of the driver
  638.     WCHAR       szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  639. } MIDIINCAPSW;
  640. #ifdef UNICODE
  641. typedef MIDIINCAPSW MIDIINCAPS;
  642. #else
  643. typedef MIDIINCAPSA MIDIINCAPS;
  644. #endif // UNICODE
  645. typedef MIDIINCAPSA     *PMIDIINCAPSA;
  646. typedef MIDIINCAPSW     *PMIDIINCAPSW;
  647. #ifdef UNICODE
  648. typedef PMIDIINCAPSW PMIDIINCAPS;
  649. #else
  650. typedef PMIDIINCAPSA PMIDIINCAPS;
  651. #endif // UNICODE
  652. typedef MIDIINCAPSA      *NPMIDIINCAPSA;
  653. typedef MIDIINCAPSW      *NPMIDIINCAPSW;
  654. #ifdef UNICODE
  655. typedef NPMIDIINCAPSW NPMIDIINCAPS;
  656. #else
  657. typedef NPMIDIINCAPSA NPMIDIINCAPS;
  658. #endif // UNICODE
  659. typedef MIDIINCAPSA     *LPMIDIINCAPSA;
  660. typedef MIDIINCAPSW     *LPMIDIINCAPSW;
  661. #ifdef UNICODE
  662. typedef LPMIDIINCAPSW LPMIDIINCAPS;
  663. #else
  664. typedef LPMIDIINCAPSA LPMIDIINCAPS;
  665. #endif // UNICODE
  666.  
  667. /* MIDI data block header */
  668. typedef struct midihdr_tag {
  669.     LPBYTE      lpData;               // pointer to locked data block
  670.     DWORD       dwBufferLength;       // length of data in data block
  671.     DWORD       dwBytesRecorded;      // used for input only
  672.     DWORD       dwUser;               // for client's use
  673.     DWORD       dwFlags;              // assorted flags (see defines)
  674.     struct midihdr_tag     *lpNext;   // reserved for driver
  675.     DWORD       reserved;             // reserved for driver
  676. } MIDIHDR;
  677. typedef MIDIHDR       *PMIDIHDR;
  678. typedef MIDIHDR      *NPMIDIHDR;
  679. typedef MIDIHDR      *LPMIDIHDR;
  680.  
  681. /* flags for dwFlags field of MIDIHDR structure */
  682.      MHDR_DONE       $00000001       // done bit
  683.      MHDR_PREPARED   $00000002       // set if header prepared
  684.      MHDR_INQUEUE    $00000004       // reserved for driver
  685.  
  686.  
  687. /* MIDI function prototypes */
  688. UINT APIENTRY midiOutGetNumDevs(VOID);
  689.  
  690. MMRESULT APIENTRY midiOutGetDevCapsA(UINT uDeviceID, LPMIDIOUTCAPSA lpCaps, UINT cbCaps);
  691. MMRESULT APIENTRY midiOutGetDevCapsW(UINT uDeviceID, LPMIDIOUTCAPSW lpCaps, UINT cbCaps);
  692. #ifdef UNICODE
  693.      midiOutGetDevCaps  midiOutGetDevCapsW
  694. #else
  695.      midiOutGetDevCaps  midiOutGetDevCapsA
  696. #endif // !UNICODE
  697.  
  698. MMRESULT APIENTRY midiOutGetVolume(UINT uId, LPDWORD lpdwVolume);
  699. MMRESULT APIENTRY midiOutSetVolume(UINT uId, DWORD dwVolume);
  700.  
  701. MMRESULT APIENTRY midiOutGetErrorTextA(MMRESULT mmrError, LPSTR lpText, UINT cchText);
  702. MMRESULT APIENTRY midiOutGetErrorTextW(MMRESULT mmrError, LPWSTR lpText, UINT cchText);
  703. #ifdef UNICODE
  704.      midiOutGetErrorText  midiOutGetErrorTextW
  705. #else
  706.      midiOutGetErrorText  midiOutGetErrorTextA
  707. #endif // !UNICODE
  708.  
  709. MMRESULT APIENTRY midiOutOpen(LPHMIDIOUT lphmo, UINT uDeviceID,
  710.     DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  711. MMRESULT APIENTRY midiOutClose(HMIDIOUT hmo);
  712. MMRESULT APIENTRY midiOutPrepareHeader(HMIDIOUT hmo, LPMIDIHDR lpmh, UINT cbmh);
  713. MMRESULT APIENTRY midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR lpmh, UINT cbmh);
  714.  
  715. MMRESULT APIENTRY midiOutShortMsg(HMIDIOUT hmo, DWORD dwMsg);
  716. MMRESULT APIENTRY midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR lpmh, UINT cbmh);
  717. MMRESULT APIENTRY midiOutReset(HMIDIOUT hmo);
  718. MMRESULT APIENTRY midiOutCachePatches(HMIDIOUT hmo, UINT uBank, LPWORD lpwpa, UINT fuCache);
  719. MMRESULT APIENTRY midiOutCacheDrumPatches(HMIDIOUT hmo,
  720.              UINT uPatch, LPWORD lpwkya, UINT fuCache);
  721. MMRESULT APIENTRY midiOutGetID(HMIDIOUT hmo, LPUINT lpuDeviceID);
  722.  
  723. MMRESULT APIENTRY midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
  724.  
  725. UINT APIENTRY midiInGetNumDevs(VOID);
  726. MMRESULT APIENTRY midiInGetDevCapsA(UINT uDeviceID, LPMIDIINCAPSA lpCaps, UINT cbCaps);
  727. MMRESULT APIENTRY midiInGetDevCapsW(UINT uDeviceID, LPMIDIINCAPSW lpCaps, UINT cbCaps);
  728. #ifdef UNICODE
  729.      midiInGetDevCaps  midiInGetDevCapsW
  730. #else
  731.      midiInGetDevCaps  midiInGetDevCapsA
  732. #endif // !UNICODE
  733.  
  734. MMRESULT APIENTRY midiInGetErrorTextA(MMRESULT err, LPSTR lpText, UINT cchText);
  735. MMRESULT APIENTRY midiInGetErrorTextW(MMRESULT err, LPWSTR lpText, UINT cchText);
  736. #ifdef UNICODE
  737.      midiInGetErrorText  midiInGetErrorTextW
  738. #else
  739.      midiInGetErrorText  midiInGetErrorTextA
  740. #endif // !UNICODE
  741.  
  742. MMRESULT APIENTRY midiInOpen(LPHMIDIIN lphmi, UINT uDeviceID,
  743.         DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  744. MMRESULT APIENTRY midiInClose(HMIDIIN hmi);
  745. MMRESULT APIENTRY midiInPrepareHeader(HMIDIIN hmi, LPMIDIHDR lpmh, UINT cbmh);
  746. MMRESULT APIENTRY midiInUnprepareHeader(HMIDIIN hmi, LPMIDIHDR lpmh, UINT cbmh);
  747. MMRESULT APIENTRY midiInAddBuffer(HMIDIIN hmi, LPMIDIHDR lpmh, UINT cbmh);
  748. MMRESULT APIENTRY midiInStart(HMIDIIN hmi);
  749. MMRESULT APIENTRY midiInStop(HMIDIIN hmi);
  750. MMRESULT APIENTRY midiInReset(HMIDIIN hmi);
  751. MMRESULT APIENTRY midiInGetID(HMIDIIN hmi, LPUINT lpuDeviceID);
  752.  
  753. MMRESULT APIENTRY midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
  754.  
  755. #endif  //ifndef MMNOMIDI
  756.  
  757.  
  758.  
  759. #ifndef MMNOAUX
  760. /****************************************************************************
  761.  
  762.                         Auxiliary audio support
  763.  
  764. ****************************************************************************/
  765.  
  766. /* device ID for aux device mapper */
  767.      AUX_MAPPER     ((DWORD)(-1))
  768.  
  769. /* Auxiliary audio device capabilities structure */
  770. typedef struct tagAUXCAPSA {
  771.     WORD        wMid;                   // manufacturer ID
  772.     WORD        wPid;                   // product ID
  773.     MMVERSION   vDriverVersion;         // version of the driver
  774.     CHAR        szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  775.     WORD        wTechnology;            // type of device
  776.     WORD        wReserved1;             // packing
  777.     DWORD       dwSupport;              // functionality supported by driver
  778. } AUXCAPSA;
  779. /* Auxiliary audio device capabilities structure */
  780. typedef struct tagAUXCAPSW {
  781.     WORD        wMid;                   // manufacturer ID
  782.     WORD        wPid;                   // product ID
  783.     MMVERSION   vDriverVersion;         // version of the driver
  784.     WCHAR       szPname[MAXPNAMELEN];   // product name (NULL terminated string)
  785.     WORD        wTechnology;            // type of device
  786.     WORD        wReserved1;             // packing
  787.     DWORD       dwSupport;              // functionality supported by driver
  788. } AUXCAPSW;
  789. #ifdef UNICODE
  790. typedef AUXCAPSW AUXCAPS;
  791. #else
  792. typedef AUXCAPSA AUXCAPS;
  793. #endif // UNICODE
  794. typedef AUXCAPSA      *PAUXCAPSA;
  795. typedef AUXCAPSW      *PAUXCAPSW;
  796. #ifdef UNICODE
  797. typedef PAUXCAPSW PAUXCAPS;
  798. #else
  799. typedef PAUXCAPSA PAUXCAPS;
  800. #endif // UNICODE
  801. typedef AUXCAPSA      *NPAUXCAPSA;
  802. typedef AUXCAPSW      *NPAUXCAPSW;
  803. #ifdef UNICODE
  804. typedef NPAUXCAPSW NPAUXCAPS;
  805. #else
  806. typedef NPAUXCAPSA NPAUXCAPS;
  807. #endif // UNICODE
  808. typedef AUXCAPSA      *LPAUXCAPSA;
  809. typedef AUXCAPSW      *LPAUXCAPSW;
  810. #ifdef UNICODE
  811. typedef LPAUXCAPSW LPAUXCAPS;
  812. #else
  813. typedef LPAUXCAPSA LPAUXCAPS;
  814. #endif // UNICODE
  815.  
  816. /* flags for wTechnology field in AUXCAPS structure */
  817.      AUXCAPS_CDAUDIO    1       // audio from internal CD-ROM drive
  818.      AUXCAPS_AUXIN      2       // audio from auxiliary input jacks
  819.  
  820. /* flags for dwSupport field in AUXCAPS structure */
  821.      AUXCAPS_VOLUME     $00000001   // supports volume control
  822.      AUXCAPS_LRVOLUME   $00000002   // separate left-right volume control
  823.  
  824. /* auxiliary audio function prototypes */
  825. UINT APIENTRY auxGetNumDevs(VOID);
  826. MMRESULT APIENTRY auxGetDevCapsA(UINT uDeviceID, LPAUXCAPSA lpCaps, UINT cbCaps);
  827. MMRESULT APIENTRY auxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW lpCaps, UINT cbCaps);
  828. #ifdef UNICODE
  829.      auxGetDevCaps  auxGetDevCapsW
  830. #else
  831.      auxGetDevCaps  auxGetDevCapsA
  832. #endif // !UNICODE
  833. MMRESULT APIENTRY auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  834. MMRESULT APIENTRY auxGetVolume(UINT uDeviceID, LPDWORD lpdwVolume);
  835.  
  836. MMRESULT APIENTRY auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
  837.  
  838. #endif  //ifndef MMNOAUX
  839.  
  840. #ifndef MMNOMIXER
  841. /****************************************************************************
  842.  
  843.                             Mixer Support
  844.  
  845. ****************************************************************************/
  846.  
  847. // MM_MIXM_LINE_CHANGE and MM_MIXM_CONTROL_CHANGE are defined earlier
  848.  
  849. DECLARE_HANDLE(HMIXEROBJ);
  850. typedef HMIXEROBJ      *LPHMIXEROBJ;
  851.  
  852. DECLARE_HANDLE(HMIXER);
  853. typedef HMIXER         *LPHMIXER;
  854.  
  855.      MIXER_SHORT_NAME_CHARS      16
  856.      MIXER_LONG_NAME_CHARS       64
  857.  
  858.  
  859. /*  MMRESULT error return values specific to the mixer API */
  860.  
  861.      MIXERR_INVALLINE            (MIXERR_BASE + 0)
  862.      MIXERR_INVALCONTROL         (MIXERR_BASE + 1)
  863.      MIXERR_INVALVALUE           (MIXERR_BASE + 2)
  864.      MIXERR_LASTERROR            (MIXERR_BASE + 2)
  865.  
  866.  
  867.      MIXER_OBJECTF_HANDLE    $80000000L
  868.      MIXER_OBJECTF_MIXER     $00000000L
  869.      MIXER_OBJECTF_HMIXER    (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
  870.      MIXER_OBJECTF_WAVEOUT   $10000000L
  871.      MIXER_OBJECTF_HWAVEOUT  (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
  872.      MIXER_OBJECTF_WAVEIN    $20000000L
  873.      MIXER_OBJECTF_HWAVEIN   (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
  874.      MIXER_OBJECTF_MIDIOUT   $30000000L
  875.      MIXER_OBJECTF_HMIDIOUT  (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
  876.      MIXER_OBJECTF_MIDIIN    $40000000L
  877.      MIXER_OBJECTF_HMIDIIN   (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
  878.      MIXER_OBJECTF_AUX       $50000000L
  879.  
  880.  
  881. UINT APIENTRY mixerGetNumDevs(void);
  882.  
  883. typedef struct tMIXERCAPSA
  884. {
  885.     WORD            wMid;                   // manufacturer id
  886.     WORD            wPid;                   // product id
  887.     MMVERSION       vDriverVersion;         // version of the driver
  888.     CHAR            szPname[MAXPNAMELEN];   // product name
  889.     DWORD           fdwSupport;             // misc. support bits
  890.     DWORD           cDestinations;          // count of destinations
  891. } MIXERCAPSA;
  892. typedef struct tMIXERCAPSW
  893. {
  894.     WORD            wMid;                   // manufacturer id
  895.     WORD            wPid;                   // product id
  896.     MMVERSION       vDriverVersion;         // version of the driver
  897.     WCHAR           szPname[MAXPNAMELEN];   // product name
  898.     DWORD           fdwSupport;             // misc. support bits
  899.     DWORD           cDestinations;          // count of destinations
  900. } MIXERCAPSW;
  901. #ifdef UNICODE
  902. typedef MIXERCAPSW MIXERCAPS;
  903. #else
  904. typedef MIXERCAPSA MIXERCAPS;
  905. #endif // UNICODE
  906. typedef MIXERCAPSA *PMIXERCAPSA;
  907. typedef MIXERCAPSW *PMIXERCAPSW;
  908. #ifdef UNICODE
  909. typedef PMIXERCAPSW PMIXERCAPS;
  910. #else
  911. typedef PMIXERCAPSA PMIXERCAPS;
  912. #endif // UNICODE
  913. typedef MIXERCAPSA     *LPMIXERCAPSA;
  914. typedef MIXERCAPSW     *LPMIXERCAPSW;
  915. #ifdef UNICODE
  916. typedef LPMIXERCAPSW LPMIXERCAPS;
  917. #else
  918. typedef LPMIXERCAPSA LPMIXERCAPS;
  919. #endif // UNICODE
  920.  
  921.  
  922.  
  923. MMRESULT APIENTRY mixerGetDevCapsA(UINT uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
  924. MMRESULT APIENTRY mixerGetDevCapsW(UINT uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
  925. #ifdef UNICODE
  926.      mixerGetDevCaps  mixerGetDevCapsW
  927. #else
  928.      mixerGetDevCaps  mixerGetDevCapsA
  929. #endif // !UNICODE
  930. MMRESULT APIENTRY mixerGetID(HMIXEROBJ hmxobj, UINT     *puMxId, DWORD fdwId);
  931.  
  932.  
  933. MMRESULT APIENTRY mixerOpen(LPHMIXER phmx, UINT uMxId, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  934.  
  935.  
  936. MMRESULT APIENTRY mixerClose(HMIXER hmx);
  937.  
  938. DWORD APIENTRY mixerMessage(HMIXER hmx, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  939.  
  940. typedef struct tMIXERLINEA
  941. {
  942.     DWORD       cbStruct;               // size of MIXERLINE structure
  943.     DWORD       dwDestination;          // zero based destination index
  944.     DWORD       dwSource;               // zero based source index (if source)
  945.     DWORD       dwLineID;               // unique line id for mixer device
  946.     DWORD       fdwLine;                // state/information about line
  947.     DWORD       dwUser;                 // driver specific information
  948.     DWORD       dwComponentType;        // component type line connects to
  949.     DWORD       cChannels;              // number of channels line supports
  950.     DWORD       cConnections;           // number of connections [possible]
  951.     DWORD       cControls;              // number of controls at this line
  952.     CHAR        szShortName[MIXER_SHORT_NAME_CHARS];
  953.     CHAR        szName[MIXER_LONG_NAME_CHARS];
  954.     struct
  955.     {
  956.         DWORD   dwType;                 // MIXERLINE_TARGETTYPE_xxxx
  957.         DWORD   dwDeviceID;             // target device ID of device type
  958.         WORD    wMid;                   // of target device
  959.         WORD    wPid;                   //      "
  960.         MMVERSION  vDriverVersion;      //      "
  961.         CHAR    szPname[MAXPNAMELEN];   //      "
  962.     } Target;
  963. } MIXERLINEA;
  964. typedef struct tMIXERLINEW
  965. {
  966.     DWORD       cbStruct;               // size of MIXERLINE structure
  967.     DWORD       dwDestination;          // zero based destination index
  968.     DWORD       dwSource;               // zero based source index (if source)
  969.     DWORD       dwLineID;               // unique line id for mixer device
  970.     DWORD       fdwLine;                // state/information about line
  971.     DWORD       dwUser;                 // driver specific information
  972.     DWORD       dwComponentType;        // component type line connects to
  973.     DWORD       cChannels;              // number of channels line supports
  974.     DWORD       cConnections;           // number of connections [possible]
  975.     DWORD       cControls;              // number of controls at this line
  976.     WCHAR       szShortName[MIXER_SHORT_NAME_CHARS];
  977.     WCHAR       szName[MIXER_LONG_NAME_CHARS];
  978.     struct
  979.     {
  980.         DWORD   dwType;                 // MIXERLINE_TARGETTYPE_xxxx
  981.         DWORD   dwDeviceID;             // target device ID of device type
  982.         WORD    wMid;                   // of target device
  983.         WORD    wPid;                   //      "
  984.         MMVERSION  vDriverVersion;      //      "
  985.         WCHAR   szPname[MAXPNAMELEN];   //      "
  986.     } Target;
  987. } MIXERLINEW;
  988. #ifdef UNICODE
  989. typedef MIXERLINEW MIXERLINE;
  990. #else
  991. typedef MIXERLINEA MIXERLINE;
  992. #endif // UNICODE
  993. typedef MIXERLINEA *PMIXERLINEA;
  994. typedef MIXERLINEW *PMIXERLINEW;
  995. #ifdef UNICODE
  996. typedef PMIXERLINEW PMIXERLINE;
  997. #else
  998. typedef PMIXERLINEA PMIXERLINE;
  999. #endif // UNICODE
  1000. typedef MIXERLINEA     *LPMIXERLINEA;
  1001. typedef MIXERLINEW     *LPMIXERLINEW;
  1002. #ifdef UNICODE
  1003. typedef LPMIXERLINEW LPMIXERLINE;
  1004. #else
  1005. typedef LPMIXERLINEA LPMIXERLINE;
  1006. #endif // UNICODE
  1007.  
  1008.  
  1009. /*  MIXERLINE.fdwLine */
  1010.  
  1011.      MIXERLINE_LINEF_ACTIVE              $00000001L
  1012.      MIXERLINE_LINEF_DISCONNECTED        $00008000L
  1013.      MIXERLINE_LINEF_SOURCE              $80000000L
  1014.  
  1015.  
  1016. /*  MIXERLINE.dwComponentType */
  1017.  
  1018. /*  component types for destinations and sources */
  1019.  
  1020.      MIXERLINE_COMPONENTTYPE_DST_FIRST       $00000000L
  1021.      MIXERLINE_COMPONENTTYPE_DST_UNDEFINED   (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
  1022.      MIXERLINE_COMPONENTTYPE_DST_DIGITAL     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
  1023.      MIXERLINE_COMPONENTTYPE_DST_LINE        (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
  1024.      MIXERLINE_COMPONENTTYPE_DST_MONITOR     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
  1025.      MIXERLINE_COMPONENTTYPE_DST_SPEAKERS    (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
  1026.      MIXERLINE_COMPONENTTYPE_DST_HEADPHONES  (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
  1027.      MIXERLINE_COMPONENTTYPE_DST_TELEPHONE   (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
  1028.      MIXERLINE_COMPONENTTYPE_DST_WAVEIN      (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
  1029.      MIXERLINE_COMPONENTTYPE_DST_VOICEIN     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1030.      MIXERLINE_COMPONENTTYPE_DST_LAST        (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1031.  
  1032.      MIXERLINE_COMPONENTTYPE_SRC_FIRST       $00001000L
  1033.      MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
  1034.      MIXERLINE_COMPONENTTYPE_SRC_DIGITAL     (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
  1035.      MIXERLINE_COMPONENTTYPE_SRC_LINE        (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
  1036.      MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE  (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
  1037.      MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
  1038.      MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
  1039.      MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
  1040.      MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
  1041.      MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT     (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
  1042.      MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
  1043.      MIXERLINE_COMPONENTTYPE_SRC_ANALOG      (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1044.      MIXERLINE_COMPONENTTYPE_SRC_LAST        (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1045.  
  1046.  
  1047. /*  MIXERLINE.Target.dwType */
  1048.  
  1049.      MIXERLINE_TARGETTYPE_UNDEFINED      0
  1050.      MIXERLINE_TARGETTYPE_WAVEOUT        1
  1051.      MIXERLINE_TARGETTYPE_WAVEIN         2
  1052.      MIXERLINE_TARGETTYPE_MIDIOUT        3
  1053.      MIXERLINE_TARGETTYPE_MIDIIN         4
  1054.      MIXERLINE_TARGETTYPE_AUX            5
  1055.  
  1056.  
  1057.  
  1058. MMRESULT APIENTRY mixerGetLineInfoA (HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
  1059. MMRESULT APIENTRY mixerGetLineInfoW (HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
  1060. #ifdef UNICODE
  1061.      mixerGetLineInfo  mixerGetLineInfoW
  1062. #else
  1063.      mixerGetLineInfo  mixerGetLineInfoA
  1064. #endif // !UNICODE
  1065.  
  1066.      MIXER_GETLINEINFOF_DESTINATION      $00000000L
  1067.      MIXER_GETLINEINFOF_SOURCE           $00000001L
  1068.      MIXER_GETLINEINFOF_LINEID           $00000002L
  1069.      MIXER_GETLINEINFOF_COMPONENTTYPE    $00000003L
  1070.      MIXER_GETLINEINFOF_TARGETTYPE       $00000004L
  1071.  
  1072.      MIXER_GETLINEINFOF_QUERYMASK        $0000000FL
  1073.  
  1074. /*  MIXERCONTROL */
  1075.  
  1076. typedef struct tMIXERCONTROLA
  1077. {
  1078.     DWORD           cbStruct;           // size in bytes of MIXERCONTROL
  1079.     DWORD           dwControlID;        // unique control id for mixer device
  1080.     DWORD           dwControlType;      // MIXERCONTROL_CONTROLTYPE_xxx
  1081.     DWORD           fdwControl;         // MIXERCONTROL_CONTROLF_xxx
  1082.     DWORD           cMultipleItems;     // if MIXERCONTROL_CONTROLF_MULTIPLE set
  1083.     CHAR            szShortName[MIXER_SHORT_NAME_CHARS];
  1084.     CHAR            szName[MIXER_LONG_NAME_CHARS];
  1085.     union
  1086.     {
  1087. #if !defined(NO_ANONYMOUS_STRUCT)
  1088.         struct
  1089.         {
  1090.             LONG    lMinimum;           // signed minimum for this control
  1091.             LONG    lMaximum;           // signed maximum for this control
  1092.         };
  1093.         struct
  1094.         {
  1095.             DWORD   dwMinimum;          // unsigned minimum for this control
  1096.             DWORD   dwMaximum;          // unsigned maximum for this control
  1097.         };
  1098. #endif
  1099.         struct
  1100.         {
  1101.             LONG    lMinimum;           // signed minimum for this control
  1102.             LONG    lMaximum;           // signed maximum for this control
  1103.         } u1;
  1104.         struct
  1105.         {
  1106.             DWORD   dwMinimum;          // unsigned minimum for this control
  1107.             DWORD   dwMaximum;          // unsigned maximum for this control
  1108.         } u2;
  1109.         DWORD       dwReserved[6];
  1110.     } Bounds;
  1111.     union
  1112.     {
  1113.         DWORD       cSteps;             // # of steps between min & max
  1114.         DWORD       cbCustomData;       // size in bytes of custom data
  1115.         DWORD       dwReserved[6];      // !!! needed? we have cbStruct....
  1116.     } Metrics;
  1117. } MIXERCONTROLA;
  1118. typedef struct tMIXERCONTROLW
  1119. {
  1120.     DWORD           cbStruct;           // size in bytes of MIXERCONTROL
  1121.     DWORD           dwControlID;        // unique control id for mixer device
  1122.     DWORD           dwControlType;      // MIXERCONTROL_CONTROLTYPE_xxx
  1123.     DWORD           fdwControl;         // MIXERCONTROL_CONTROLF_xxx
  1124.     DWORD           cMultipleItems;     // if MIXERCONTROL_CONTROLF_MULTIPLE set
  1125.     WCHAR           szShortName[MIXER_SHORT_NAME_CHARS];
  1126.     WCHAR           szName[MIXER_LONG_NAME_CHARS];
  1127.     union
  1128.     {
  1129. #if !defined(NO_ANONYMOUS_STRUCT)
  1130.         struct
  1131.         {
  1132.             LONG    lMinimum;           // signed minimum for this control
  1133.             LONG    lMaximum;           // signed maximum for this control
  1134.         };
  1135.         struct
  1136.         {
  1137.             DWORD   dwMinimum;          // unsigned minimum for this control
  1138.             DWORD   dwMaximum;          // unsigned maximum for this control
  1139.         };
  1140. #endif
  1141.         struct
  1142.         {
  1143.             LONG    lMinimum;           // signed minimum for this control
  1144.             LONG    lMaximum;           // signed maximum for this control
  1145.         } u1;
  1146.         struct
  1147.         {
  1148.             DWORD   dwMinimum;          // unsigned minimum for this control
  1149.             DWORD   dwMaximum;          // unsigned maximum for this control
  1150.         } u2;
  1151.         DWORD       dwReserved[6];
  1152.     } Bounds;
  1153.     union
  1154.     {
  1155.         DWORD       cSteps;             // # of steps between min & max
  1156.         DWORD       cbCustomData;       // size in bytes of custom data
  1157.         DWORD       dwReserved[6];      // !!! needed? we have cbStruct....
  1158.     } Metrics;
  1159. } MIXERCONTROLW;
  1160. #ifdef UNICODE
  1161. typedef MIXERCONTROLW MIXERCONTROL;
  1162. #else
  1163. typedef MIXERCONTROLA MIXERCONTROL;
  1164. #endif // UNICODE
  1165. typedef MIXERCONTROLA *PMIXERCONTROLA;
  1166. typedef MIXERCONTROLW *PMIXERCONTROLW;
  1167. #ifdef UNICODE
  1168. typedef PMIXERCONTROLW PMIXERCONTROL;
  1169. #else
  1170. typedef PMIXERCONTROLA PMIXERCONTROL;
  1171. #endif // UNICODE
  1172. typedef MIXERCONTROLA     *LPMIXERCONTROLA;
  1173. typedef MIXERCONTROLW     *LPMIXERCONTROLW;
  1174. #ifdef UNICODE
  1175. typedef LPMIXERCONTROLW LPMIXERCONTROL;
  1176. #else
  1177. typedef LPMIXERCONTROLA LPMIXERCONTROL;
  1178. #endif // UNICODE
  1179.  
  1180.  
  1181. /*  MIXERCONTROL.fdwControl */
  1182.  
  1183.      MIXERCONTROL_CONTROLF_UNIFORM   $00000001L
  1184.      MIXERCONTROL_CONTROLF_MULTIPLE  $00000002L
  1185.      MIXERCONTROL_CONTROLF_DISABLED  $80000000L
  1186.  
  1187.  
  1188.  
  1189.  
  1190. /*  MIXERCONTROL_CONTROLTYPE_xxx building block defines */
  1191.  
  1192.      MIXERCONTROL_CT_CLASS_MASK          $F0000000L
  1193.      MIXERCONTROL_CT_CLASS_CUSTOM        $00000000L
  1194.      MIXERCONTROL_CT_CLASS_METER         $10000000L
  1195.      MIXERCONTROL_CT_CLASS_SWITCH        $20000000L
  1196.      MIXERCONTROL_CT_CLASS_NUMBER        $30000000L
  1197.      MIXERCONTROL_CT_CLASS_SLIDER        $40000000L
  1198.      MIXERCONTROL_CT_CLASS_FADER         $50000000L
  1199.      MIXERCONTROL_CT_CLASS_TIME          $60000000L
  1200.      MIXERCONTROL_CT_CLASS_LIST          $70000000L
  1201.  
  1202.  
  1203.      MIXERCONTROL_CT_SUBCLASS_MASK       $0F000000L
  1204.  
  1205.      MIXERCONTROL_CT_SC_SWITCH_BOOLEAN   $00000000L
  1206.      MIXERCONTROL_CT_SC_SWITCH_BUTTON    $01000000L
  1207.  
  1208.      MIXERCONTROL_CT_SC_METER_POLLED     $00000000L
  1209.  
  1210.      MIXERCONTROL_CT_SC_TIME_MICROSECS   $00000000L
  1211.      MIXERCONTROL_CT_SC_TIME_MILLISECS   $01000000L
  1212.  
  1213.      MIXERCONTROL_CT_SC_LIST_SINGLE      $00000000L
  1214.      MIXERCONTROL_CT_SC_LIST_MULTIPLE    $01000000L
  1215.  
  1216.  
  1217.      MIXERCONTROL_CT_UNITS_MASK          $00FF0000L
  1218.      MIXERCONTROL_CT_UNITS_CUSTOM        $00000000L
  1219.      MIXERCONTROL_CT_UNITS_BOOLEAN       $00010000L
  1220.      MIXERCONTROL_CT_UNITS_SIGNED        $00020000L
  1221.      MIXERCONTROL_CT_UNITS_UNSIGNED      $00030000L
  1222.      MIXERCONTROL_CT_UNITS_DECIBELS      $00040000L // in 10ths
  1223.      MIXERCONTROL_CT_UNITS_PERCENT       $00050000L // in 10ths
  1224.  
  1225.  
  1226. /*  MIXERCONTROL.dwControlType */
  1227.  
  1228. /*  Custom Controls */
  1229.  
  1230.      MIXERCONTROL_CONTROLTYPE_CUSTOM         (MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM)
  1231.  
  1232.  
  1233. /*  Meters (Boolean) */
  1234.  
  1235. /*  simply shows 'on or off' with the Boolean type */
  1236.  
  1237.      MIXERCONTROL_CONTROLTYPE_BOOLEANMETER   (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1238.  
  1239.  
  1240. /*  Meters (signed) */
  1241.  
  1242. /*      MIXERCONTROL.Bounds.lMinimum    = min */
  1243. /*      MIXERCONTROL.Bounds.lMaximum    = max */
  1244. /* */
  1245. /*  signed meters are meant for displaying levels that have a signed nature. */
  1246. /*  there is no requirment for the values above and below zero to be */
  1247. /*  equal in magnitude. that is, it is 'ok' to have a range from, say, -3 */
  1248. /*  to 12. however, the standard defined signed meter types may have */
  1249. /*  restrictions (such as the peakmeter). */
  1250. /* */
  1251. /*  MIXERCONTROL_CONTROLTYPE_PEAKMETER: a peak meter tells the monitoring */
  1252. /*  application the peak value reached (and phase) of a line (normally */
  1253. /*  wave input and output) over a small period of time. THIS IS NOT VU! */
  1254. /*  the bounds are fixed: */
  1255. /* */
  1256. /*      MIXERCONTROL.Bounds.lMinimum    = -32768    ALWAYS! */
  1257. /*      MIXERCONTROL.Bounds.lMaximum    = 32767     ALWAYS! */
  1258. /* */
  1259. /*  so 8 bit and 24 bit samples must be scaled appropriately. this is so */
  1260. /*  an application can display a 'bouncing blinky light' for a user and */
  1261. /*  also monitor a line for clipping. remember that 8 bit samples must */
  1262. /*  be converted to signed values (by the mixer driver)! */
  1263. /* */
  1264. /* */
  1265. /*  NOTE! meters are read only controls. also, a meter should only be */
  1266. /*  'active' when the line it is associated with is active (see fdwLine */
  1267. /*  in MIXERLINE). it is NOT an error to read a meter that is not active-- */
  1268. /*  the mixer driver should simply return 'no value' states (usually zero). */
  1269. /*  but it may be useful to stop monitoring a meter if the line is not */
  1270. /*  active... */
  1271. /* */
  1272.      MIXERCONTROL_CONTROLTYPE_SIGNEDMETER    (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED)
  1273.      MIXERCONTROL_CONTROLTYPE_PEAKMETER      (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
  1274.  
  1275.  
  1276. /* */
  1277. /*  Meters (unsigned) */
  1278. /* */
  1279. /*      MIXERCONTROL.Bounds.dwMinimum   = min */
  1280. /*      MIXERCONTROL.Bounds.dwMaximum   = max */
  1281. /* */
  1282. /*  unsigned meters are meant for displaying levels that have an unsigned */
  1283. /*  nature. there is no requirment for the values to be based at zero. */
  1284. /*  that is, it is 'ok' to have a range from, say, 8 to 42. however, the */
  1285. /*  standard defined unsigned meter types may have restrictions. */
  1286. /* */
  1287. /* */
  1288. /*  NOTE! meters are read only controls. also, a meter should only be */
  1289. /*  'active' when the line it is associated with is active (see fdwLine */
  1290. /*  in MIXERLINE). it is NOT an error to read a meter that is not active-- */
  1291. /*  the mixer driver should simply return 'no value' states (usually zero). */
  1292. /*  but it may be useful to stop monitoring a meter if the line is not */
  1293. /*  active... */
  1294. /* */
  1295.      MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER  (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1296.  
  1297.  
  1298. /* */
  1299. /*  Switches (Boolean) */
  1300. /* */
  1301. /*      MIXERCONTROL.Bounds.lMinimum    = ignored (though should be zero) */
  1302. /*      MIXERCONTROL.Bounds.lMaximum    = ignored (though should be one) */
  1303. /* */
  1304. /*  Boolean switches are for enabling/disabling things. they are either */
  1305. /*  on (non-zero for fValue, 1 should be used) or off (zero for fValue). */
  1306. /*  a few standard types are defined in case an application wants to search */
  1307. /*  for a specific type of switch (like mute)--and also to allow a different */
  1308. /*  looking control to be used (say for ON/OFF vs a generic Boolean). */
  1309. /* */
  1310. /* */
  1311.      MIXERCONTROL_CONTROLTYPE_BOOLEAN        (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1312.      MIXERCONTROL_CONTROLTYPE_ONOFF          (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
  1313.      MIXERCONTROL_CONTROLTYPE_MUTE           (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
  1314.      MIXERCONTROL_CONTROLTYPE_MONO           (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
  1315.      MIXERCONTROL_CONTROLTYPE_LOUDNESS       (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
  1316.      MIXERCONTROL_CONTROLTYPE_STEREOENH      (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
  1317.  
  1318.  
  1319. /* */
  1320. /*  a button switch is 'write only' and simply signals the driver to do */
  1321. /*  something. an example is a 'Calibrate' button like the one in the */
  1322. /*  existing Turtle Beach MultiSound recording prep utility. an application */
  1323. /*  sets the fValue to TRUE for all buttons that should be pressed. if */
  1324. /*  fValue is FALSE, no action will be taken. reading a button's value will */
  1325. /*  always return FALSE (not depressed). */
  1326. /* */
  1327.      MIXERCONTROL_CONTROLTYPE_BUTTON         (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1328.  
  1329.  
  1330.  
  1331.      MIXERCONTROL_CONTROLTYPE_DECIBELS (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS)
  1332.  
  1333.  
  1334. /*  Number (signed integer) */
  1335.  
  1336.      MIXERCONTROL_CONTROLTYPE_SIGNED         (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED)
  1337.  
  1338. /*  the units are in 10ths of 1 decibel */
  1339.  
  1340. /*  Number (usigned integer) */
  1341.  
  1342.      MIXERCONTROL_CONTROLTYPE_UNSIGNED       (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1343.  
  1344. /*  the units are in 10ths of 1 percent */
  1345.  
  1346.      MIXERCONTROL_CONTROLTYPE_PERCENT        (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT)
  1347.  
  1348.  
  1349. /* */
  1350. /*  Sliders (signed integer) */
  1351. /* */
  1352. /*  sliders are meant 'positioning' type controls (such as panning). */
  1353. /*  the generic slider must have lMinimum, lMaximum, and cSteps filled */
  1354. /*  in--also note that there is no restriction on these values (see */
  1355. /*  signed meters above for more). */
  1356. /* */
  1357. /* */
  1358. /*  MIXERCONTROL_CONTROLTYPE_PAN: this is meant to be a real simple pan */
  1359. /*  for stereo lines. the Bounds are fixed to be -32768 to 32767 with 0 */
  1360. /*  being dead center. these values are LINEAR and there are no units */
  1361. /*  (-32768 = extreme left, 32767 = extreme right). */
  1362. /* */
  1363. /*  if an application wants to display a scrollbar that does not contain */
  1364. /*  a bunch of 'dead space', then the scrollbar range should be set to */
  1365. /*  MIXERCONTROL.Metrics.cSteps and lValue should be scaled appropriately */
  1366. /*  with MulDiv. */
  1367. /* */
  1368. /*      MIXERCONTROL.Bounds.lMinimum    = -32768    ALWAYS! */
  1369. /*      MIXERCONTROL.Bounds.lMaximum    = 32768     ALWAYS! */
  1370. /*      MIXERCONTROL.Metrics.cSteps     = number of steps for range. */
  1371. /* */
  1372. /* */
  1373. /*  MIXERCONTROL_CONTROLTYPE_QSOUNDPAN: the initial version of Q-Sound (tm, */
  1374. /*  etc by Archer Communications) defines 'Q-Space' as a sortof semi-circle */
  1375. /*  with 33 positions (0 = extreme left, 33 = extreme right, 16 = center). */
  1376. /*  in order to work with our 'slider position' concept, we shift these */
  1377. /*  values to -15 = extreme left, 15 = extreme right, 0 = center. */
  1378. /* */
  1379. /*      MIXERCONTROL.Bounds.lMinimum    = -15   ALWAYS! */
  1380. /*      MIXERCONTROL.Bounds.lMaximum    = 15    ALWAYS! */
  1381. /*      MIXERCONTROL.Metrics.cSteps     = 1     ALWAYS! */
  1382. /* */
  1383. /* */
  1384.      MIXERCONTROL_CONTROLTYPE_SLIDER         (MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED)
  1385.      MIXERCONTROL_CONTROLTYPE_PAN            (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
  1386.      MIXERCONTROL_CONTROLTYPE_QSOUNDPAN      (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
  1387.  
  1388.  
  1389. /* */
  1390. /*  Simple Faders (unsigned integer) */
  1391. /* */
  1392. /*      MIXERCONTROL.Bounds.dwMinimum   = 0     ALWAYS! */
  1393. /*      MIXERCONTROL.Bounds.dwMaximum   = 65535 ALWAYS! */
  1394. /* */
  1395. /*      MIXERCONTROL.Metrics.cSteps     = number of steps for range. */
  1396. /* */
  1397. /*  these faders are meant to be as simple as possible for an application */
  1398. /*  to use. the Bounds are fixed to be 0 to $FFFF with $8000 being half */
  1399. /*  volume/level. these values are LINEAR and there are no units. 0 is */
  1400. /*  minimum volume/level, $FFFF is maximum. */
  1401. /* */
  1402. /*  if an application wants to display a scrollbar that does not contain */
  1403. /*  a bunch of 'dead space', then the scrollbar range should be set to */
  1404. /*  MIXERCONTROL.Metrics.cSteps and dwValue should be scaled appropriately */
  1405. /*  with MulDiv. */
  1406. /* */
  1407.      MIXERCONTROL_CONTROLTYPE_FADER          (MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1408.      MIXERCONTROL_CONTROLTYPE_VOLUME         (MIXERCONTROL_CONTROLTYPE_FADER + 1)
  1409.      MIXERCONTROL_CONTROLTYPE_BASS           (MIXERCONTROL_CONTROLTYPE_FADER + 2)
  1410.      MIXERCONTROL_CONTROLTYPE_TREBLE         (MIXERCONTROL_CONTROLTYPE_FADER + 3)
  1411.      MIXERCONTROL_CONTROLTYPE_EQUALIZER      (MIXERCONTROL_CONTROLTYPE_FADER + 4)
  1412.  
  1413.  
  1414. /* */
  1415. /*  List (single select) */
  1416. /* */
  1417. /*      MIXERCONTROL.cMultipleItems = number of items in list */
  1418. /* */
  1419. /*      MIXER_GETCONTROLDETAILSF_LISTTEXT should be used to get the text */
  1420. /*      for each item. */
  1421. /* */
  1422. /*      MIXERCONTROLDETAILS_BOOLEAN should be used to set and retrieve */
  1423. /*      what item is selected (fValue = TRUE if selected). */
  1424. /* */
  1425. /*  the generic single select lists can be used for many things. some */
  1426. /*  examples are 'Effects'. a mixer driver could provide a list of */
  1427. /*  different effects that could be applied like */
  1428. /* */
  1429. /*      Reverbs: large hall, warm hall, bright plate, warehouse, etc. */
  1430. /* */
  1431. /*      Delays: sweep delays, hold delays, 1.34 sec delay, etc. */
  1432. /* */
  1433. /*      Vocal: recital hall, alcove, delay gate, etc */
  1434. /* */
  1435. /*  lots of uses! gates, compressors, filters, dynamics, etc, etc. */
  1436. /* */
  1437. /* */
  1438. /*  MIXERCONTROL_CONTROLTYPE_MUX: a 'Mux' is a single selection multiplexer. */
  1439. /*  usually a Mux is used to select, say, an input source for recording. */
  1440. /*  for example, a mixer driver might have a mux that lets the user select */
  1441. /*  between Microphone or Line-In (but not both!) for recording. this */
  1442. /*  would be a perfect place to use a Mux control. some cards (for example */
  1443. /*  Media Vision's 16 bit Pro Audio cards) can record from multiple sources */
  1444. /*  simultaneously, so they would use a MIXERCONTROL_CONTROLTYPE_MIXER, not */
  1445. /*  a MIXERCONTROL_CONTROLTYPE_MUX). */
  1446. /* */
  1447. /* */
  1448. /*  NOTE! because single select lists can change what selections are */
  1449. /*  possible based on other controls (uhg!), the application must examine */
  1450. /*  the fValue's of all items after setting the control details so the */
  1451. /*  display can be refreshed accordingly. an example might be that an */
  1452. /*  audio card cannot change its input source while recording--so the */
  1453. /*  selection would 'fail' by keeping the fValue on the current selection */
  1454. /*  (but mixerSetControlDetails will succeed!). */
  1455. /* */
  1456.      MIXERCONTROL_CONTROLTYPE_SINGLESELECT   (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1457.      MIXERCONTROL_CONTROLTYPE_MUX            (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
  1458.  
  1459.  
  1460. /* */
  1461. /*  List (multiple select) */
  1462. /* */
  1463. /*      MIXERCONTROL.cMultipleItems = number of items in list */
  1464. /* */
  1465. /*      MIXER_GETCONTROLDETAILSF_LISTTEXT should be used to get the text */
  1466. /*      for each item. */
  1467. /* */
  1468. /*      MIXERCONTROLDETAILS_BOOLEAN should be used to set and retrieve */
  1469. /*      what item(s) are selected (fValue = TRUE if selected). */
  1470. /* */
  1471. /*  NOTE! because multiple select lists can change what selections are */
  1472. /*  selected based on other selections (uhg!), the application must examine */
  1473. /*  the fValue's of all items after setting the control details so the */
  1474. /*  display can be refreshed accordingly. an example might be that an */
  1475. /*  audio card cannot change its input source(s) while recording--so the */
  1476. /*  selection would 'fail' by keeping the fValue on the current selection(s) */
  1477. /*  (but mixerSetControlDetails will succeed!). */
  1478. /* */
  1479.      MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1480.      MIXERCONTROL_CONTROLTYPE_MIXER          (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
  1481.  
  1482.  
  1483. /* */
  1484. /*  Time Controls */
  1485. /* */
  1486. /*      MIXERCONTROL.Bounds.dwMinimum   = min */
  1487. /*      MIXERCONTROL.Bounds.dwMaximum   = max */
  1488. /* */
  1489. /*  time controls are meant for inputing time information. these can be */
  1490. /*  used for effects such as delay, reverb, etc. */
  1491. /* */
  1492. /* */
  1493.      MIXERCONTROL_CONTROLTYPE_MICROTIME      (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1494.  
  1495.      MIXERCONTROL_CONTROLTYPE_MILLITIME      (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1496.  
  1497.  
  1498.  
  1499. /* */
  1500. /*  MIXERLINECONTROLS */
  1501. /* */
  1502. /* */
  1503. /* */
  1504. typedef struct tMIXERLINECONTROLSA
  1505. {
  1506.     DWORD           cbStruct;       // size in bytes of MIXERLINECONTROLS
  1507.     DWORD           dwLineID;       // line id (from MIXERLINE.dwLineID)
  1508.     union
  1509.     {
  1510.         DWORD       dwControlID;    // MIXER_GETLINECONTROLSF_ONEBYID
  1511.         DWORD       dwControlType;  // MIXER_GETLINECONTROLSF_ONEBYTYPE
  1512.     } _UNION_NAME(u);
  1513.     DWORD           cControls;      // count of controls pmxctrl points to
  1514.     DWORD           cbmxctrl;       // size in bytes of _one_ MIXERCONTROL
  1515.     LPMIXERCONTROLA pamxctrl;       // pointer to first MIXERCONTROL array
  1516. } MIXERLINECONTROLSA;
  1517. /* */
  1518. /*  MIXERLINECONTROLS */
  1519. /* */
  1520. /* */
  1521. /* */
  1522. typedef struct tMIXERLINECONTROLSW
  1523. {
  1524.     DWORD           cbStruct;       // size in bytes of MIXERLINECONTROLS
  1525.     DWORD           dwLineID;       // line id (from MIXERLINE.dwLineID)
  1526.     union
  1527.     {
  1528.         DWORD       dwControlID;    // MIXER_GETLINECONTROLSF_ONEBYID
  1529.         DWORD       dwControlType;  // MIXER_GETLINECONTROLSF_ONEBYTYPE
  1530.     } _UNION_NAME(u);
  1531.     DWORD           cControls;      // count of controls pmxctrl points to
  1532.     DWORD           cbmxctrl;       // size in bytes of _one_ MIXERCONTROL
  1533.     LPMIXERCONTROLW pamxctrl;       // pointer to first MIXERCONTROL array
  1534. } MIXERLINECONTROLSW;
  1535. #ifdef UNICODE
  1536. typedef MIXERLINECONTROLSW MIXERLINECONTROLS;
  1537. #else
  1538. typedef MIXERLINECONTROLSA MIXERLINECONTROLS;
  1539. #endif // UNICODE
  1540. typedef MIXERLINECONTROLSA *PMIXERLINECONTROLSA;
  1541. typedef MIXERLINECONTROLSW *PMIXERLINECONTROLSW;
  1542. #ifdef UNICODE
  1543. typedef PMIXERLINECONTROLSW PMIXERLINECONTROLS;
  1544. #else
  1545. typedef PMIXERLINECONTROLSA PMIXERLINECONTROLS;
  1546. #endif // UNICODE
  1547. typedef MIXERLINECONTROLSA     *LPMIXERLINECONTROLSA;
  1548. typedef MIXERLINECONTROLSW     *LPMIXERLINECONTROLSW;
  1549. #ifdef UNICODE
  1550. typedef LPMIXERLINECONTROLSW LPMIXERLINECONTROLS;
  1551. #else
  1552. typedef LPMIXERLINECONTROLSA LPMIXERLINECONTROLS;
  1553. #endif // UNICODE
  1554.  
  1555.  
  1556. MMRESULT APIENTRY mixerGetLineControlsA(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
  1557. MMRESULT APIENTRY mixerGetLineControlsW(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
  1558. #ifdef UNICODE
  1559.      mixerGetLineControls  mixerGetLineControlsW
  1560. #else
  1561.      mixerGetLineControls  mixerGetLineControlsA
  1562. #endif // !UNICODE
  1563.  
  1564.  
  1565.  
  1566.      MIXER_GETLINECONTROLSF_ALL          $00000000L
  1567.      MIXER_GETLINECONTROLSF_ONEBYID      $00000001L
  1568.      MIXER_GETLINECONTROLSF_ONEBYTYPE    $00000002L
  1569.  
  1570.      MIXER_GETLINECONTROLSF_QUERYMASK    $0000000FL
  1571.  
  1572.  
  1573. typedef struct tMIXERCONTROLDETAILS
  1574. {
  1575.     DWORD           cbStruct;       // size in bytes of MIXERCONTROLDETAILS
  1576.     DWORD           dwControlID;    // control id to get/set details on
  1577.  
  1578.     DWORD           cChannels;      // number of channels in paDetails array
  1579.  
  1580.     union
  1581.     {
  1582.         HWND        hwndOwner;      // for MIXER_SETCONTROLDETAILSF_CUSTOM
  1583.         DWORD       cMultipleItems; // if _MULTIPLE, the number of items per channel
  1584.     } _UNION_NAME(u);
  1585.     DWORD           cbDetails;      // size of _one_ details_XX struct
  1586.     LPVOID          paDetails;      // pointer to array of details_XX structs
  1587.  
  1588. } MIXERCONTROLDETAILS, *PMIXERCONTROLDETAILS,     *LPMIXERCONTROLDETAILS;
  1589.  
  1590.  
  1591. /* */
  1592. /*  MIXER_GETCONTROLDETAILSF_LISTTEXT */
  1593. /* */
  1594. /* */
  1595. typedef struct tMIXERCONTROLDETAILS_LISTTEXTA
  1596. {
  1597.     DWORD           dwParam1;
  1598.     DWORD           dwParam2;
  1599.     CHAR            szName[MIXER_LONG_NAME_CHARS];
  1600. }       MIXERCONTROLDETAILS_LISTTEXTA;
  1601. /* */
  1602. /*  MIXER_GETCONTROLDETAILSF_LISTTEXT */
  1603. /* */
  1604. /* */
  1605. typedef struct tMIXERCONTROLDETAILS_LISTTEXTW
  1606. {
  1607.     DWORD           dwParam1;
  1608.     DWORD           dwParam2;
  1609.     WCHAR           szName[MIXER_LONG_NAME_CHARS];
  1610. }       MIXERCONTROLDETAILS_LISTTEXTW;
  1611. #ifdef UNICODE
  1612. typedef MIXERCONTROLDETAILS_LISTTEXTW MIXERCONTROLDETAILS_LISTTEXT;
  1613. #else
  1614. typedef MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT;
  1615. #endif // UNICODE
  1616. typedef MIXERCONTROLDETAILS_LISTTEXTA *PMIXERCONTROLDETAILS_LISTTEXTA;
  1617. typedef MIXERCONTROLDETAILS_LISTTEXTW *PMIXERCONTROLDETAILS_LISTTEXTW;
  1618. #ifdef UNICODE
  1619. typedef PMIXERCONTROLDETAILS_LISTTEXTW PMIXERCONTROLDETAILS_LISTTEXT;
  1620. #else
  1621. typedef PMIXERCONTROLDETAILS_LISTTEXTA PMIXERCONTROLDETAILS_LISTTEXT;
  1622. #endif // UNICODE
  1623. typedef MIXERCONTROLDETAILS_LISTTEXTA     *LPMIXERCONTROLDETAILS_LISTTEXTA;
  1624. typedef MIXERCONTROLDETAILS_LISTTEXTW     *LPMIXERCONTROLDETAILS_LISTTEXTW;
  1625. #ifdef UNICODE
  1626. typedef LPMIXERCONTROLDETAILS_LISTTEXTW LPMIXERCONTROLDETAILS_LISTTEXT;
  1627. #else
  1628. typedef LPMIXERCONTROLDETAILS_LISTTEXTA LPMIXERCONTROLDETAILS_LISTTEXT;
  1629. #endif // UNICODE
  1630.  
  1631.  
  1632. /* */
  1633. /*  MIXER_GETCONTROLDETAILSF_VALUE */
  1634. /* */
  1635. /* */
  1636. typedef struct tMIXERCONTROLDETAILS_BOOLEAN
  1637. {
  1638.     LONG            fValue;
  1639. }       MIXERCONTROLDETAILS_BOOLEAN,
  1640.       *PMIXERCONTROLDETAILS_BOOLEAN,
  1641.      *LPMIXERCONTROLDETAILS_BOOLEAN;
  1642.  
  1643. typedef struct tMIXERCONTROLDETAILS_SIGNED
  1644. {
  1645.     LONG            lValue;
  1646. }       MIXERCONTROLDETAILS_SIGNED,
  1647.       *PMIXERCONTROLDETAILS_SIGNED,
  1648.      *LPMIXERCONTROLDETAILS_SIGNED;
  1649.  
  1650.  
  1651. typedef struct tMIXERCONTROLDETAILS_UNSIGNED
  1652. {
  1653.     DWORD           dwValue;
  1654. }       MIXERCONTROLDETAILS_UNSIGNED,
  1655.       *PMIXERCONTROLDETAILS_UNSIGNED,
  1656.      *LPMIXERCONTROLDETAILS_UNSIGNED;
  1657.  
  1658.  
  1659. MMRESULT APIENTRY mixerGetControlDetailsA(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1660. MMRESULT APIENTRY mixerGetControlDetailsW(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1661. #ifdef UNICODE
  1662.      mixerGetControlDetails  mixerGetControlDetailsW
  1663. #else
  1664.      mixerGetControlDetails  mixerGetControlDetailsA
  1665. #endif // !UNICODE
  1666.  
  1667.      MIXER_GETCONTROLDETAILSF_VALUE      $00000000L
  1668.      MIXER_GETCONTROLDETAILSF_LISTTEXT   $00000001L
  1669.  
  1670.      MIXER_GETCONTROLDETAILSF_QUERYMASK  $0000000FL
  1671.  
  1672.  
  1673. MMRESULT APIENTRY mixerSetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1674.  
  1675.      MIXER_SETCONTROLDETAILSF_VALUE      $00000000L
  1676.      MIXER_SETCONTROLDETAILSF_CUSTOM     $00000001L
  1677.  
  1678.      MIXER_SETCONTROLDETAILSF_QUERYMASK  $0000000FL
  1679.  
  1680. #endif // ifndef MMNOMIXER
  1681.  
  1682.  
  1683.  
  1684. #ifndef MMNOTIMER
  1685. /****************************************************************************
  1686.  
  1687.                             Timer support
  1688.  
  1689. ****************************************************************************/
  1690.  
  1691. /* timer error return values */
  1692.      TIMERR_NOERROR        (0)                  // no error
  1693.      TIMERR_NOCANDO        (TIMERR_BASE+1)      // request not completed
  1694.      TIMERR_STRUCT         (TIMERR_BASE+33)     // time struct size
  1695.  
  1696. /* timer data types */
  1697. typedef VOID (CALLBACK TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
  1698. typedef TIMECALLBACK     *LPTIMECALLBACK;
  1699.  
  1700.  
  1701. /* flags for wFlags parameter of timeSetEvent() function */
  1702.      TIME_ONESHOT              $00000000   // program timer for single event
  1703.      TIME_PERIODIC             $00000001   // program for continuous periodic event
  1704.  
  1705.      TIME_CALLBACK_FUNCTION    $00000000   // callback is function
  1706.      TIME_CALLBACK_EVENT_SET   $00000010   // callback is event - use SetEvent
  1707.      TIME_CALLBACK_EVENT_PULSE $00000020   // callback is event - use PulseEvent
  1708.  
  1709. /* timer device capabilities data structure */
  1710. typedef struct timecaps_tag {
  1711.     UINT    wPeriodMin;     // minimum period supported
  1712.     UINT    wPeriodMax;     // maximum period supported
  1713. } TIMECAPS;
  1714. typedef TIMECAPS       *PTIMECAPS;
  1715. typedef TIMECAPS      *NPTIMECAPS;
  1716. typedef TIMECAPS      *LPTIMECAPS;
  1717.  
  1718. /* timer function prototypes */
  1719. MMRESULT APIENTRY timeGetSystemTime(LPMMTIME lpmmt, UINT cbmmt);
  1720. DWORD APIENTRY timeGetTime(VOID);
  1721. UINT APIENTRY timeSetEvent(UINT uDelay, UINT uResolution,
  1722.     LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
  1723. MMRESULT APIENTRY timeKillEvent(UINT uTimerID);
  1724. MMRESULT APIENTRY timeGetDevCaps(LPTIMECAPS lptc, UINT cbtc);
  1725. MMRESULT APIENTRY timeBeginPeriod(UINT uPeriod);
  1726. MMRESULT APIENTRY timeEndPeriod(UINT uPeriod);
  1727.  
  1728. #endif  //ifndef MMNOTIMER
  1729.  
  1730.  
  1731. #ifndef MMNOJOY
  1732. /****************************************************************************
  1733.  
  1734.                             Joystick support
  1735.  
  1736. ****************************************************************************/
  1737.  
  1738. /* joystick error return values */
  1739.      JOYERR_NOERROR        (0)                  // no error
  1740.      JOYERR_PARMS          (JOYERR_BASE+5)      // bad parameters
  1741.      JOYERR_NOCANDO        (JOYERR_BASE+6)      // request not completed
  1742.      JOYERR_UNPLUGGED      (JOYERR_BASE+7)      // joystick is unplugged
  1743.  
  1744. /* constants used with JOYINFO structure and MM_JOY* messages */
  1745.      JOY_BUTTON1         $0001
  1746.      JOY_BUTTON2         $0002
  1747.      JOY_BUTTON3         $0004
  1748.      JOY_BUTTON4         $0008
  1749.      JOY_BUTTON1CHG      $0100
  1750.      JOY_BUTTON2CHG      $0200
  1751.      JOY_BUTTON3CHG      $0400
  1752.      JOY_BUTTON4CHG      $0800
  1753.  
  1754. /* joystick ID constants */
  1755.      JOYSTICKID1         0
  1756.      JOYSTICKID2         1
  1757.  
  1758. /* joystick device capabilities data structure */
  1759. typedef struct tagJOYCAPSA {
  1760.     WORD    wMid;                  // manufacturer ID
  1761.     WORD    wPid;                  // product ID
  1762.     CHAR    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  1763.     UINT    wXmin;                 // minimum x position value
  1764.     UINT    wXmax;                 // maximum x position value
  1765.     UINT    wYmin;                 // minimum y position value
  1766.     UINT    wYmax;                 // maximum y position value
  1767.     UINT    wZmin;                 // minimum z position value
  1768.     UINT    wZmax;                 // maximum z position value
  1769.     UINT    wNumButtons;           // number of buttons
  1770.     UINT    wPeriodMin;            // minimum message period when captured
  1771.     UINT    wPeriodMax;            // maximum message period when captured
  1772. } JOYCAPSA;
  1773. /* joystick device capabilities data structure */
  1774. typedef struct tagJOYCAPSW {
  1775.     WORD    wMid;                  // manufacturer ID
  1776.     WORD    wPid;                  // product ID
  1777.     WCHAR   szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  1778.     UINT    wXmin;                 // minimum x position value
  1779.     UINT    wXmax;                 // maximum x position value
  1780.     UINT    wYmin;                 // minimum y position value
  1781.     UINT    wYmax;                 // maximum y position value
  1782.     UINT    wZmin;                 // minimum z position value
  1783.     UINT    wZmax;                 // maximum z position value
  1784.     UINT    wNumButtons;           // number of buttons
  1785.     UINT    wPeriodMin;            // minimum message period when captured
  1786.     UINT    wPeriodMax;            // maximum message period when captured
  1787. } JOYCAPSW;
  1788. #ifdef UNICODE
  1789. typedef JOYCAPSW JOYCAPS;
  1790. #else
  1791. typedef JOYCAPSA JOYCAPS;
  1792. #endif // UNICODE
  1793. typedef JOYCAPSA      *PJOYCAPSA;
  1794. typedef JOYCAPSW      *PJOYCAPSW;
  1795. #ifdef UNICODE
  1796. typedef PJOYCAPSW PJOYCAPS;
  1797. #else
  1798. typedef PJOYCAPSA PJOYCAPS;
  1799. #endif // UNICODE
  1800. typedef JOYCAPSA      *NPJOYCAPSA;
  1801. typedef JOYCAPSW      *NPJOYCAPSW;
  1802. #ifdef UNICODE
  1803. typedef NPJOYCAPSW NPJOYCAPS;
  1804. #else
  1805. typedef NPJOYCAPSA NPJOYCAPS;
  1806. #endif // UNICODE
  1807. typedef JOYCAPSA      *LPJOYCAPSA;
  1808. typedef JOYCAPSW      *LPJOYCAPSW;
  1809. #ifdef UNICODE
  1810. typedef LPJOYCAPSW LPJOYCAPS;
  1811. #else
  1812. typedef LPJOYCAPSA LPJOYCAPS;
  1813. #endif // UNICODE
  1814.  
  1815. /* joystick information data structure */
  1816. typedef struct joyinfo_tag {
  1817.     UINT wXpos;                 // x position
  1818.     UINT wYpos;                 // y position
  1819.     UINT wZpos;                 // z position
  1820.     UINT wButtons;              // button states
  1821. } JOYINFO;
  1822. typedef JOYINFO       *PJOYINFO;
  1823. typedef JOYINFO      *NPJOYINFO;
  1824. typedef JOYINFO      *LPJOYINFO;
  1825.  
  1826. /* joystick function prototypes */
  1827. UINT     APIENTRY joyGetNumDevs(VOID);
  1828. MMRESULT APIENTRY joyGetDevCapsA(UINT uJoyId, LPJOYCAPSA lpjc, UINT cbjc);
  1829. MMRESULT APIENTRY joyGetDevCapsW(UINT uJoyId, LPJOYCAPSW lpjc, UINT cbjc);
  1830. #ifdef UNICODE
  1831.      joyGetDevCaps  joyGetDevCapsW
  1832. #else
  1833.      joyGetDevCaps  joyGetDevCapsA
  1834. #endif // !UNICODE
  1835. MMRESULT APIENTRY joyGetPos(UINT uJoyID, LPJOYINFO lpji);
  1836. MMRESULT APIENTRY joyGetThreshold(UINT uJoyID, LPUINT lpuThreshold);
  1837. MMRESULT APIENTRY joyReleaseCapture(UINT uJoyID);
  1838. MMRESULT APIENTRY joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
  1839.     BOOL fChanged);
  1840. MMRESULT APIENTRY joySetThreshold(UINT uJoyID, UINT uThreshold);
  1841.  
  1842.  
  1843. #endif  //ifndef MMNOJOY
  1844.  
  1845. #ifndef MMNOMMIO
  1846. /****************************************************************************
  1847.  
  1848.                         Multimedia File I/O support
  1849.  
  1850. ****************************************************************************/
  1851.  
  1852. /* MMIO error return values */
  1853.      MMIOERR_BASE            256
  1854.      MMIOERR_FILENOTFOUND     (MMIOERR_BASE + 1)  // file not found
  1855.      MMIOERR_OUTOFMEMORY      (MMIOERR_BASE + 2)  // out of memory
  1856.      MMIOERR_CANNOTOPEN       (MMIOERR_BASE + 3)  // cannot open
  1857.      MMIOERR_CANNOTCLOSE      (MMIOERR_BASE + 4)  // cannot close
  1858.      MMIOERR_CANNOTREAD       (MMIOERR_BASE + 5)  // cannot read
  1859.      MMIOERR_CANNOTWRITE      (MMIOERR_BASE + 6)  // cannot write
  1860.      MMIOERR_CANNOTSEEK       (MMIOERR_BASE + 7)  // cannot seek
  1861.      MMIOERR_CANNOTEXPAND     (MMIOERR_BASE + 8)  // cannot expand file
  1862.      MMIOERR_CHUNKNOTFOUND    (MMIOERR_BASE + 9)  // chunk not found
  1863.      MMIOERR_UNBUFFERED       (MMIOERR_BASE + 10) // file is unbuffered
  1864.      MMIOERR_PATHNOTFOUND     (MMIOERR_BASE + 11) // path incorrect
  1865.      MMIOERR_ACCESSDENIED     (MMIOERR_BASE + 12) // file was protected
  1866.      MMIOERR_SHARINGVIOLATION (MMIOERR_BASE + 13) // file in use
  1867.      MMIOERR_NETWORKERROR     (MMIOERR_BASE + 14) // network not responding
  1868.      MMIOERR_TOOMANYOPENFILES (MMIOERR_BASE + 15) // no more file handles
  1869.      MMIOERR_INVALIDFILE      (MMIOERR_BASE + 16) // default error file error
  1870.  
  1871. /* MMIO constants */
  1872.      CFSEPCHAR       '+'             // compound file name separator char.
  1873.  
  1874. /* MMIO data types */
  1875. typedef DWORD           FOURCC;         // a four character code
  1876. typedef LPSTR           HPSTR;          // a huge version of LPSTR
  1877. typedef LPCSTR          HPCSTR;         // a huge version of LPCSTR
  1878. typedef HANDLE          HMMIO;          // a handle to an open file
  1879. typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMsg,
  1880.             LPARAM lParam1, LPARAM lParam2);
  1881. typedef MMIOPROC     *LPMMIOPROC;
  1882.  
  1883. /* general MMIO information data structure */
  1884. typedef struct _MMIOINFO        // The MMIO state
  1885. {
  1886.         /* general fields */
  1887.         DWORD           dwFlags;        // general status flags
  1888.         FOURCC          fccIOProc;      // 4 char id for the I/O procedure
  1889.         LPMMIOPROC      pIOProc;        // pointer to I/O procedure
  1890.         UINT            wErrorRet;      // place for error to be returned
  1891.         HTASK           htask;          // alternate local task
  1892.  
  1893.         /* fields maintained by MMIO functions during buffered I/O */
  1894.         LONG            cchBuffer;      // size of I/O buffer (or 0L)
  1895.         HPSTR           pchBuffer;      // start of I/O buffer (or NULL)
  1896.         HPSTR           pchNext;        // pointer to next byte to read/write
  1897.         HPSTR           pchEndRead;     // pointer to last valid byte to read
  1898.         HPSTR           pchEndWrite;    // pointer to last byte to write
  1899.         LONG            lBufOffset;     // disk offset of start of buffer
  1900.  
  1901.         /* fields maintained by I/O procedure */
  1902.         LONG            lDiskOffset;    // disk offset of next read or write
  1903.         DWORD           adwInfo[3];     // data specific to type of MMIOPROC
  1904.  
  1905.         /* other fields maintained by MMIO */
  1906.         DWORD           dwReserved1;    // reserved for MMIO use
  1907.         DWORD           dwReserved2;    // reserved for MMIO use
  1908.         HMMIO           hmmio;          // handle to open file
  1909.  
  1910. } MMIOINFO;
  1911. typedef MMIOINFO       *PMMIOINFO;
  1912. typedef MMIOINFO      *NPMMIOINFO;
  1913. typedef MMIOINFO      *LPMMIOINFO;
  1914. typedef CONST MMIOINFO *LPCMMIOINFO;
  1915.  
  1916. /* RIFF chunk information data structure */
  1917. typedef struct MMCKINFO_tag      // structure for representing RIFF chunk info.
  1918. {
  1919.         FOURCC          ckid;           // chunk ID
  1920.         DWORD           cksize;         // chunk size
  1921.         FOURCC          fccType;        // form type or list type
  1922.         DWORD           dwDataOffset;   // offset of data portion of chunk
  1923.         DWORD           dwFlags;        // flags used by MMIO functions
  1924. } MMCKINFO;
  1925. typedef MMCKINFO       *PMMCKINFO;
  1926. typedef MMCKINFO      *NPMMCKINFO;
  1927. typedef MMCKINFO      *LPMMCKINFO;
  1928. typedef CONST MMCKINFO *LPCMMCKINFO;
  1929.  
  1930. /* bit field masks */
  1931. /* <dwFlags> field of MMIOINFO structure -- many same as OpenFile() flags */
  1932. /* Low word of flags will be passed to OpenFile() -- therefore, any MMIO-
  1933.     specific flags should be in the high word.  */
  1934.      MMIO_RWMODE     $00000003      // mask to get bits used for opening
  1935.                                         // file for reading/writing/both
  1936.      MMIO_SHAREMODE  $00000070      // file sharing mode number
  1937.  
  1938. /* constants for dwFlags field of MMIOINFO */
  1939.      MMIO_CREATE     $00001000      // create new file (or truncate file)
  1940.      MMIO_PARSE      $00000100      // parse new file returning path
  1941.      MMIO_DELETE     $00000200      // create new file (or truncate file)
  1942.      MMIO_EXIST      $00004000      // checks for existence of file
  1943.      MMIO_ALLOCBUF   $00010000      // mmioOpen() should allocate a buffer
  1944.      MMIO_GETTEMP    $00020000      // mmioOpen() should retrieve temp name
  1945.  
  1946.      MMIO_DIRTY      $10000000      // I/O buffer is dirty
  1947. /* MMIO_DIRTY is also used in the <dwFlags> field of MMCKINFO structure */
  1948.  
  1949.  
  1950. /* read/write mode numbers (bit field MMIO_RWMODE) */
  1951.      MMIO_READ       $00000000      // open file for reading only
  1952.      MMIO_WRITE      $00000001      // open file for writing only
  1953.      MMIO_READWRITE  $00000002      // open file for reading and writing
  1954.  
  1955. /* share mode numbers (bit field MMIO_SHAREMODE) */
  1956.      MMIO_COMPAT     $00000000      // compatibility mode
  1957.      MMIO_EXCLUSIVE  $00000010      // exclusive-access mode
  1958.      MMIO_DENYWRITE  $00000020      // deny writing to other processes
  1959.      MMIO_DENYREAD   $00000030      // deny reading to other processes
  1960.      MMIO_DENYNONE   $00000040      // deny nothing to other processes
  1961.  
  1962. /* flags for other functions */
  1963.      MMIO_FHOPEN             $0010  // mmioClose: keep file handle open
  1964.      MMIO_EMPTYBUF           $0010  // mmioFlush: empty the I/O buffer
  1965.      MMIO_TOUPPER            $0010  // mmioStringToFOURCC: cvt. to u-case
  1966.      MMIO_INSTALLPROC    $00010000  // mmioInstallIOProc: install MMIOProc
  1967.      MMIO_GLOBALPROC     $10000000  // mmioInstallIOProc: install globally
  1968.      MMIO_REMOVEPROC     $00020000  // mmioInstallIOProc:   remove MMIOProc
  1969.      MMIO_UNICODEPROC    $01000000  // mmioInstallIOProc: Unicode MMIOProc
  1970.  
  1971.      MMIO_FINDPROC       $00040000  // mmioInstallIOProc: find an MMIOProc
  1972.      MMIO_FINDCHUNK          $0010  // mmioDescend: find a chunk by ID
  1973.      MMIO_FINDRIFF           $0020  // mmioDescend: find a LIST chunk
  1974.      MMIO_FINDLIST           $0040  // mmioDescend: find a RIFF chunk
  1975.      MMIO_CREATERIFF         $0020  // mmioCreateChunk: make a LIST chunk
  1976.      MMIO_CREATELIST         $0040  // mmioCreateChunk: make a RIFF chunk
  1977.  
  1978.  
  1979. /* message numbers for MMIOPROC I/O procedure functions */
  1980.      MMIOM_READ      MMIO_READ       // read (must equal MMIO_READ!)
  1981.      MMIOM_WRITE    MMIO_WRITE       // write (must equal MMIO_WRITE!)
  1982.      MMIOM_SEEK              2       // seek to a new position in file
  1983.      MMIOM_OPEN              3       // open file
  1984.      MMIOM_CLOSE             4       // close file
  1985.      MMIOM_WRITEFLUSH        5       // write and flush
  1986.      MMIOM_RENAME            6       // rename specified file
  1987.  
  1988.      MMIOM_USER         $8000       // beginning of user-defined messages
  1989.  
  1990. /* standard four character codes */
  1991.      FOURCC_RIFF     mmioFOURCC('R', 'I', 'F', 'F')
  1992.      FOURCC_LIST     mmioFOURCC('L', 'I', 'S', 'T')
  1993.  
  1994. /* four character codes used to identify standard built-in I/O procedures */
  1995.      FOURCC_DOS      mmioFOURCC('D', 'O', 'S', ' ')
  1996.      FOURCC_MEM      mmioFOURCC('M', 'E', 'M', ' ')
  1997.  
  1998. /* flags for mmioSeek() */
  1999. #ifndef SEEK_SET
  2000.      SEEK_SET        0               // seek to an absolute position
  2001.      SEEK_CUR        1               // seek relative to current position
  2002.      SEEK_END        2               // seek relative to end of file
  2003. #endif  //ifndef SEEK_SET
  2004.  
  2005. /* other constants */
  2006.      MMIO_DEFAULTBUFFER      8192    // default buffer size
  2007.  
  2008. /* MMIO macros */
  2009.  
  2010.      mmioFOURCC( ch0, ch1, ch2, ch3 )                                \
  2011.                 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) |    \
  2012.                 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  2013. /* This macro is machine byte-sex and word-sex dependent!! */
  2014. /* The characters are BYTES, so compatible with ANSI, not at all with UNICODE */
  2015.  
  2016. /* MMIO function prototypes */
  2017. FOURCC APIENTRY mmioStringToFOURCCA(LPCSTR sz, UINT uFlags);
  2018. /* MMIO function prototypes */
  2019. FOURCC APIENTRY mmioStringToFOURCCW(LPCWSTR sz, UINT uFlags);
  2020. #ifdef UNICODE
  2021.      mmioStringToFOURCC  mmioStringToFOURCCW
  2022. #else
  2023.      mmioStringToFOURCC  mmioStringToFOURCCA
  2024. #endif // !UNICODE
  2025.  
  2026. LPMMIOPROC APIENTRY mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc,
  2027.                                         DWORD dwFlags);
  2028. LPMMIOPROC APIENTRY mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc,
  2029.                                         DWORD dwFlags);
  2030. #ifdef UNICODE
  2031.      mmioInstallIOProc  mmioInstallIOProcW
  2032. #else
  2033.      mmioInstallIOProc  mmioInstallIOProcA
  2034. #endif // !UNICODE
  2035.  
  2036. HMMIO APIENTRY mmioOpenA( LPSTR szFileName, LPMMIOINFO lpmmioinfo, DWORD fdwOpen);
  2037. HMMIO APIENTRY mmioOpenW( LPWSTR szFileName, LPMMIOINFO lpmmioinfo, DWORD fdwOpen);
  2038. #ifdef UNICODE
  2039.      mmioOpen  mmioOpenW
  2040. #else
  2041.      mmioOpen  mmioOpenA
  2042. #endif // !UNICODE
  2043.  
  2044. MMRESULT APIENTRY mmioRenameA ( LPCSTR szFileName, LPCSTR szNewFileName,
  2045.                                LPCMMIOINFO lpmmioinfo, DWORD fdwRename);
  2046. MMRESULT APIENTRY mmioRenameW ( LPCWSTR szFileName, LPCWSTR szNewFileName,
  2047.                                LPCMMIOINFO lpmmioinfo, DWORD fdwRename);
  2048. #ifdef UNICODE
  2049.      mmioRename  mmioRenameW
  2050. #else
  2051.      mmioRename  mmioRenameA
  2052. #endif // !UNICODE
  2053.  
  2054. MMRESULT APIENTRY mmioClose(HMMIO hmmio, UINT fuClose);
  2055. LRESULT APIENTRY mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  2056. LRESULT APIENTRY mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch);
  2057. LRESULT APIENTRY mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  2058. MMRESULT APIENTRY mmioGetInfo(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT fuInfo);
  2059. MMRESULT APIENTRY mmioSetInfo(HMMIO hmmio, LPCMMIOINFO lpmmioinfo, UINT fuInfo);
  2060. MMRESULT APIENTRY mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  2061.     UINT fuBuffer);
  2062. MMRESULT APIENTRY mmioFlush(HMMIO hmmio, UINT fuFlush);
  2063. MMRESULT APIENTRY mmioAdvance(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT fuAdvance);
  2064.  
  2065. LRESULT APIENTRY mmioSendMessage( HMMIO hmmio, UINT uMsg,
  2066.     LPARAM lParam1, LPARAM lParam2);
  2067. /* RIFF I/O prototypes */
  2068. MMRESULT APIENTRY mmioDescend(HMMIO hmmio, LPMMCKINFO lpmmcki,
  2069.     LPCMMCKINFO lpmmckiParent, UINT fuDescend);
  2070. MMRESULT APIENTRY mmioAscend(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT fuAscend);
  2071. MMRESULT APIENTRY mmioCreateChunk(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT fuCreate);
  2072.  
  2073. #endif  //ifndef MMNOMMIO
  2074.  
  2075.  
  2076. #ifndef MMNOMCI
  2077. /****************************************************************************
  2078.  
  2079.                             MCI support
  2080.  
  2081. ****************************************************************************/
  2082.  
  2083. *)
  2084.  
  2085. TYPE
  2086.     MCIERROR=LONGWORD;
  2087.     MCIDEVICEID=LONGWORD;
  2088.  
  2089. (*
  2090. typedef UINT (CALLBACK *YIELDPROC)(MCIDEVICEID mciId, DWORD dwYieldData);
  2091.  
  2092. /*--------------------------------------------------------------------*\
  2093.                        MCI function prototypes
  2094. \*--------------------------------------------------------------------*/
  2095.  
  2096. MCIERROR APIENTRY mciSendCommandA(
  2097.     MCIDEVICEID mciId,
  2098.     UINT uMessage,
  2099.     DWORD dwParam1,
  2100.     DWORD dwParam2 );
  2101. MCIERROR APIENTRY mciSendCommandW(
  2102.     MCIDEVICEID mciId,
  2103.     UINT uMessage,
  2104.     DWORD dwParam1,
  2105.     DWORD dwParam2 );
  2106. #ifdef UNICODE
  2107.      mciSendCommand  mciSendCommandW
  2108. #else
  2109.      mciSendCommand  mciSendCommandA
  2110. #endif // !UNICODE
  2111.  
  2112. #ifdef UNICODE
  2113.      mciGetDeviceID  mciGetDeviceIDW
  2114. #else
  2115.      mciGetDeviceID  mciGetDeviceIDA
  2116. #endif // !UNICODE
  2117.  
  2118. MCIDEVICEID APIENTRY mciGetDeviceIDFromElementIDA(
  2119.     DWORD dwElementID,
  2120.     LPCSTR lpstrType );
  2121. MCIDEVICEID APIENTRY mciGetDeviceIDFromElementIDW(
  2122.     DWORD dwElementID,
  2123.     LPCWSTR lpstrType );
  2124. #ifdef UNICODE
  2125.      mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDW
  2126. #else
  2127.      mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDA
  2128. #endif // !UNICODE
  2129.  
  2130.  
  2131. BOOL APIENTRY mciSetYieldProc(MCIDEVICEID mciId, YIELDPROC fpYieldProc,
  2132.     DWORD dwYieldData);
  2133.  
  2134. HANDLE APIENTRY mciGetCreatorTask(MCIDEVICEID mciId);
  2135. YIELDPROC APIENTRY mciGetYieldProc(MCIDEVICEID mciId, LPDWORD pdwYieldData);
  2136. *)
  2137.  
  2138. CONST
  2139.      MCIERR_INVALID_DEVICE_ID        =(MCIERR_BASE + 1);
  2140.      MCIERR_UNRECOGNIZED_KEYWORD     =(MCIERR_BASE + 3);
  2141.      MCIERR_UNRECOGNIZED_COMMAND     =(MCIERR_BASE + 5);
  2142.      MCIERR_HARDWARE                 =(MCIERR_BASE + 6);
  2143.      MCIERR_INVALID_DEVICE_NAME      =(MCIERR_BASE + 7);
  2144.      MCIERR_OUT_OF_MEMORY            =(MCIERR_BASE + 8);
  2145.      MCIERR_DEVICE_OPEN              =(MCIERR_BASE + 9);
  2146.      MCIERR_CANNOT_LOAD_DRIVER       =(MCIERR_BASE + 10);
  2147.      MCIERR_MISSING_COMMAND_STRING   =(MCIERR_BASE + 11);
  2148.      MCIERR_PARAM_OVERFLOW           =(MCIERR_BASE + 12);
  2149.      MCIERR_MISSING_STRING_ARGUMENT  =(MCIERR_BASE + 13);
  2150.      MCIERR_BAD_INTEGER              =(MCIERR_BASE + 14);
  2151.      MCIERR_PARSER_INTERNAL          =(MCIERR_BASE + 15);
  2152.      MCIERR_DRIVER_INTERNAL          =(MCIERR_BASE + 16);
  2153.      MCIERR_MISSING_PARAMETER        =(MCIERR_BASE + 17);
  2154.      MCIERR_UNSUPPORTED_FUNCTION     =(MCIERR_BASE + 18);
  2155.      MCIERR_FILE_NOT_FOUND           =(MCIERR_BASE + 19);
  2156.      MCIERR_DEVICE_NOT_READY         =(MCIERR_BASE + 20);
  2157.      MCIERR_INTERNAL                 =(MCIERR_BASE + 21);
  2158.      MCIERR_DRIVER                   =(MCIERR_BASE + 22);
  2159.      MCIERR_CANNOT_USE_ALL           =(MCIERR_BASE + 23);
  2160.      MCIERR_MULTIPLE                 =(MCIERR_BASE + 24);
  2161.      MCIERR_EXTENSION_NOT_FOUND      =(MCIERR_BASE + 25);
  2162.      MCIERR_OUTOFRANGE               =(MCIERR_BASE + 26);
  2163.      MCIERR_FLAGS_NOT_COMPATIBLE     =(MCIERR_BASE + 28);
  2164.      MCIERR_FILE_NOT_SAVED           =(MCIERR_BASE + 30);
  2165.      MCIERR_DEVICE_TYPE_REQUIRED     =(MCIERR_BASE + 31);
  2166.      MCIERR_DEVICE_LOCKED            =(MCIERR_BASE + 32);
  2167.      MCIERR_DUPLICATE_ALIAS          =(MCIERR_BASE + 33);
  2168.      MCIERR_BAD_CONSTANT             =(MCIERR_BASE + 34);
  2169.      MCIERR_MUST_USE_SHAREABLE       =(MCIERR_BASE + 35);
  2170.      MCIERR_MISSING_DEVICE_NAME      =(MCIERR_BASE + 36);
  2171.      MCIERR_BAD_TIME_FORMAT          =(MCIERR_BASE + 37);
  2172.      MCIERR_NO_CLOSING_QUOTE         =(MCIERR_BASE + 38);
  2173.      MCIERR_DUPLICATE_FLAGS          =(MCIERR_BASE + 39);
  2174.      MCIERR_INVALID_FILE             =(MCIERR_BASE + 40);
  2175.      MCIERR_NULL_PARAMETER_BLOCK     =(MCIERR_BASE + 41);
  2176.      MCIERR_UNNAMED_RESOURCE         =(MCIERR_BASE + 42);
  2177.      MCIERR_NEW_REQUIRES_ALIAS       =(MCIERR_BASE + 43);
  2178.      MCIERR_NOTIFY_ON_AUTO_OPEN      =(MCIERR_BASE + 44);
  2179.      MCIERR_NO_ELEMENT_ALLOWED       =(MCIERR_BASE + 45);
  2180.      MCIERR_NONAPPLICABLE_FUNCTION   =(MCIERR_BASE + 46);
  2181.      MCIERR_ILLEGAL_FOR_AUTO_OPEN    =(MCIERR_BASE + 47);
  2182.      MCIERR_FILENAME_REQUIRED        =(MCIERR_BASE + 48);
  2183.      MCIERR_EXTRA_CHARACTERS         =(MCIERR_BASE + 49);
  2184.      MCIERR_DEVICE_NOT_INSTALLED     =(MCIERR_BASE + 50);
  2185.      MCIERR_GET_CD                   =(MCIERR_BASE + 51);
  2186.      MCIERR_SET_CD                   =(MCIERR_BASE + 52);
  2187.      MCIERR_SET_DRIVE                =(MCIERR_BASE + 53);
  2188.      MCIERR_DEVICE_LENGTH            =(MCIERR_BASE + 54);
  2189.      MCIERR_DEVICE_ORD_LENGTH        =(MCIERR_BASE + 55);
  2190.      MCIERR_NO_INTEGER               =(MCIERR_BASE + 56);
  2191.  
  2192.      MCIERR_WAVE_OUTPUTSINUSE        =(MCIERR_BASE + 64);
  2193.      MCIERR_WAVE_SETOUTPUTINUSE      =(MCIERR_BASE + 65);
  2194.      MCIERR_WAVE_INPUTSINUSE         =(MCIERR_BASE + 66);
  2195.      MCIERR_WAVE_SETINPUTINUSE       =(MCIERR_BASE + 67);
  2196.      MCIERR_WAVE_OUTPUTUNSPECIFIED   =(MCIERR_BASE + 68);
  2197.      MCIERR_WAVE_INPUTUNSPECIFIED    =(MCIERR_BASE + 69);
  2198.      MCIERR_WAVE_OUTPUTSUNSUITABLE   =(MCIERR_BASE + 70);
  2199.      MCIERR_WAVE_SETOUTPUTUNSUITABLE =(MCIERR_BASE + 71);
  2200.      MCIERR_WAVE_INPUTSUNSUITABLE    =(MCIERR_BASE + 72);
  2201.      MCIERR_WAVE_SETINPUTUNSUITABLE  =(MCIERR_BASE + 73);
  2202.  
  2203.      MCIERR_SEQ_DIV_INCOMPATIBLE     =(MCIERR_BASE + 80);
  2204.      MCIERR_SEQ_PORT_INUSE           =(MCIERR_BASE + 81);
  2205.      MCIERR_SEQ_PORT_NONEXISTENT     =(MCIERR_BASE + 82);
  2206.      MCIERR_SEQ_PORT_MAPNODEVICE     =(MCIERR_BASE + 83);
  2207.      MCIERR_SEQ_PORT_MISCERROR       =(MCIERR_BASE + 84);
  2208.      MCIERR_SEQ_TIMER                =(MCIERR_BASE + 85);
  2209.      MCIERR_SEQ_PORTUNSPECIFIED      =(MCIERR_BASE + 86);
  2210.      MCIERR_SEQ_NOMIDIPRESENT        =(MCIERR_BASE + 87);
  2211.  
  2212.      MCIERR_NO_WINDOW                =(MCIERR_BASE + 90);
  2213.      MCIERR_CREATEWINDOW             =(MCIERR_BASE + 91);
  2214.      MCIERR_FILE_READ                =(MCIERR_BASE + 92);
  2215.      MCIERR_FILE_WRITE               =(MCIERR_BASE + 93);
  2216.  
  2217.      MCIERR_NO_IDENTITY              =(MCIERR_BASE + 94);
  2218.  
  2219.      MCIERR_CUSTOM_DRIVER_BASE       =(MCIERR_BASE + 256);
  2220.  
  2221. (*
  2222. /****************************************************************************
  2223. *          MCI command message identifiers
  2224. *****************************************************************************/
  2225. /* Message numbers are hard coded because the resource compiler */
  2226. /* will otherwise fail on the RCDATA command table in mmsystem.rc */
  2227.  
  2228. /* They must be in the range between MCI_FIRST and MCI_LAST */
  2229.  
  2230.      MCI_FIRST                       DRV_MCI_FIRST   // $0800
  2231. /* Messages $801 and $802 are reserved */
  2232.      MCI_OPEN                        $0803
  2233.      MCI_CLOSE                       $0804
  2234.      MCI_ESCAPE                      $0805
  2235.      MCI_PLAY                        $0806
  2236.      MCI_SEEK                        $0807
  2237.      MCI_STOP                        $0808
  2238.      MCI_PAUSE                       $0809
  2239.      MCI_INFO                        $080A
  2240.      MCI_GETDEVCAPS                  $080B
  2241.      MCI_SPIN                        $080C
  2242.      MCI_SET                         $080D
  2243.      MCI_STEP                        $080E
  2244.      MCI_RECORD                      $080F
  2245.      MCI_SYSINFO                     $0810
  2246.      MCI_BREAK                       $0811
  2247.      MCI_SOUND                       $0812
  2248.      MCI_SAVE                        $0813
  2249.      MCI_STATUS                      $0814
  2250.  
  2251.      MCI_CUE                         $0830
  2252.  
  2253.      MCI_REALIZE                     $0840
  2254.      MCI_WINDOW                      $0841
  2255.      MCI_PUT                         $0842
  2256.      MCI_WHERE                       $0843
  2257.      MCI_FREEZE                      $0844
  2258.      MCI_UNFREEZE                    $0845
  2259.  
  2260.      MCI_LOAD                        $0850
  2261.      MCI_CUT                         $0851
  2262.      MCI_COPY                        $0852
  2263.      MCI_PASTE                       $0853
  2264.      MCI_UPDATE                      $0854
  2265.      MCI_RESUME                      $0855
  2266.      MCI_DELETE                      $0856
  2267.  
  2268.      MCI_LAST                        $0FFF
  2269.  
  2270. /* the next $400 message ID's are reserved for custom drivers */
  2271.      MCI_USER_MESSAGES               ($400 + MCI_FIRST)
  2272.  
  2273. /* device ID for "all MCI devices" */
  2274.      MCI_ALL_DEVICE_ID               ((MCIDEVICEID)-1)
  2275. /****************************************************************************
  2276. *   Structures for the lpdwParams (dwParam2) of mciSendCommand for those
  2277. *   command messages that may be parsed in string form.
  2278. *****************************************************************************/
  2279.  
  2280.  
  2281.  
  2282.  
  2283. /* constants for predefined MCI device types */
  2284. /* The resource compiler will not accept the symbolic version. */
  2285. /* It doesn't like the parentheses.                            */
  2286.      MCI_DEVTYPE_VCR             513 /* (MCI_STRING_OFFSET + 1)  */
  2287.      MCI_DEVTYPE_VIDEODISC       514 /* (MCI_STRING_OFFSET + 2)  */
  2288.      MCI_DEVTYPE_OVERLAY         515 /* (MCI_STRING_OFFSET + 3)  */
  2289.      MCI_DEVTYPE_CD_AUDIO        516 /* (MCI_STRING_OFFSET + 4)  */
  2290.      MCI_DEVTYPE_DAT             517 /* (MCI_STRING_OFFSET + 5)  */
  2291.      MCI_DEVTYPE_SCANNER         518 /* (MCI_STRING_OFFSET + 6)  */
  2292.      MCI_DEVTYPE_ANIMATION       519 /* (MCI_STRING_OFFSET + 7)  */
  2293.      MCI_DEVTYPE_DIGITAL_VIDEO   520 /* (MCI_STRING_OFFSET + 8)  */
  2294.      MCI_DEVTYPE_OTHER           521 /* (MCI_STRING_OFFSET + 9)  */
  2295.      MCI_DEVTYPE_WAVEFORM_AUDIO  522 /* (MCI_STRING_OFFSET + 10) */
  2296.      MCI_DEVTYPE_SEQUENCER       523 /* (MCI_STRING_OFFSET + 11) */
  2297.  
  2298.      MCI_DEVTYPE_FIRST               MCI_DEVTYPE_VCR
  2299.      MCI_DEVTYPE_LAST                MCI_DEVTYPE_SEQUENCER
  2300.  
  2301.  
  2302.      MCI_DEVTYPE_FIRST_USER          $1000
  2303.  
  2304. /* return values for 'status mode' command */
  2305.      MCI_MODE_NOT_READY              (MCI_STRING_OFFSET + 12)
  2306.      MCI_MODE_STOP                   (MCI_STRING_OFFSET + 13)
  2307.      MCI_MODE_PLAY                   (MCI_STRING_OFFSET + 14)
  2308.      MCI_MODE_RECORD                 (MCI_STRING_OFFSET + 15)
  2309.      MCI_MODE_SEEK                   (MCI_STRING_OFFSET + 16)
  2310.      MCI_MODE_PAUSE                  (MCI_STRING_OFFSET + 17)
  2311.      MCI_MODE_OPEN                   (MCI_STRING_OFFSET + 18)
  2312.  
  2313. /* constants used in 'set time format' and 'status time format' commands */
  2314. /* These are not based on MCI_FORMATS_OFFSET because of resource */
  2315. /* compiler limitations */
  2316.      MCI_FORMAT_MILLISECONDS         0
  2317.      MCI_FORMAT_HMS                  1
  2318.      MCI_FORMAT_MSF                  2
  2319.      MCI_FORMAT_FRAMES               3
  2320.      MCI_FORMAT_SMPTE_24             4
  2321.      MCI_FORMAT_SMPTE_25             5
  2322.      MCI_FORMAT_SMPTE_30             6
  2323.      MCI_FORMAT_SMPTE_30DROP         7
  2324.      MCI_FORMAT_BYTES                8
  2325.      MCI_FORMAT_SAMPLES              9
  2326.      MCI_FORMAT_TMSF                 10
  2327.  
  2328. /* MCI time format conversion macros */
  2329. /* Note that these macros are byte-sex dependent as the SMPT format gives */
  2330. /* the layout in storage that's wanted. */
  2331.      MCI_MSF_MINUTE(msf)             ((BYTE)(msf))
  2332.      MCI_MSF_SECOND(msf)             ((BYTE)(((WORD)(msf)) >> 8))
  2333.      MCI_MSF_FRAME(msf)              ((BYTE)((msf)>>16))
  2334.  
  2335.      MCI_MAKE_MSF(m, s, f)           ((DWORD)(((BYTE)(m) | \
  2336.                                                   ((WORD)(s)<<8)) | \
  2337.                                                  (((DWORD)(BYTE)(f))<<16)))
  2338.  
  2339.      MCI_TMSF_TRACK(tmsf)            ((BYTE)(tmsf))
  2340.      MCI_TMSF_MINUTE(tmsf)           ((BYTE)(((WORD)(tmsf)) >> 8))
  2341.      MCI_TMSF_SECOND(tmsf)           ((BYTE)((tmsf)>>16))
  2342.      MCI_TMSF_FRAME(tmsf)            ((BYTE)((tmsf)>>24))
  2343.  
  2344.      MCI_MAKE_TMSF(t, m, s, f)       ( (DWORD)( ( (BYTE)(t)            \
  2345.                                                    | ( (WORD)(m) << 8 )   \
  2346.                                                    )                      \
  2347.                                                  | ( ( (DWORD)(BYTE)(s)   \
  2348.                                                      | ( (WORD)(f) <<8 )  \
  2349.                                                      )                    \
  2350.                                                    << 16                  \
  2351.                                                    )                      \
  2352.                                                  )                        \
  2353.                                         )
  2354.  
  2355.      MCI_HMS_HOUR(hms)               ((BYTE)(hms))
  2356.      MCI_HMS_MINUTE(hms)             ((BYTE)(((WORD)(hms)) >> 8))
  2357.      MCI_HMS_SECOND(hms)             ((BYTE)((hms)>>16))
  2358.  
  2359.      MCI_MAKE_HMS(h, m, s)           ( (DWORD)( ( (BYTE)(h)            \
  2360.                                                    | ( (WORD)(m) <<8 )    \
  2361.                                                    )                      \
  2362.                                                  | ( ( (DWORD)(BYTE)(s) ) \
  2363.                                                    <<16                   \
  2364.                                                    )                      \
  2365.                                                  )                        \
  2366.                                         )
  2367.  
  2368. *)
  2369. CONST
  2370.      MCI_NOTIFY_SUCCESSFUL           =$0001;
  2371.      MCI_NOTIFY_SUPERSEDED           =$0002;
  2372.      MCI_NOTIFY_ABORTED              =$0004;
  2373.      MCI_NOTIFY_FAILURE              =$0008;
  2374.  
  2375. (*
  2376. /* NOTE: All flags must have an "L" suffix in order to be parsed as */
  2377. /* DWORDs by the resource compiler */
  2378.  
  2379. /* common flags for dwFlags parameter of MCI command messages */
  2380.      MCI_NOTIFY                      $00000001L
  2381.      MCI_WAIT                        $00000002L
  2382.      MCI_FROM                        $00000004L
  2383.      MCI_TO                          $00000008L
  2384.      MCI_TRACK                       $00000010L
  2385.  
  2386. /* flags for dwFlags parameter of MCI_OPEN command message */
  2387.      MCI_OPEN_SHAREABLE              $00000100L
  2388.      MCI_OPEN_ELEMENT                $00000200L
  2389.      MCI_OPEN_ALIAS                  $00000400L
  2390.      MCI_OPEN_ELEMENT_ID             $00000800L
  2391.      MCI_OPEN_TYPE_ID                $00001000L
  2392.      MCI_OPEN_TYPE                   $00002000L
  2393.  
  2394. /* flags for dwFlags parameter of MCI_SEEK command message */
  2395.      MCI_SEEK_TO_START               $00000100L
  2396.      MCI_SEEK_TO_END                 $00000200L
  2397.  
  2398. /* flags for dwFlags parameter of MCI_STATUS command message */
  2399.      MCI_STATUS_ITEM                 $00000100L
  2400.      MCI_STATUS_START                $00000200L
  2401.  
  2402. /* flags for dwItem field of the MCI_STATUS_PARMS parameter block */
  2403.      MCI_STATUS_LENGTH               $00000001L
  2404.      MCI_STATUS_POSITION             $00000002L
  2405.      MCI_STATUS_NUMBER_OF_TRACKS     $00000003L
  2406.      MCI_STATUS_MODE                 $00000004L
  2407.      MCI_STATUS_MEDIA_PRESENT        $00000005L
  2408.      MCI_STATUS_TIME_FORMAT          $00000006L
  2409.      MCI_STATUS_READY                $00000007L
  2410.      MCI_STATUS_CURRENT_TRACK        $00000008L
  2411.  
  2412.  
  2413. /* flags for dwFlags parameter of MCI_INFO command message */
  2414.      MCI_INFO_PRODUCT                $00000100L
  2415.      MCI_INFO_FILE                   $00000200L
  2416.      MCI_INFO_MEDIA_UPC              $00000400L
  2417.      MCI_INFO_MEDIA_IDENTITY         $00000800L
  2418.  
  2419. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  2420.      MCI_GETDEVCAPS_ITEM             $00000100L
  2421.  
  2422. /* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */
  2423.      MCI_GETDEVCAPS_CAN_RECORD       $00000001L
  2424.      MCI_GETDEVCAPS_HAS_AUDIO        $00000002L
  2425.      MCI_GETDEVCAPS_HAS_VIDEO        $00000003L
  2426.      MCI_GETDEVCAPS_DEVICE_TYPE      $00000004L
  2427.      MCI_GETDEVCAPS_USES_FILES       $00000005L
  2428.      MCI_GETDEVCAPS_COMPOUND_DEVICE  $00000006L
  2429.      MCI_GETDEVCAPS_CAN_EJECT        $00000007L
  2430.      MCI_GETDEVCAPS_CAN_PLAY         $00000008L
  2431.      MCI_GETDEVCAPS_CAN_SAVE         $00000009L
  2432.  
  2433. /* flags for dwFlags parameter of MCI_SYSINFO command message */
  2434.      MCI_SYSINFO_QUANTITY            $00000100L
  2435.      MCI_SYSINFO_OPEN                $00000200L
  2436.      MCI_SYSINFO_NAME                $00000400L
  2437.      MCI_SYSINFO_INSTALLNAME         $00000800L
  2438.  
  2439. /* flags for dwFlags parameter of MCI_SET command message */
  2440.      MCI_SET_DOOR_OPEN               $00000100L
  2441.      MCI_SET_DOOR_CLOSED             $00000200L
  2442.      MCI_SET_TIME_FORMAT             $00000400L
  2443.      MCI_SET_AUDIO                   $00000800L
  2444.      MCI_SET_VIDEO                   $00001000L
  2445.      MCI_SET_ON                      $00002000L
  2446.      MCI_SET_OFF                     $00004000L
  2447.  
  2448. /* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */
  2449.      MCI_SET_AUDIO_ALL               $00000000L
  2450.      MCI_SET_AUDIO_LEFT              $00000001L
  2451.      MCI_SET_AUDIO_RIGHT             $00000002L
  2452.  
  2453. /* flags for dwFlags parameter of MCI_BREAK command message */
  2454.      MCI_BREAK_KEY                   $00000100L
  2455.      MCI_BREAK_HWND                  $00000200L
  2456.      MCI_BREAK_OFF                   $00000400L
  2457.  
  2458. /* flags for dwFlags parameter of MCI_RECORD command message */
  2459.      MCI_RECORD_INSERT               $00000100L
  2460.      MCI_RECORD_OVERWRITE            $00000200L
  2461.  
  2462. /* flags for dwFlags parameter of MCI_SOUND command message */
  2463.      MCI_SOUND_NAME                  $00000100L
  2464.  
  2465. /* flags for dwFlags parameter of MCI_SAVE command message */
  2466.      MCI_SAVE_FILE                   $00000100L
  2467.  
  2468. /* flags for dwFlags parameter of MCI_LOAD command message */
  2469.      MCI_LOAD_FILE                   $00000100L
  2470.  
  2471. /* Note that some structures below do not have all the fields of the */
  2472. /* corresponding Win 3.1 structures.  Some reserved WORD sized fields */
  2473. /* have disappeared.  This is deliberate.  The structures are the same */
  2474. /* size (with one exception which is two bytes longer). */
  2475. /* */
  2476. /* The FIRST entry in each structure must be dwCallback.  A large union */
  2477. /* could be defined... but... */
  2478.  
  2479. /* generic parameter block for MCI command messages with no special parameters */
  2480. typedef struct tagMCI_GENERIC_PARMS {
  2481.     DWORD   dwCallback;
  2482. } MCI_GENERIC_PARMS;
  2483. typedef MCI_GENERIC_PARMS     *PMCI_GENERIC_PARMS;
  2484. typedef MCI_GENERIC_PARMS     *LPMCI_GENERIC_PARMS;
  2485.  
  2486. /* parameter block for MCI_OPEN command message */
  2487. typedef struct tagMCI_OPEN_PARMSA {
  2488.     DWORD   dwCallback;
  2489.     MCIDEVICEID wDeviceID;
  2490.     LPCSTR     lpstrDeviceType;
  2491.     LPCSTR     lpstrElementName;
  2492.     LPCSTR     lpstrAlias;
  2493. } MCI_OPEN_PARMSA;
  2494. /* parameter block for MCI_OPEN command message */
  2495. typedef struct tagMCI_OPEN_PARMSW {
  2496.     DWORD   dwCallback;
  2497.     MCIDEVICEID wDeviceID;
  2498.     LPCWSTR    lpstrDeviceType;
  2499.     LPCWSTR    lpstrElementName;
  2500.     LPCWSTR    lpstrAlias;
  2501. } MCI_OPEN_PARMSW;
  2502. #ifdef UNICODE
  2503. typedef MCI_OPEN_PARMSW MCI_OPEN_PARMS;
  2504. #else
  2505. typedef MCI_OPEN_PARMSA MCI_OPEN_PARMS;
  2506. #endif // UNICODE
  2507. typedef MCI_OPEN_PARMSA     *PMCI_OPEN_PARMSA;
  2508. typedef MCI_OPEN_PARMSW     *PMCI_OPEN_PARMSW;
  2509. #ifdef UNICODE
  2510. typedef PMCI_OPEN_PARMSW PMCI_OPEN_PARMS;
  2511. #else
  2512. typedef PMCI_OPEN_PARMSA PMCI_OPEN_PARMS;
  2513. #endif // UNICODE
  2514. typedef MCI_OPEN_PARMSA     *LPMCI_OPEN_PARMSA;
  2515. typedef MCI_OPEN_PARMSW     *LPMCI_OPEN_PARMSW;
  2516. #ifdef UNICODE
  2517. typedef LPMCI_OPEN_PARMSW LPMCI_OPEN_PARMS;
  2518. #else
  2519. typedef LPMCI_OPEN_PARMSA LPMCI_OPEN_PARMS;
  2520. #endif // UNICODE
  2521.  
  2522. /* parameter block for MCI_PLAY command message */
  2523. typedef struct tagMCI_PLAY_PARMS {
  2524.     DWORD   dwCallback;
  2525.     DWORD   dwFrom;
  2526.     DWORD   dwTo;
  2527. } MCI_PLAY_PARMS;
  2528. typedef MCI_PLAY_PARMS     *PMCI_PLAY_PARMS;
  2529. typedef MCI_PLAY_PARMS     *LPMCI_PLAY_PARMS;
  2530.  
  2531. /* parameter block for MCI_SEEK command message */
  2532. typedef struct tagMCI_SEEK_PARMS {
  2533.     DWORD   dwCallback;
  2534.     DWORD   dwTo;
  2535. } MCI_SEEK_PARMS;
  2536. typedef MCI_SEEK_PARMS     *PMCI_SEEK_PARMS;
  2537. typedef MCI_SEEK_PARMS     *LPMCI_SEEK_PARMS;
  2538.  
  2539. /* parameter block for MCI_STATUS command message */
  2540. typedef struct tagMCI_STATUS_PARMS {
  2541.     DWORD   dwCallback;
  2542.     DWORD   dwReturn;
  2543.     DWORD   dwItem;
  2544.     DWORD   dwTrack;
  2545. } MCI_STATUS_PARMS;
  2546. typedef MCI_STATUS_PARMS     * PMCI_STATUS_PARMS;
  2547. typedef MCI_STATUS_PARMS     * LPMCI_STATUS_PARMS;
  2548.  
  2549. /* parameter block for MCI_INFO command message */
  2550. typedef struct tagMCI_INFO_PARMSA {
  2551.     DWORD   dwCallback;
  2552.     LPSTR   lpstrReturn;
  2553.     DWORD   dwRetSize;
  2554. } MCI_INFO_PARMSA;
  2555. /* parameter block for MCI_INFO command message */
  2556. typedef struct tagMCI_INFO_PARMSW {
  2557.     DWORD   dwCallback;
  2558.     LPWSTR  lpstrReturn;
  2559.     DWORD   dwRetSize;
  2560. } MCI_INFO_PARMSW;
  2561. #ifdef UNICODE
  2562. typedef MCI_INFO_PARMSW MCI_INFO_PARMS;
  2563. #else
  2564. typedef MCI_INFO_PARMSA MCI_INFO_PARMS;
  2565. #endif // UNICODE
  2566. typedef MCI_INFO_PARMSA     * PMCI_INFO_PARMSA;
  2567. typedef MCI_INFO_PARMSW     * PMCI_INFO_PARMSW;
  2568. #ifdef UNICODE
  2569. typedef PMCI_INFO_PARMSW PMCI_INFO_PARMS;
  2570. #else
  2571. typedef PMCI_INFO_PARMSA PMCI_INFO_PARMS;
  2572. #endif // UNICODE
  2573. typedef MCI_INFO_PARMSA     * LPMCI_INFO_PARMSA;
  2574. typedef MCI_INFO_PARMSW     * LPMCI_INFO_PARMSW;
  2575. #ifdef UNICODE
  2576. typedef LPMCI_INFO_PARMSW LPMCI_INFO_PARMS;
  2577. #else
  2578. typedef LPMCI_INFO_PARMSA LPMCI_INFO_PARMS;
  2579. #endif // UNICODE
  2580.  
  2581. /* parameter block for MCI_GETDEVCAPS command message */
  2582. typedef struct tagMCI_GETDEVCAPS_PARMS {
  2583.     DWORD   dwCallback;
  2584.     DWORD   dwReturn;
  2585.     DWORD   dwItem;
  2586. } MCI_GETDEVCAPS_PARMS;
  2587. typedef MCI_GETDEVCAPS_PARMS     * PMCI_GETDEVCAPS_PARMS;
  2588. typedef MCI_GETDEVCAPS_PARMS     * LPMCI_GETDEVCAPS_PARMS;
  2589.  
  2590. /* parameter block for MCI_SYSINFO command message */
  2591. typedef struct tagMCI_SYSINFO_PARMSA {
  2592.     DWORD   dwCallback;
  2593.     LPSTR   lpstrReturn;
  2594.     DWORD   dwRetSize;
  2595.     DWORD   dwNumber;
  2596.     UINT    wDeviceType;
  2597. } MCI_SYSINFO_PARMSA;
  2598. /* parameter block for MCI_SYSINFO command message */
  2599. typedef struct tagMCI_SYSINFO_PARMSW {
  2600.     DWORD   dwCallback;
  2601.     LPWSTR  lpstrReturn;
  2602.     DWORD   dwRetSize;
  2603.     DWORD   dwNumber;
  2604.     UINT    wDeviceType;
  2605. } MCI_SYSINFO_PARMSW;
  2606. #ifdef UNICODE
  2607. typedef MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS;
  2608. #else
  2609. typedef MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS;
  2610. #endif // UNICODE
  2611. typedef MCI_SYSINFO_PARMSA     *PMCI_SYSINFO_PARMSA;
  2612. typedef MCI_SYSINFO_PARMSW     *PMCI_SYSINFO_PARMSW;
  2613. #ifdef UNICODE
  2614. typedef PMCI_SYSINFO_PARMSW PMCI_SYSINFO_PARMS;
  2615. #else
  2616. typedef PMCI_SYSINFO_PARMSA PMCI_SYSINFO_PARMS;
  2617. #endif // UNICODE
  2618. typedef MCI_SYSINFO_PARMSA     *LPMCI_SYSINFO_PARMSA;
  2619. typedef MCI_SYSINFO_PARMSW     *LPMCI_SYSINFO_PARMSW;
  2620. #ifdef UNICODE
  2621. typedef LPMCI_SYSINFO_PARMSW LPMCI_SYSINFO_PARMS;
  2622. #else
  2623. typedef LPMCI_SYSINFO_PARMSA LPMCI_SYSINFO_PARMS;
  2624. #endif // UNICODE
  2625.  
  2626. /* parameter block for MCI_SET command message */
  2627. typedef struct tagMCI_SET_PARMS {
  2628.     DWORD   dwCallback;
  2629.     DWORD   dwTimeFormat;
  2630.     DWORD   dwAudio;
  2631. } MCI_SET_PARMS;
  2632. typedef MCI_SET_PARMS     *PMCI_SET_PARMS;
  2633. typedef MCI_SET_PARMS     *LPMCI_SET_PARMS;
  2634.  
  2635. /* parameter block for MCI_BREAK command message */
  2636. typedef struct tagMCI_BREAK_PARMS {
  2637.     DWORD   dwCallback;
  2638.     int     nVirtKey;
  2639.     HWND    hwndBreak;
  2640. } MCI_BREAK_PARMS;
  2641. typedef MCI_BREAK_PARMS     * PMCI_BREAK_PARMS;
  2642. typedef MCI_BREAK_PARMS     * LPMCI_BREAK_PARMS;
  2643.  
  2644. /* parameter block for MCI_SOUND command message */
  2645. typedef struct tagMCI_SOUND_PARMSA {
  2646.     DWORD   dwCallback;
  2647.     LPCSTR   lpstrSoundName;
  2648. } MCI_SOUND_PARMSA;
  2649. /* parameter block for MCI_SOUND command message */
  2650. typedef struct tagMCI_SOUND_PARMSW {
  2651.     DWORD   dwCallback;
  2652.     LPCWSTR  lpstrSoundName;
  2653. } MCI_SOUND_PARMSW;
  2654. #ifdef UNICODE
  2655. typedef MCI_SOUND_PARMSW MCI_SOUND_PARMS;
  2656. #else
  2657. typedef MCI_SOUND_PARMSA MCI_SOUND_PARMS;
  2658. #endif // UNICODE
  2659. typedef MCI_SOUND_PARMSA     *PMCI_SOUND_PARMSA;
  2660. typedef MCI_SOUND_PARMSW     *PMCI_SOUND_PARMSW;
  2661. #ifdef UNICODE
  2662. typedef PMCI_SOUND_PARMSW PMCI_SOUND_PARMS;
  2663. #else
  2664. typedef PMCI_SOUND_PARMSA PMCI_SOUND_PARMS;
  2665. #endif // UNICODE
  2666. typedef MCI_SOUND_PARMSA     *LPMCI_SOUND_PARMSA;
  2667. typedef MCI_SOUND_PARMSW     *LPMCI_SOUND_PARMSW;
  2668. #ifdef UNICODE
  2669. typedef LPMCI_SOUND_PARMSW LPMCI_SOUND_PARMS;
  2670. #else
  2671. typedef LPMCI_SOUND_PARMSA LPMCI_SOUND_PARMS;
  2672. #endif // UNICODE
  2673.  
  2674. /* parameter block for MCI_SAVE command message */
  2675. typedef struct tagMCI_SAVE_PARMSA {
  2676.     DWORD    dwCallback;
  2677.     LPCSTR    lpfilename;
  2678. } MCI_SAVE_PARMSA;
  2679. /* parameter block for MCI_SAVE command message */
  2680. typedef struct tagMCI_SAVE_PARMSW {
  2681.     DWORD    dwCallback;
  2682.     LPCWSTR   lpfilename;
  2683. } MCI_SAVE_PARMSW;
  2684. #ifdef UNICODE
  2685. typedef MCI_SAVE_PARMSW MCI_SAVE_PARMS;
  2686. #else
  2687. typedef MCI_SAVE_PARMSA MCI_SAVE_PARMS;
  2688. #endif // UNICODE
  2689. typedef MCI_SAVE_PARMSA     *PMCI_SAVE_PARMSA;
  2690. typedef MCI_SAVE_PARMSW     *PMCI_SAVE_PARMSW;
  2691. #ifdef UNICODE
  2692. typedef PMCI_SAVE_PARMSW PMCI_SAVE_PARMS;
  2693. #else
  2694. typedef PMCI_SAVE_PARMSA PMCI_SAVE_PARMS;
  2695. #endif // UNICODE
  2696. typedef MCI_SAVE_PARMSA     *LPMCI_SAVE_PARMSA;
  2697. typedef MCI_SAVE_PARMSW     *LPMCI_SAVE_PARMSW;
  2698. #ifdef UNICODE
  2699. typedef LPMCI_SAVE_PARMSW LPMCI_SAVE_PARMS;
  2700. #else
  2701. typedef LPMCI_SAVE_PARMSA LPMCI_SAVE_PARMS;
  2702. #endif // UNICODE
  2703.  
  2704. /* parameter block for MCI_LOAD command message */
  2705. typedef struct tagMCI_LOAD_PARMSA {
  2706.     DWORD   dwCallback;
  2707.     LPCSTR   lpfilename;
  2708. } MCI_LOAD_PARMSA;
  2709. /* parameter block for MCI_LOAD command message */
  2710. typedef struct tagMCI_LOAD_PARMSW {
  2711.     DWORD   dwCallback;
  2712.     LPCWSTR  lpfilename;
  2713. } MCI_LOAD_PARMSW;
  2714. #ifdef UNICODE
  2715. typedef MCI_LOAD_PARMSW MCI_LOAD_PARMS;
  2716. #else
  2717. typedef MCI_LOAD_PARMSA MCI_LOAD_PARMS;
  2718. #endif // UNICODE
  2719. typedef MCI_LOAD_PARMSA     *PMCI_LOAD_PARMSA;
  2720. typedef MCI_LOAD_PARMSW     *PMCI_LOAD_PARMSW;
  2721. #ifdef UNICODE
  2722. typedef PMCI_LOAD_PARMSW PMCI_LOAD_PARMS;
  2723. #else
  2724. typedef PMCI_LOAD_PARMSA PMCI_LOAD_PARMS;
  2725. #endif // UNICODE
  2726. typedef MCI_LOAD_PARMSA     *LPMCI_LOAD_PARMSA;
  2727. typedef MCI_LOAD_PARMSW     *LPMCI_LOAD_PARMSW;
  2728. #ifdef UNICODE
  2729. typedef LPMCI_LOAD_PARMSW LPMCI_LOAD_PARMS;
  2730. #else
  2731. typedef LPMCI_LOAD_PARMSA LPMCI_LOAD_PARMS;
  2732. #endif // UNICODE
  2733.  
  2734. /* parameter block for MCI_RECORD command message */
  2735. typedef struct tagMCI_RECORD_PARMS {
  2736.     DWORD   dwCallback;
  2737.     DWORD   dwFrom;
  2738.     DWORD   dwTo;
  2739. } MCI_RECORD_PARMS;
  2740.  
  2741. typedef MCI_RECORD_PARMS     *PMCI_RECORD_PARMS;
  2742. typedef MCI_RECORD_PARMS     *LPMCI_RECORD_PARMS;
  2743.  
  2744. /*****************************************************************************
  2745. *    Standard command parameters for videodisc drivers                       *
  2746. *****************************************************************************/
  2747.  
  2748. /* string resource ID's for videodisc players */
  2749. /* return ID's for videodisc status command */
  2750. /* return ID's for videodisc MCI_GETDEVCAPS command */
  2751. /* flag for dwReturn field of MCI_STATUS_PARMS */
  2752. /* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */
  2753.      MCI_VD_MODE_PARK                (MCI_VD_OFFSET + 1)
  2754.  
  2755. /* flag for dwReturn field of MCI_STATUS_PARMS */
  2756. /* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */
  2757.      MCI_VD_MEDIA_CLV                (MCI_VD_OFFSET + 2)
  2758.      MCI_VD_MEDIA_CAV                (MCI_VD_OFFSET + 3)
  2759.      MCI_VD_MEDIA_OTHER              (MCI_VD_OFFSET + 4)
  2760.  
  2761.      MCI_VD_FORMAT_TRACK             $4001
  2762.  
  2763. /* flags for dwFlags parameter of MCI_PLAY command message */
  2764.      MCI_VD_PLAY_REVERSE             $00010000L
  2765.      MCI_VD_PLAY_FAST                $00020000L
  2766.      MCI_VD_PLAY_SPEED               $00040000L
  2767.      MCI_VD_PLAY_SCAN                $00080000L
  2768.      MCI_VD_PLAY_SLOW                $00100000L
  2769.  
  2770. /* flag for dwFlags parameter of MCI_SEEK command message */
  2771.      MCI_VD_SEEK_REVERSE             $00010000L
  2772.  
  2773. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  2774.      MCI_VD_STATUS_SPEED             $00004002L
  2775.      MCI_VD_STATUS_FORWARD           $00004003L
  2776.      MCI_VD_STATUS_MEDIA_TYPE        $00004004L
  2777.      MCI_VD_STATUS_SIDE              $00004005L
  2778.      MCI_VD_STATUS_DISC_SIZE         $00004006L
  2779.  
  2780. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  2781.      MCI_VD_GETDEVCAPS_CLV           $00010000L
  2782.      MCI_VD_GETDEVCAPS_CAV           $00020000L
  2783.  
  2784.      MCI_VD_SPIN_UP                  $00010000L
  2785.      MCI_VD_SPIN_DOWN                $00020000L
  2786.  
  2787. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  2788.      MCI_VD_GETDEVCAPS_CAN_REVERSE   $00004002L
  2789.      MCI_VD_GETDEVCAPS_FAST_RATE     $00004003L
  2790.      MCI_VD_GETDEVCAPS_SLOW_RATE     $00004004L
  2791.      MCI_VD_GETDEVCAPS_NORMAL_RATE   $00004005L
  2792.  
  2793. /* flags for the dwFlags parameter of MCI_STEP command message */
  2794.      MCI_VD_STEP_FRAMES              $00010000L
  2795.      MCI_VD_STEP_REVERSE             $00020000L
  2796.  
  2797. /* flag for the MCI_ESCAPE command message */
  2798.      MCI_VD_ESCAPE_STRING            $00000100L
  2799.  
  2800. /* parameter block for MCI_PLAY command message */
  2801. typedef struct tagMCI_VD_PLAY_PARMS {
  2802.     DWORD   dwCallback;
  2803.     DWORD   dwFrom;
  2804.     DWORD   dwTo;
  2805.     DWORD   dwSpeed;
  2806. } MCI_VD_PLAY_PARMS;
  2807. typedef MCI_VD_PLAY_PARMS     *PMCI_VD_PLAY_PARMS;
  2808. typedef MCI_VD_PLAY_PARMS     *LPMCI_VD_PLAY_PARMS;
  2809.  
  2810. /* parameter block for MCI_STEP command message */
  2811. typedef struct tagMCI_VD_STEP_PARMS {
  2812.     DWORD   dwCallback;
  2813.     DWORD   dwFrames;
  2814. } MCI_VD_STEP_PARMS;
  2815. typedef MCI_VD_STEP_PARMS     *PMCI_VD_STEP_PARMS;
  2816. typedef MCI_VD_STEP_PARMS     *LPMCI_VD_STEP_PARMS;
  2817.  
  2818. /* parameter block for MCI_ESCAPE command message */
  2819. typedef struct tagMCI_VD_ESCAPE_PARMSA {
  2820.     DWORD   dwCallback;
  2821.     LPCSTR    lpstrCommand;
  2822. } MCI_VD_ESCAPE_PARMSA;
  2823. /* parameter block for MCI_ESCAPE command message */
  2824. typedef struct tagMCI_VD_ESCAPE_PARMSW {
  2825.     DWORD   dwCallback;
  2826.     LPCWSTR   lpstrCommand;
  2827. } MCI_VD_ESCAPE_PARMSW;
  2828. #ifdef UNICODE
  2829. typedef MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS;
  2830. #else
  2831. typedef MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS;
  2832. #endif // UNICODE
  2833. typedef MCI_VD_ESCAPE_PARMSA     *PMCI_VD_ESCAPE_PARMSA;
  2834. typedef MCI_VD_ESCAPE_PARMSW     *PMCI_VD_ESCAPE_PARMSW;
  2835. #ifdef UNICODE
  2836. typedef PMCI_VD_ESCAPE_PARMSW PMCI_VD_ESCAPE_PARMS;
  2837. #else
  2838. typedef PMCI_VD_ESCAPE_PARMSA PMCI_VD_ESCAPE_PARMS;
  2839. #endif // UNICODE
  2840. typedef MCI_VD_ESCAPE_PARMSA     *LPMCI_VD_ESCAPE_PARMSA;
  2841. typedef MCI_VD_ESCAPE_PARMSW     *LPMCI_VD_ESCAPE_PARMSW;
  2842. #ifdef UNICODE
  2843. typedef LPMCI_VD_ESCAPE_PARMSW LPMCI_VD_ESCAPE_PARMS;
  2844. #else
  2845. typedef LPMCI_VD_ESCAPE_PARMSA LPMCI_VD_ESCAPE_PARMS;
  2846. #endif // UNICODE
  2847.  
  2848. /* MCI extensions for waveform audio devices */
  2849.  
  2850. /*****************************************************************************
  2851. *   Standard command parameters for waveform audio drivers
  2852. *****************************************************************************/
  2853.  
  2854.      MCI_WAVE_PCM            (MCI_WAVE_OFFSET+0)
  2855.      MCI_WAVE_MAPPER         (MCI_WAVE_OFFSET+1)
  2856.  
  2857. /* flags for the dwFlags parameter of MCI_OPEN command message */
  2858.      MCI_WAVE_OPEN_BUFFER            $00010000L
  2859.  
  2860. /* flags for the dwFlags parameter of MCI_SET command message */
  2861.      MCI_WAVE_SET_FORMATTAG          $00010000L
  2862.      MCI_WAVE_SET_CHANNELS           $00020000L
  2863.      MCI_WAVE_SET_SAMPLESPERSEC      $00040000L
  2864.      MCI_WAVE_SET_AVGBYTESPERSEC     $00080000L
  2865.      MCI_WAVE_SET_BLOCKALIGN         $00100000L
  2866.      MCI_WAVE_SET_BITSPERSAMPLE      $00200000L
  2867.  
  2868. /* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */
  2869.      MCI_WAVE_INPUT                  $00400000L
  2870.      MCI_WAVE_OUTPUT                 $00800000L
  2871.  
  2872. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  2873.      MCI_WAVE_STATUS_FORMATTAG       $00004001L
  2874.      MCI_WAVE_STATUS_CHANNELS        $00004002L
  2875.      MCI_WAVE_STATUS_SAMPLESPERSEC   $00004003L
  2876.      MCI_WAVE_STATUS_AVGBYTESPERSEC  $00004004L
  2877.      MCI_WAVE_STATUS_BLOCKALIGN      $00004005L
  2878.      MCI_WAVE_STATUS_BITSPERSAMPLE   $00004006L
  2879.      MCI_WAVE_STATUS_LEVEL           $00004007L
  2880.  
  2881. /* flags for the dwFlags parameter of MCI_SET command message */
  2882.      MCI_WAVE_SET_ANYINPUT           $04000000L
  2883.      MCI_WAVE_SET_ANYOUTPUT          $08000000L
  2884.  
  2885. /* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */
  2886.      MCI_WAVE_GETDEVCAPS_INPUTS      $00004001L
  2887.      MCI_WAVE_GETDEVCAPS_OUTPUTS     $00004002L
  2888.  
  2889. /* parameter block for MCI_OPEN command message */
  2890. typedef struct tagMCI_WAVE_OPEN_PARMSA {
  2891.     DWORD   dwCallback;
  2892.     MCIDEVICEID wDeviceID;
  2893.     LPCSTR    lpstrDeviceType;
  2894.     LPCSTR    lpstrElementName;
  2895.     LPCSTR    lpstrAlias;
  2896.     DWORD   dwBufferSeconds;
  2897. } MCI_WAVE_OPEN_PARMSA;
  2898. /* parameter block for MCI_OPEN command message */
  2899. typedef struct tagMCI_WAVE_OPEN_PARMSW {
  2900.     DWORD   dwCallback;
  2901.     MCIDEVICEID wDeviceID;
  2902.     LPCWSTR   lpstrDeviceType;
  2903.     LPCWSTR   lpstrElementName;
  2904.     LPCWSTR   lpstrAlias;
  2905.     DWORD   dwBufferSeconds;
  2906. } MCI_WAVE_OPEN_PARMSW;
  2907. #ifdef UNICODE
  2908. typedef MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS;
  2909. #else
  2910. typedef MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS;
  2911. #endif // UNICODE
  2912. typedef MCI_WAVE_OPEN_PARMSA     *PMCI_WAVE_OPEN_PARMSA;
  2913. typedef MCI_WAVE_OPEN_PARMSW     *PMCI_WAVE_OPEN_PARMSW;
  2914. #ifdef UNICODE
  2915. typedef PMCI_WAVE_OPEN_PARMSW PMCI_WAVE_OPEN_PARMS;
  2916. #else
  2917. typedef PMCI_WAVE_OPEN_PARMSA PMCI_WAVE_OPEN_PARMS;
  2918. #endif // UNICODE
  2919. typedef MCI_WAVE_OPEN_PARMSA     *LPMCI_WAVE_OPEN_PARMSA;
  2920. typedef MCI_WAVE_OPEN_PARMSW     *LPMCI_WAVE_OPEN_PARMSW;
  2921. #ifdef UNICODE
  2922. typedef LPMCI_WAVE_OPEN_PARMSW LPMCI_WAVE_OPEN_PARMS;
  2923. #else
  2924. typedef LPMCI_WAVE_OPEN_PARMSA LPMCI_WAVE_OPEN_PARMS;
  2925. #endif // UNICODE
  2926.  
  2927. /* parameter block for MCI_DELETE command message */
  2928. typedef struct tagMCI_WAVE_DELETE_PARMS {
  2929.     DWORD   dwCallback;
  2930.     DWORD   dwFrom;
  2931.     DWORD   dwTo;
  2932. } MCI_WAVE_DELETE_PARMS;
  2933. typedef MCI_WAVE_DELETE_PARMS     *PMCI_WAVE_DELETE_PARMS;
  2934. typedef MCI_WAVE_DELETE_PARMS     *LPMCI_WAVE_DELETE_PARMS;
  2935.  
  2936. /* parameter block for MCI_SET command message */
  2937. typedef struct tagMCI_WAVE_SET_PARMS {
  2938.     DWORD   dwCallback;
  2939.     DWORD   dwTimeFormat;
  2940.     DWORD   dwAudio;
  2941.     UINT    wInput;
  2942.     UINT    wOutput;
  2943.     WORD    wFormatTag;                // corresponds to WAVEFORMAT structure
  2944.     WORD    wReserved2;
  2945.     WORD    nChannels;                 // corresponds to WAVEFORMAT structure
  2946.     WORD    wReserved3;
  2947.     DWORD   nSamplesPerSec;
  2948.     DWORD   nAvgBytesPerSec;
  2949.     WORD    nBlockAlign;               // corresponds to WAVEFORMAT structure
  2950.     WORD    wReserved4;
  2951.     WORD    wBitsPerSample;            // corresponds to PCMWAVEFORMAT structure
  2952.     WORD    wReserved5;
  2953. } MCI_WAVE_SET_PARMS;
  2954. typedef MCI_WAVE_SET_PARMS     * PMCI_WAVE_SET_PARMS;
  2955. typedef MCI_WAVE_SET_PARMS     * LPMCI_WAVE_SET_PARMS;
  2956.  
  2957.  
  2958.  
  2959. /*****************************************************************************
  2960. *   Standard command parameters for CD audio drivers
  2961. *****************************************************************************/
  2962.      MCI_CDA_STATUS_TYPE_TRACK       $00004001L
  2963.  
  2964. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  2965. /* MCI_STATUS command, (dwItem == MCI_CDA_STATUS_TYPE_TRACK) */
  2966.      MCI_CDA_TRACK_AUDIO             (0 + MCI_CD_OFFSET)
  2967.      MCI_CDA_TRACK_OTHER             (1 + MCI_CD_OFFSET)
  2968.  
  2969.  
  2970. /*****************************************************************************
  2971. *        Standard command parameters for MIDI Sequencer drivers
  2972. *****************************************************************************/
  2973.  
  2974. /* string resource ID's for sequencers */
  2975. /* return ids for status division type */
  2976.  
  2977. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  2978. /* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */
  2979.          MCI_SEQ_DIV_PPQN              (0 + MCI_SEQ_OFFSET)
  2980.          MCI_SEQ_DIV_SMPTE_24        (1 + MCI_SEQ_OFFSET)
  2981.          MCI_SEQ_DIV_SMPTE_25        (2 + MCI_SEQ_OFFSET)
  2982.          MCI_SEQ_DIV_SMPTE_30DROP    (3 + MCI_SEQ_OFFSET)
  2983.          MCI_SEQ_DIV_SMPTE_30        (4 + MCI_SEQ_OFFSET)
  2984.  
  2985. /* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */
  2986. /* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */
  2987.          MCI_SEQ_FORMAT_SONGPTR      $4001
  2988.          MCI_SEQ_FILE                $4002
  2989.          MCI_SEQ_MIDI                $4003
  2990.          MCI_SEQ_SMPTE               $4004
  2991.          MCI_SEQ_NONE                65533
  2992.  
  2993.          MCI_SEQ_MAPPER              65535
  2994.  
  2995. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  2996.      MCI_SEQ_STATUS_TEMPO            $00004002L
  2997.      MCI_SEQ_STATUS_PORT             $00004003L
  2998.      MCI_SEQ_STATUS_SLAVE            $00004007L
  2999.      MCI_SEQ_STATUS_MASTER           $00004008L
  3000.      MCI_SEQ_STATUS_OFFSET           $00004009L
  3001.      MCI_SEQ_STATUS_DIVTYPE          $0000400AL
  3002.  
  3003. /* flags for the dwFlags parameter of MCI_SET command message */
  3004.      MCI_SEQ_SET_TEMPO               $00010000L
  3005.      MCI_SEQ_SET_PORT                $00020000L
  3006.      MCI_SEQ_SET_SLAVE               $00040000L
  3007.      MCI_SEQ_SET_MASTER              $00080000L
  3008.      MCI_SEQ_SET_OFFSET              $01000000L
  3009.  
  3010. /* parameter block for MCI_SET command message */
  3011. typedef struct tagMCI_SEQ_SET_PARMS {
  3012.     DWORD   dwCallback;
  3013.     DWORD   dwTimeFormat;
  3014.     DWORD   dwAudio;
  3015.     DWORD   dwTempo;
  3016.     DWORD   dwPort;
  3017.     DWORD   dwSlave;
  3018.     DWORD   dwMaster;
  3019.     DWORD   dwOffset;
  3020. } MCI_SEQ_SET_PARMS;
  3021. typedef MCI_SEQ_SET_PARMS     * PMCI_SEQ_SET_PARMS;
  3022. typedef MCI_SEQ_SET_PARMS     * LPMCI_SEQ_SET_PARMS;
  3023.  
  3024.  
  3025. /*****************************************************************************
  3026. *      Standard command parameters for animation
  3027. *****************************************************************************/
  3028.  
  3029.  
  3030. /* flags for dwFlags parameter of MCI_OPEN command message */
  3031.      MCI_ANIM_OPEN_WS                $00010000L
  3032.      MCI_ANIM_OPEN_PARENT            $00020000L
  3033.      MCI_ANIM_OPEN_NOSTATIC          $00040000L
  3034.  
  3035. /* flags for dwFlags parameter of MCI_PLAY command message */
  3036.      MCI_ANIM_PLAY_SPEED             $00010000L
  3037.      MCI_ANIM_PLAY_REVERSE           $00020000L
  3038.      MCI_ANIM_PLAY_FAST              $00040000L
  3039.      MCI_ANIM_PLAY_SLOW              $00080000L
  3040.      MCI_ANIM_PLAY_SCAN              $00100000L
  3041.  
  3042. /* flags for dwFlags parameter of MCI_STEP command message */
  3043.      MCI_ANIM_STEP_REVERSE           $00010000L
  3044.      MCI_ANIM_STEP_FRAMES            $00020000L
  3045.  
  3046. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  3047.      MCI_ANIM_STATUS_SPEED           $00004001L
  3048.      MCI_ANIM_STATUS_FORWARD         $00004002L
  3049.      MCI_ANIM_STATUS_HWND            $00004003L
  3050.      MCI_ANIM_STATUS_HPAL            $00004004L
  3051.      MCI_ANIM_STATUS_STRETCH         $00004005L
  3052.  
  3053. /* flags for the dwFlags parameter of MCI_INFO command message */
  3054.      MCI_ANIM_INFO_TEXT              $00010000L
  3055.  
  3056. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3057.      MCI_ANIM_GETDEVCAPS_CAN_REVERSE $00004001L
  3058.      MCI_ANIM_GETDEVCAPS_FAST_RATE   $00004002L
  3059.      MCI_ANIM_GETDEVCAPS_SLOW_RATE   $00004003L
  3060.      MCI_ANIM_GETDEVCAPS_NORMAL_RATE $00004004L
  3061.      MCI_ANIM_GETDEVCAPS_PALETTES    $00004006L
  3062.      MCI_ANIM_GETDEVCAPS_CAN_STRETCH $00004007L
  3063.      MCI_ANIM_GETDEVCAPS_MAX_WINDOWS $00004008L
  3064.  
  3065. /* flags for the MCI_REALIZE command message */
  3066.      MCI_ANIM_REALIZE_NORM           $00010000L
  3067.      MCI_ANIM_REALIZE_BKGD           $00020000L
  3068.  
  3069. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3070.      MCI_ANIM_WINDOW_HWND            $00010000L
  3071.      MCI_ANIM_WINDOW_STATE           $00040000L
  3072.      MCI_ANIM_WINDOW_TEXT            $00080000L
  3073.      MCI_ANIM_WINDOW_ENABLE_STRETCH  $00100000L
  3074.      MCI_ANIM_WINDOW_DISABLE_STRETCH $00200000L
  3075.  
  3076. /* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */
  3077. /* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */
  3078.      MCI_ANIM_WINDOW_DEFAULT         $00000000L
  3079.  
  3080. /* flags for dwFlags parameter of MCI_PUT command message */
  3081.      MCI_ANIM_RECT                   $00010000L
  3082.      MCI_ANIM_PUT_SOURCE             $00020000L
  3083.      MCI_ANIM_PUT_DESTINATION        $00040000L
  3084.  
  3085. /* flags for dwFlags parameter of MCI_WHERE command message */
  3086.      MCI_ANIM_WHERE_SOURCE           $00020000L
  3087.      MCI_ANIM_WHERE_DESTINATION      $00040000L
  3088.  
  3089. /* flags for dwFlags parameter of MCI_UPDATE command message */
  3090.      MCI_ANIM_UPDATE_HDC             $00020000L
  3091.  
  3092. /* parameter block for MCI_OPEN command message */
  3093. typedef struct tagMCI_ANIM_OPEN_PARMSA {
  3094.     DWORD   dwCallback;
  3095.     MCIDEVICEID wDeviceID;
  3096.     LPCSTR    lpstrDeviceType;
  3097.     LPCSTR    lpstrElementName;
  3098.     LPCSTR    lpstrAlias;
  3099.     DWORD   dwStyle;
  3100.     HWND    hWndParent;
  3101. } MCI_ANIM_OPEN_PARMSA;
  3102. /* parameter block for MCI_OPEN command message */
  3103. typedef struct tagMCI_ANIM_OPEN_PARMSW {
  3104.     DWORD   dwCallback;
  3105.     MCIDEVICEID wDeviceID;
  3106.     LPCWSTR   lpstrDeviceType;
  3107.     LPCWSTR   lpstrElementName;
  3108.     LPCWSTR   lpstrAlias;
  3109.     DWORD   dwStyle;
  3110.     HWND    hWndParent;
  3111. } MCI_ANIM_OPEN_PARMSW;
  3112. #ifdef UNICODE
  3113. typedef MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS;
  3114. #else
  3115. typedef MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS;
  3116. #endif // UNICODE
  3117. typedef MCI_ANIM_OPEN_PARMSA     *PMCI_ANIM_OPEN_PARMSA;
  3118. typedef MCI_ANIM_OPEN_PARMSW     *PMCI_ANIM_OPEN_PARMSW;
  3119. #ifdef UNICODE
  3120. typedef PMCI_ANIM_OPEN_PARMSW PMCI_ANIM_OPEN_PARMS;
  3121. #else
  3122. typedef PMCI_ANIM_OPEN_PARMSA PMCI_ANIM_OPEN_PARMS;
  3123. #endif // UNICODE
  3124. typedef MCI_ANIM_OPEN_PARMSA     *LPMCI_ANIM_OPEN_PARMSA;
  3125. typedef MCI_ANIM_OPEN_PARMSW     *LPMCI_ANIM_OPEN_PARMSW;
  3126. #ifdef UNICODE
  3127. typedef LPMCI_ANIM_OPEN_PARMSW LPMCI_ANIM_OPEN_PARMS;
  3128. #else
  3129. typedef LPMCI_ANIM_OPEN_PARMSA LPMCI_ANIM_OPEN_PARMS;
  3130. #endif // UNICODE
  3131.  
  3132. /* parameter block for MCI_PLAY command message */
  3133. typedef struct tagMCI_ANIM_PLAY_PARMS {
  3134.     DWORD   dwCallback;
  3135.     DWORD   dwFrom;
  3136.     DWORD   dwTo;
  3137.     DWORD   dwSpeed;
  3138. } MCI_ANIM_PLAY_PARMS;
  3139. typedef MCI_ANIM_PLAY_PARMS     *PMCI_ANIM_PLAY_PARMS;
  3140. typedef MCI_ANIM_PLAY_PARMS     *LPMCI_ANIM_PLAY_PARMS;
  3141.  
  3142. /* parameter block for MCI_STEP command message */
  3143. typedef struct tagMCI_ANIM_STEP_PARMS {
  3144.     DWORD   dwCallback;
  3145.     DWORD   dwFrames;
  3146. } MCI_ANIM_STEP_PARMS;
  3147. typedef MCI_ANIM_STEP_PARMS     *PMCI_ANIM_STEP_PARMS;
  3148. typedef MCI_ANIM_STEP_PARMS     *LPMCI_ANIM_STEP_PARMS;
  3149.  
  3150. /* parameter block for MCI_WINDOW command message */
  3151. typedef struct tagMCI_ANIM_WINDOW_PARMSA {
  3152.     DWORD   dwCallback;
  3153.     HWND    hWnd;
  3154.     UINT    nCmdShow;
  3155.     LPCSTR   lpstrText;
  3156. } MCI_ANIM_WINDOW_PARMSA;
  3157. /* parameter block for MCI_WINDOW command message */
  3158. typedef struct tagMCI_ANIM_WINDOW_PARMSW {
  3159.     DWORD   dwCallback;
  3160.     HWND    hWnd;
  3161.     UINT    nCmdShow;
  3162.     LPCWSTR  lpstrText;
  3163. } MCI_ANIM_WINDOW_PARMSW;
  3164. #ifdef UNICODE
  3165. typedef MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS;
  3166. #else
  3167. typedef MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS;
  3168. #endif // UNICODE
  3169. typedef MCI_ANIM_WINDOW_PARMSA     * PMCI_ANIM_WINDOW_PARMSA;
  3170. typedef MCI_ANIM_WINDOW_PARMSW     * PMCI_ANIM_WINDOW_PARMSW;
  3171. #ifdef UNICODE
  3172. typedef PMCI_ANIM_WINDOW_PARMSW PMCI_ANIM_WINDOW_PARMS;
  3173. #else
  3174. typedef PMCI_ANIM_WINDOW_PARMSA PMCI_ANIM_WINDOW_PARMS;
  3175. #endif // UNICODE
  3176. typedef MCI_ANIM_WINDOW_PARMSA     * LPMCI_ANIM_WINDOW_PARMSA;
  3177. typedef MCI_ANIM_WINDOW_PARMSW     * LPMCI_ANIM_WINDOW_PARMSW;
  3178. #ifdef UNICODE
  3179. typedef LPMCI_ANIM_WINDOW_PARMSW LPMCI_ANIM_WINDOW_PARMS;
  3180. #else
  3181. typedef LPMCI_ANIM_WINDOW_PARMSA LPMCI_ANIM_WINDOW_PARMS;
  3182. #endif // UNICODE
  3183.  
  3184. /* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */
  3185. typedef struct tagMCI_ANIM_RECT_PARMS {
  3186.     DWORD   dwCallback;
  3187. #ifdef MCI_USE_OFFEXT
  3188.     POINT   ptOffset;
  3189.     POINT   ptExtent;
  3190. #else   //ifdef MCI_USE_OFFEXT
  3191.     RECT    rc;
  3192. #endif  //ifdef MCI_USE_OFFEXT
  3193. } MCI_ANIM_RECT_PARMS;
  3194. typedef MCI_ANIM_RECT_PARMS     * PMCI_ANIM_RECT_PARMS;
  3195. typedef MCI_ANIM_RECT_PARMS     * LPMCI_ANIM_RECT_PARMS;
  3196.  
  3197. /* parameter block for MCI_UPDATE PARMS */
  3198. typedef struct tagMCI_ANIM_UPDATE_PARMS {
  3199.     DWORD   dwCallback;
  3200.     RECT    rc;
  3201.     HDC     hDC;
  3202. } MCI_ANIM_UPDATE_PARMS;
  3203. typedef MCI_ANIM_UPDATE_PARMS     * PMCI_ANIM_UPDATE_PARMS;
  3204. typedef MCI_ANIM_UPDATE_PARMS     * LPMCI_ANIM_UPDATE_PARMS;
  3205.  
  3206. /*****************************************************************************
  3207.  
  3208.     Standard command parameters for video overlay devices
  3209.  
  3210. *****************************************************************************/
  3211.  
  3212. /* flags for dwFlags parameter of MCI_OPEN command message */
  3213.      MCI_OVLY_OPEN_WS                $00010000L
  3214.      MCI_OVLY_OPEN_PARENT            $00020000L
  3215.  
  3216. /* flags for dwFlags parameter of MCI_STATUS command message */
  3217.      MCI_OVLY_STATUS_HWND            $00004001L
  3218.      MCI_OVLY_STATUS_STRETCH         $00004002L
  3219.  
  3220. /* flags for dwFlags parameter of MCI_INFO command message */
  3221.      MCI_OVLY_INFO_TEXT              $00010000L
  3222.  
  3223. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3224.      MCI_OVLY_GETDEVCAPS_CAN_STRETCH $00004001L
  3225.      MCI_OVLY_GETDEVCAPS_CAN_FREEZE  $00004002L
  3226.      MCI_OVLY_GETDEVCAPS_MAX_WINDOWS $00004003L
  3227.  
  3228. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3229.      MCI_OVLY_WINDOW_HWND            $00010000L
  3230.      MCI_OVLY_WINDOW_STATE           $00040000L
  3231.      MCI_OVLY_WINDOW_TEXT            $00080000L
  3232.      MCI_OVLY_WINDOW_ENABLE_STRETCH  $00100000L
  3233.      MCI_OVLY_WINDOW_DISABLE_STRETCH $00200000L
  3234.  
  3235. /* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */
  3236.      MCI_OVLY_WINDOW_DEFAULT         $00000000L
  3237.  
  3238. /* flags for dwFlags parameter of MCI_PUT command message */
  3239.      MCI_OVLY_RECT                   $00010000L
  3240.      MCI_OVLY_PUT_SOURCE             $00020000L
  3241.      MCI_OVLY_PUT_DESTINATION        $00040000L
  3242.      MCI_OVLY_PUT_FRAME              $00080000L
  3243.      MCI_OVLY_PUT_VIDEO              $00100000L
  3244.  
  3245. /* flags for dwFlags parameter of MCI_WHERE command message */
  3246.      MCI_OVLY_WHERE_SOURCE           $00020000L
  3247.      MCI_OVLY_WHERE_DESTINATION      $00040000L
  3248.      MCI_OVLY_WHERE_FRAME            $00080000L
  3249.      MCI_OVLY_WHERE_VIDEO            $00100000L
  3250.  
  3251.  
  3252. /* parameter block for MCI_OPEN command message */
  3253. typedef struct tagMCI_OVLY_OPEN_PARMSA {
  3254.     DWORD   dwCallback;
  3255.     MCIDEVICEID wDeviceID;
  3256.     LPCSTR    lpstrDeviceType;
  3257.     LPCSTR    lpstrElementName;
  3258.     LPCSTR    lpstrAlias;
  3259.     DWORD   dwStyle;
  3260.     HWND    hWndParent;
  3261.  } MCI_OVLY_OPEN_PARMSA;
  3262. /* parameter block for MCI_OPEN command message */
  3263. typedef struct tagMCI_OVLY_OPEN_PARMSW {
  3264.     DWORD   dwCallback;
  3265.     MCIDEVICEID wDeviceID;
  3266.     LPCWSTR   lpstrDeviceType;
  3267.     LPCWSTR   lpstrElementName;
  3268.     LPCWSTR   lpstrAlias;
  3269.     DWORD   dwStyle;
  3270.     HWND    hWndParent;
  3271.  } MCI_OVLY_OPEN_PARMSW;
  3272. #ifdef UNICODE
  3273. typedef MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS;
  3274. #else
  3275. typedef MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS;
  3276. #endif // UNICODE
  3277. typedef MCI_OVLY_OPEN_PARMSA     *PMCI_OVLY_OPEN_PARMSA;
  3278. typedef MCI_OVLY_OPEN_PARMSW     *PMCI_OVLY_OPEN_PARMSW;
  3279. #ifdef UNICODE
  3280. typedef PMCI_OVLY_OPEN_PARMSW PMCI_OVLY_OPEN_PARMS;
  3281. #else
  3282. typedef PMCI_OVLY_OPEN_PARMSA PMCI_OVLY_OPEN_PARMS;
  3283. #endif // UNICODE
  3284. typedef MCI_OVLY_OPEN_PARMSA     *LPMCI_OVLY_OPEN_PARMSA;
  3285. typedef MCI_OVLY_OPEN_PARMSW     *LPMCI_OVLY_OPEN_PARMSW;
  3286. #ifdef UNICODE
  3287. typedef LPMCI_OVLY_OPEN_PARMSW LPMCI_OVLY_OPEN_PARMS;
  3288. #else
  3289. typedef LPMCI_OVLY_OPEN_PARMSA LPMCI_OVLY_OPEN_PARMS;
  3290. #endif // UNICODE
  3291.  
  3292. /* parameter block for MCI_WINDOW command message */
  3293. typedef struct tagMCI_OVLY_WINDOW_PARMSA {
  3294.     DWORD   dwCallback;
  3295.     HWND    hWnd;
  3296.     UINT    nCmdShow;
  3297.     LPCSTR    lpstrText;
  3298. } MCI_OVLY_WINDOW_PARMSA;
  3299. /* parameter block for MCI_WINDOW command message */
  3300. typedef struct tagMCI_OVLY_WINDOW_PARMSW {
  3301.     DWORD   dwCallback;
  3302.     HWND    hWnd;
  3303.     UINT    nCmdShow;
  3304.     LPCWSTR   lpstrText;
  3305. } MCI_OVLY_WINDOW_PARMSW;
  3306. #ifdef UNICODE
  3307. typedef MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS;
  3308. #else
  3309. typedef MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS;
  3310. #endif // UNICODE
  3311. typedef MCI_OVLY_WINDOW_PARMSA     * PMCI_OVLY_WINDOW_PARMSA;
  3312. typedef MCI_OVLY_WINDOW_PARMSW     * PMCI_OVLY_WINDOW_PARMSW;
  3313. #ifdef UNICODE
  3314. typedef PMCI_OVLY_WINDOW_PARMSW PMCI_OVLY_WINDOW_PARMS;
  3315. #else
  3316. typedef PMCI_OVLY_WINDOW_PARMSA PMCI_OVLY_WINDOW_PARMS;
  3317. #endif // UNICODE
  3318. typedef MCI_OVLY_WINDOW_PARMSA     * LPMCI_OVLY_WINDOW_PARMSA;
  3319. typedef MCI_OVLY_WINDOW_PARMSW     * LPMCI_OVLY_WINDOW_PARMSW;
  3320. #ifdef UNICODE
  3321. typedef LPMCI_OVLY_WINDOW_PARMSW LPMCI_OVLY_WINDOW_PARMS;
  3322. #else
  3323. typedef LPMCI_OVLY_WINDOW_PARMSA LPMCI_OVLY_WINDOW_PARMS;
  3324. #endif // UNICODE
  3325.  
  3326. /* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */
  3327. typedef struct tagMCI_OVLY_RECT_PARMS {
  3328.     DWORD   dwCallback;
  3329. #ifdef MCI_USE_OFFEXT
  3330.     POINT   ptOffset;
  3331.     POINT   ptExtent;
  3332. #else   //ifdef MCI_USE_OFFEXT
  3333.     RECT    rc;
  3334. #endif  //ifdef MCI_USE_OFFEXT
  3335. } MCI_OVLY_RECT_PARMS;
  3336. typedef MCI_OVLY_RECT_PARMS     * PMCI_OVLY_RECT_PARMS;
  3337. typedef MCI_OVLY_RECT_PARMS     * LPMCI_OVLY_RECT_PARMS;
  3338.  
  3339. /* parameter block for MCI_SAVE command message */
  3340. typedef struct tagMCI_OVLY_SAVE_PARMSA {
  3341.     DWORD   dwCallback;
  3342.     LPCSTR    lpfilename;
  3343.     RECT    rc;
  3344. } MCI_OVLY_SAVE_PARMSA;
  3345. /* parameter block for MCI_SAVE command message */
  3346. typedef struct tagMCI_OVLY_SAVE_PARMSW {
  3347.     DWORD   dwCallback;
  3348.     LPCWSTR   lpfilename;
  3349.     RECT    rc;
  3350. } MCI_OVLY_SAVE_PARMSW;
  3351. #ifdef UNICODE
  3352. typedef MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS;
  3353. #else
  3354. typedef MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS;
  3355. #endif // UNICODE
  3356. typedef MCI_OVLY_SAVE_PARMSA     * PMCI_OVLY_SAVE_PARMSA;
  3357. typedef MCI_OVLY_SAVE_PARMSW     * PMCI_OVLY_SAVE_PARMSW;
  3358. #ifdef UNICODE
  3359. typedef PMCI_OVLY_SAVE_PARMSW PMCI_OVLY_SAVE_PARMS;
  3360. #else
  3361. typedef PMCI_OVLY_SAVE_PARMSA PMCI_OVLY_SAVE_PARMS;
  3362. #endif // UNICODE
  3363. typedef MCI_OVLY_SAVE_PARMSA     * LPMCI_OVLY_SAVE_PARMSA;
  3364. typedef MCI_OVLY_SAVE_PARMSW     * LPMCI_OVLY_SAVE_PARMSW;
  3365. #ifdef UNICODE
  3366. typedef LPMCI_OVLY_SAVE_PARMSW LPMCI_OVLY_SAVE_PARMS;
  3367. #else
  3368. typedef LPMCI_OVLY_SAVE_PARMSA LPMCI_OVLY_SAVE_PARMS;
  3369. #endif // UNICODE
  3370.  
  3371. /* parameter block for MCI_LOAD command message */
  3372. typedef struct tagMCI_OVLY_LOAD_PARMSA {
  3373.     DWORD   dwCallback;
  3374.     LPCSTR    lpfilename;
  3375.     RECT    rc;
  3376. } MCI_OVLY_LOAD_PARMSA;
  3377. /* parameter block for MCI_LOAD command message */
  3378. typedef struct tagMCI_OVLY_LOAD_PARMSW {
  3379.     DWORD   dwCallback;
  3380.     LPCWSTR   lpfilename;
  3381.     RECT    rc;
  3382. } MCI_OVLY_LOAD_PARMSW;
  3383. #ifdef UNICODE
  3384. typedef MCI_OVLY_LOAD_PARMSW MCI_OVLY_LOAD_PARMS;
  3385. #else
  3386. typedef MCI_OVLY_LOAD_PARMSA MCI_OVLY_LOAD_PARMS;
  3387. #endif // UNICODE
  3388. typedef MCI_OVLY_LOAD_PARMSA     * PMCI_OVLY_LOAD_PARMSA;
  3389. typedef MCI_OVLY_LOAD_PARMSW     * PMCI_OVLY_LOAD_PARMSW;
  3390. #ifdef UNICODE
  3391. typedef PMCI_OVLY_LOAD_PARMSW PMCI_OVLY_LOAD_PARMS;
  3392. #else
  3393. typedef PMCI_OVLY_LOAD_PARMSA PMCI_OVLY_LOAD_PARMS;
  3394. #endif // UNICODE
  3395. typedef MCI_OVLY_LOAD_PARMSA     * LPMCI_OVLY_LOAD_PARMSA;
  3396. typedef MCI_OVLY_LOAD_PARMSW     * LPMCI_OVLY_LOAD_PARMSW;
  3397. #ifdef UNICODE
  3398. typedef LPMCI_OVLY_LOAD_PARMSW LPMCI_OVLY_LOAD_PARMS;
  3399. #else
  3400. typedef LPMCI_OVLY_LOAD_PARMSA LPMCI_OVLY_LOAD_PARMS;
  3401. #endif // UNICODE
  3402.  
  3403. #endif  //ifndef MMNOMCI
  3404.  
  3405.  
  3406. /****************************************************************************
  3407.  
  3408.                         DISPLAY Driver extensions
  3409.  
  3410. ****************************************************************************/
  3411.  
  3412. #ifndef C1_TRANSPARENT
  3413.      CAPS1           94              // other caps
  3414.      C1_TRANSPARENT  $0001          // new raster cap
  3415.      NEWTRANSPARENT  3               // use with SetBkMode()
  3416.  
  3417.      QUERYROPSUPPORT 40              // use to determine ROP support
  3418. #endif  //ifndef C1_TRANSPARENT
  3419.  
  3420. /****************************************************************************
  3421.  
  3422.                         DIB Driver extensions
  3423.  
  3424. ****************************************************************************/
  3425.  
  3426.      SELECTDIB       41              // DIB.DRV select dib escape
  3427.      DIBINDEX(n)     MAKELONG((n),$10FF)
  3428.  
  3429.  
  3430. /****************************************************************************
  3431.  
  3432.                         ScreenSaver support
  3433.  
  3434.     The current application will receive a syscommand of SC_SCREENSAVE just
  3435.     before the screen saver is invoked.  If the app wishes to prevent a
  3436.     screen save, return non-zero value, otherwise call DefWindowProc().
  3437.  
  3438. ****************************************************************************/
  3439.  
  3440. #ifndef SC_SCREENSAVE
  3441.  
  3442.      SC_SCREENSAVE   $F140
  3443.  
  3444. #endif  //ifndef SC_SCREENSAVE
  3445.  
  3446. #ifdef __cplusplus
  3447. }                       // End of extern "C" {
  3448. #endif  // __cplusplus
  3449.  
  3450. #include "poppack.h"    /* Revert to default packing */
  3451.  
  3452. #endif // _INC_MMSYSTEM
  3453.  
  3454. #endif  /* __FLAT__ */
  3455. *)
  3456.  
  3457. IMPORTS
  3458.    FUNCTION mciSendString(CONST lpstrCommand:CSTRING;VAR lpstrReturnString:CSTRING;
  3459.                           uReturnLength:LONGWORD;hwndCallback:HWND):MCIError;
  3460.         APIENTRY;   'WINMM' name 'mciSendStringA';
  3461.    FUNCTION mciGetErrorString(mcierr:MCIERROR;VAR lpstrBuffer:CSTRING;
  3462.                               cchText:LONGWORD ):BOOL;
  3463.         APIENTRY;   'WINMM' name 'mciGetErrorStringA';
  3464.    FUNCTION mciGetDeviceID(CONST lpstrName:CSTRING):MCIDEVICEID;
  3465.         APIENTRY;   'WINMM' name 'mciGetDeviceIDA';
  3466. (*
  3467. LRESULT APIENTRY CloseDriver(HDRVR hDriver, LONG lParam1, LONG lParam2);
  3468. HDRVR   APIENTRY OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName, LONG lParam2);
  3469. LRESULT APIENTRY SendDriverMessage( HDRVR hDriver, UINT uMsg, LONG lParam1, LONG lParam2);
  3470. HMODULE APIENTRY DrvGetModuleHandle( HDRVR hDriver );
  3471. HMODULE APIENTRY GetDriverModuleHandle( HDRVR hDriver );
  3472. LRESULT WINAPI   DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2);
  3473. UINT APIENTRY mmsystemGetVersion(VOID);
  3474. BOOL APIENTRY sndPlaySoundA( LPCSTR lpszSoundName, UINT fuSound );
  3475. BOOL APIENTRY sndPlaySoundW( LPCWSTR lpszSoundName, UINT fuSound );
  3476. #ifdef UNICODE
  3477.      sndPlaySound  sndPlaySoundW
  3478. #else
  3479.      sndPlaySound  sndPlaySoundA
  3480. #endif // !UNICODE
  3481. BOOL APIENTRY PlaySoundA( LPCSTR lpszName, HMODULE hModule, DWORD dwFlags );
  3482. BOOL APIENTRY PlaySoundW( LPCWSTR lpszName, HMODULE hModule, DWORD dwFlags );
  3483. #ifdef UNICODE
  3484.      PlaySound  PlaySoundW
  3485. #else
  3486.      PlaySound  PlaySoundA
  3487. #endif // !UNICODE
  3488.  
  3489. sndAlias( ch0, ch1 ) \
  3490.                 ( SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ))
  3491.  
  3492. SND_ALIAS_SYSTEMASTERISK        sndAlias('S', '*')
  3493.      SND_ALIAS_SYSTEMQUESTION        sndAlias('S', '?')
  3494.      SND_ALIAS_SYSTEMHAND            sndAlias('S', 'H')
  3495.      SND_ALIAS_SYSTEMEXIT            sndAlias('S', 'E')
  3496.      SND_ALIAS_SYSTEMSTART           sndAlias('S', 'S')
  3497.      SND_ALIAS_SYSTEMWELCOME         sndAlias('S', 'W')
  3498.      SND_ALIAS_SYSTEMEXCLAMATION     sndAlias('S', '!')
  3499.      SND_ALIAS_SYSTEMDEFAULT         sndAlias('S', 'D')
  3500.  
  3501. *)
  3502. END;
  3503.  
  3504. IMPLEMENTATION
  3505.  
  3506. END.