home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / MMSYSTEM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  155.5 KB  |  3,951 lines

  1. #if !defined(__TOPLEVEL_NEXT_COMMON_INCLUDE__)
  2. #define __TOPLEVEL_NEXT_COMMON_INCLUDE__
  3. #define __TOPLEVEL_MMSYSTEM_H_ 
  4. #include <next_common_defines.h>
  5. #endif /* __TOPLEVEL_NEXT_COMMON_INCLUDE__ */
  6.  
  7. /*==========================================================================
  8.  *
  9.  *  mmsystem.h -- Include file for Multimedia API's
  10.  *
  11.  *  Version 4.00
  12.  *
  13.  *  Copyright (C) 1992-1995 Microsoft Corporation.  All Rights Reserved.
  14.  *
  15.  *--------------------------------------------------------------------------
  16.  *
  17.  *  Define:         Prevent inclusion of:
  18.  *  --------------  --------------------------------------------------------
  19.  *  MMNODRV         Installable driver support
  20.  *  MMNOSOUND       Sound support
  21.  *  MMNOWAVE        Waveform support
  22.  *  MMNOMIDI        MIDI support
  23.  *  MMNOAUX         Auxiliary audio support
  24.  *  MMNOMIXER       Mixer support
  25.  *  MMNOTIMER       Timer support
  26.  *  MMNOJOY         Joystick support
  27.  *  MMNOMCI         MCI support
  28.  *  MMNOMMIO        Multimedia file I/O support
  29.  *  MMNOMMSYSTEM    General MMSYSTEM functions
  30.  *
  31.  *==========================================================================
  32.  */
  33.  
  34. #ifndef _INC_MMSYSTEM
  35. #define _INC_MMSYSTEM   /* #defined if mmsystem.h has been included */
  36.  
  37. #ifdef _WIN32
  38. #include <pshpack1.h>
  39. #else
  40. #ifndef RC_INVOKED
  41. #pragma pack(1)
  42. #endif
  43. #endif
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {            /* Assume C declarations for C++ */
  47. #endif  /* __cplusplus */
  48.  
  49. #ifdef _WIN32
  50. #ifndef _WINMM_
  51. #define    WINMMAPI    DECLSPEC_IMPORT
  52. #else
  53. #define    WINMMAPI
  54. #endif
  55. #define _loadds
  56. #define _huge
  57. #else
  58. #define    WINMMAPI
  59. #endif
  60.  
  61. #ifdef _WIN32_VXD
  62.  
  63. #define NEAR
  64. #define FAR
  65.  
  66. #define DECLARE_HANDLE(x) typedef WORD x
  67. #define WINAPI
  68.  
  69. typedef DWORD LPSTR;
  70. typedef DWORD LPVOID;
  71. typedef DWORD LPCSTR;
  72. typedef DWORD LPCWSTR;
  73. typedef DWORD LRESULT;
  74. typedef DWORD LPARAM;
  75. typedef DWORD WPARAM;
  76.  
  77. typedef short WCHAR;
  78.  
  79. #endif
  80.  
  81. /****************************************************************************
  82.  
  83.             General constants and data types
  84.  
  85. ****************************************************************************/
  86.  
  87. /* general constants */
  88. #define MAXPNAMELEN      32     /* max product name length (including NULL) */
  89. #define MAXERRORLENGTH   256    /* max error text length (including NULL) */
  90. #define MAX_JOYSTICKOEMVXDNAME 260 /* max oem vxd name length (including NULL) */
  91.  
  92. /*
  93.  *  Microsoft Manufacturer and Product ID's (these have been moved to
  94.  *  MMREG.H for Windows 4.00 and above).
  95.  */
  96. #if (WINVER <= 0x030A)
  97. #ifndef MM_MICROSOFT
  98. #define MM_MICROSOFT            1   /* Microsoft Corporation */
  99. #endif
  100.  
  101. #ifndef MM_MIDI_MAPPER
  102. #define MM_MIDI_MAPPER          1   /* MIDI Mapper */
  103. #define MM_WAVE_MAPPER          2   /* Wave Mapper */
  104. #define MM_SNDBLST_MIDIOUT      3   /* Sound Blaster MIDI output port */
  105. #define MM_SNDBLST_MIDIIN       4   /* Sound Blaster MIDI input port */
  106. #define MM_SNDBLST_SYNTH        5   /* Sound Blaster internal synthesizer */
  107. #define MM_SNDBLST_WAVEOUT      6   /* Sound Blaster waveform output */
  108. #define MM_SNDBLST_WAVEIN       7   /* Sound Blaster waveform input */
  109. #define MM_ADLIB                9   /* Ad Lib-compatible synthesizer */
  110. #define MM_MPU401_MIDIOUT      10   /* MPU401-compatible MIDI output port */
  111. #define MM_MPU401_MIDIIN       11   /* MPU401-compatible MIDI input port */
  112. #define MM_PC_JOYSTICK         12   /* Joystick adapter */
  113. #endif
  114. #endif
  115.  
  116. /* general data types */
  117.  
  118. #ifdef _WIN32
  119. typedef UINT        MMVERSION;  /* major (high byte), minor (low byte) */
  120. #else
  121. typedef UINT        VERSION;    /* major (high byte), minor (low byte) */
  122. #endif
  123. typedef UINT        MMRESULT;   /* error return code, 0 means no error */
  124.                 /* call as if(err=xxxx(...)) Error(err); else */
  125. #define _MMRESULT_
  126.  
  127. typedef UINT FAR   *LPUINT;
  128.  
  129. /* MMTIME data structure */
  130. typedef struct mmtime_tag
  131. {
  132.     UINT            wType;      /* indicates the contents of the union */
  133.     union
  134.     {
  135.     DWORD       ms;         /* milliseconds */
  136.     DWORD       sample;     /* samples */
  137.     DWORD       cb;         /* byte count */
  138.     DWORD       ticks;      /* ticks in MIDI stream */
  139.  
  140.     /* SMPTE */
  141.     struct
  142.     {
  143.         BYTE    hour;       /* hours */
  144.         BYTE    min;        /* minutes */
  145.         BYTE    sec;        /* seconds */
  146.         BYTE    frame;      /* frames  */
  147.         BYTE    fps;        /* frames per second */
  148.         BYTE    dummy;      /* pad */
  149. #ifdef _WIN32
  150.         BYTE    pad[2];
  151. #endif
  152.     } smpte;
  153.  
  154.     /* MIDI */
  155.     struct
  156.     {
  157.         DWORD songptrpos;   /* song pointer position */
  158.     } midi;
  159.     } u;
  160. } MMTIME, *PMMTIME, NEAR *NPMMTIME, FAR *LPMMTIME;
  161.  
  162. /* types for wType field in MMTIME struct */
  163. #define TIME_MS         0x0001  /* time in milliseconds */
  164. #define TIME_SAMPLES    0x0002  /* number of wave samples */
  165. #define TIME_BYTES      0x0004  /* current byte offset */
  166. #define TIME_SMPTE      0x0008  /* SMPTE time */
  167. #define TIME_MIDI       0x0010  /* MIDI time */
  168. #define TIME_TICKS      0x0020  /* Ticks within MIDI stream */
  169.  
  170. /*
  171.  *
  172.  *
  173.  */
  174. #define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \
  175.         ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |   \
  176.         ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  177.  
  178. /****************************************************************************
  179.  
  180.             Multimedia Extensions Window Messages
  181.  
  182. ****************************************************************************/
  183.  
  184. #define MM_JOY1MOVE         0x3A0           /* joystick */
  185. #define MM_JOY2MOVE         0x3A1
  186. #define MM_JOY1ZMOVE        0x3A2
  187. #define MM_JOY2ZMOVE        0x3A3
  188. #define MM_JOY1BUTTONDOWN   0x3B5
  189. #define MM_JOY2BUTTONDOWN   0x3B6
  190. #define MM_JOY1BUTTONUP     0x3B7
  191. #define MM_JOY2BUTTONUP     0x3B8
  192.  
  193. #define MM_MCINOTIFY        0x3B9           /* MCI */
  194.  
  195. #define MM_WOM_OPEN         0x3BB           /* waveform output */
  196. #define MM_WOM_CLOSE        0x3BC
  197. #define MM_WOM_DONE         0x3BD
  198.  
  199. #define MM_WIM_OPEN         0x3BE           /* waveform input */
  200. #define MM_WIM_CLOSE        0x3BF
  201. #define MM_WIM_DATA         0x3C0
  202.  
  203. #define MM_MIM_OPEN         0x3C1           /* MIDI input */
  204. #define MM_MIM_CLOSE        0x3C2
  205. #define MM_MIM_DATA         0x3C3
  206. #define MM_MIM_LONGDATA     0x3C4
  207. #define MM_MIM_ERROR        0x3C5
  208. #define MM_MIM_LONGERROR    0x3C6
  209.  
  210. #define MM_MOM_OPEN         0x3C7           /* MIDI output */
  211. #define MM_MOM_CLOSE        0x3C8
  212. #define MM_MOM_DONE         0x3C9
  213.  
  214. /* these are also in msvideo.h */
  215. #ifndef MM_DRVM_OPEN
  216.  #define MM_DRVM_OPEN       0x3D0           /* installable drivers */
  217.  #define MM_DRVM_CLOSE      0x3D1
  218.  #define MM_DRVM_DATA       0x3D2
  219.  #define MM_DRVM_ERROR      0x3D3
  220. #endif
  221.  
  222. /* these are used by msacm.h */
  223. #define MM_STREAM_OPEN        0x3D4
  224. #define MM_STREAM_CLOSE        0x3D5
  225. #define MM_STREAM_DONE        0x3D6
  226. #define MM_STREAM_ERROR        0x3D7
  227.  
  228. #if(WINVER >= 0x0400)
  229. #define MM_MOM_POSITIONCB   0x3CA           /* Callback for MEVT_POSITIONCB */
  230.  
  231. #ifndef MM_MCISIGNAL
  232.  #define MM_MCISIGNAL        0x3CB
  233. #endif
  234.  
  235. #define MM_MIM_MOREDATA      0x3CC          /* MIM_DONE w/ pending events */
  236.  
  237. #endif /* WINVER >= 0x0400 */
  238. #define MM_MIXM_LINE_CHANGE     0x3D0       /* mixer line change notify */
  239. #define MM_MIXM_CONTROL_CHANGE  0x3D1       /* mixer control change notify */
  240.  
  241. /****************************************************************************
  242.  
  243.         String resource number bases (internal use)
  244.  
  245. ****************************************************************************/
  246.  
  247. #define MMSYSERR_BASE          0
  248. #define WAVERR_BASE            32
  249. #define MIDIERR_BASE           64
  250. #define TIMERR_BASE            96
  251. #define JOYERR_BASE            160
  252. #define MCIERR_BASE            256
  253. #define MIXERR_BASE            1024
  254.  
  255. #define MCI_STRING_OFFSET      512
  256. #define MCI_VD_OFFSET          1024
  257. #define MCI_CD_OFFSET          1088
  258. #define MCI_WAVE_OFFSET        1152
  259. #define MCI_SEQ_OFFSET         1216
  260.  
  261. /****************************************************************************
  262.  
  263.             General error return values
  264.  
  265. ****************************************************************************/
  266.  
  267. /* general error return values */
  268. #define MMSYSERR_NOERROR      0                    /* no error */
  269. #define MMSYSERR_ERROR        (MMSYSERR_BASE + 1)  /* unspecified error */
  270. #define MMSYSERR_BADDEVICEID  (MMSYSERR_BASE + 2)  /* device ID out of range */
  271. #define MMSYSERR_NOTENABLED   (MMSYSERR_BASE + 3)  /* driver failed enable */
  272. #define MMSYSERR_ALLOCATED    (MMSYSERR_BASE + 4)  /* device already allocated */
  273. #define MMSYSERR_INVALHANDLE  (MMSYSERR_BASE + 5)  /* device handle is invalid */
  274. #define MMSYSERR_NODRIVER     (MMSYSERR_BASE + 6)  /* no device driver present */
  275. #define MMSYSERR_NOMEM        (MMSYSERR_BASE + 7)  /* memory allocation error */
  276. #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8)  /* function isn't supported */
  277. #define MMSYSERR_BADERRNUM    (MMSYSERR_BASE + 9)  /* error value out of range */
  278. #define MMSYSERR_INVALFLAG    (MMSYSERR_BASE + 10) /* invalid flag passed */
  279. #define MMSYSERR_INVALPARAM   (MMSYSERR_BASE + 11) /* invalid parameter passed */
  280. #define MMSYSERR_HANDLEBUSY   (MMSYSERR_BASE + 12) /* handle being used */
  281.                            /* simultaneously on another */
  282.                            /* thread (eg callback) */
  283. #define MMSYSERR_INVALIDALIAS (MMSYSERR_BASE + 13) /* specified alias not found */
  284. #define MMSYSERR_BADDB        (MMSYSERR_BASE + 14) /* bad registry database */
  285. #define MMSYSERR_KEYNOTFOUND  (MMSYSERR_BASE + 15) /* registry key not found */
  286. #define MMSYSERR_READERROR    (MMSYSERR_BASE + 16) /* registry read error */
  287. #define MMSYSERR_WRITEERROR   (MMSYSERR_BASE + 17) /* registry write error */
  288. #define MMSYSERR_DELETEERROR  (MMSYSERR_BASE + 18) /* registry delete error */
  289. #define MMSYSERR_VALNOTFOUND  (MMSYSERR_BASE + 19) /* registry value not found */
  290. #define MMSYSERR_NODRIVERCB   (MMSYSERR_BASE + 20) /* driver does not call DriverCallback */
  291. #define MMSYSERR_LASTERROR    (MMSYSERR_BASE + 20) /* last error in range */
  292.  
  293. #if (WINVER < 0x030a) || defined(_WIN32)
  294. DECLARE_HANDLE(HDRVR);
  295. #endif /* ifdef WINVER < 0x030a */
  296.  
  297. #ifndef MMNODRV
  298.  
  299. /****************************************************************************
  300.  
  301.             Installable driver support
  302.  
  303. ****************************************************************************/
  304.  
  305. #ifdef _WIN32
  306. typedef struct DRVCONFIGINFOEX {
  307.     DWORD   dwDCISize;
  308.     LPCWSTR  lpszDCISectionName;
  309.     LPCWSTR  lpszDCIAliasName;
  310.     DWORD    dnDevNode;
  311. } DRVCONFIGINFOEX, *PDRVCONFIGINFOEX, NEAR *NPDRVCONFIGINFOEX, FAR *LPDRVCONFIGINFOEX;
  312.  
  313. #else
  314. typedef struct DRVCONFIGINFOEX {
  315.     DWORD   dwDCISize;
  316.     LPCSTR  lpszDCISectionName;
  317.     LPCSTR  lpszDCIAliasName;
  318.     DWORD    dnDevNode;
  319. } DRVCONFIGINFOEX, *PDRVCONFIGINFOEX, NEAR *NPDRVCONFIGINFOEX, FAR *LPDRVCONFIGINFOEX;
  320. #endif
  321.  
  322. #if (WINVER < 0x030a) || defined(_WIN32)
  323.  
  324. #ifndef DRV_LOAD
  325.  
  326. /* Driver messages */
  327. #define DRV_LOAD                0x0001
  328. #define DRV_ENABLE              0x0002
  329. #define DRV_OPEN                0x0003
  330. #define DRV_CLOSE               0x0004
  331. #define DRV_DISABLE             0x0005
  332. #define DRV_FREE                0x0006
  333. #define DRV_CONFIGURE           0x0007
  334. #define DRV_QUERYCONFIGURE      0x0008
  335. #define DRV_INSTALL             0x0009
  336. #define DRV_REMOVE              0x000A
  337. #define DRV_EXITSESSION         0x000B
  338. #define DRV_POWER               0x000F
  339. #define DRV_RESERVED            0x0800
  340. #define DRV_USER                0x4000
  341.  
  342. /* LPARAM of DRV_CONFIGURE message */
  343. #ifdef _WIN32
  344. typedef struct tagDRVCONFIGINFO {
  345.     DWORD   dwDCISize;
  346.     LPCWSTR  lpszDCISectionName;
  347.     LPCWSTR  lpszDCIAliasName;
  348. } DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
  349. #else
  350. typedef struct tagDRVCONFIGINFO {
  351.     DWORD   dwDCISize;
  352.     LPCSTR  lpszDCISectionName;
  353.     LPCSTR  lpszDCIAliasName;
  354. } DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
  355. #endif
  356.  
  357. /* Supported return values for DRV_CONFIGURE message */
  358. #define DRVCNF_CANCEL           0x0000
  359. #define DRVCNF_OK               0x0001
  360. #define DRVCNF_RESTART          0x0002
  361.  
  362. /* installable driver function prototypes */
  363. #ifdef _WIN32
  364.  #ifndef _WIN32_VXD
  365.  
  366. typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  367.  
  368. WINMMAPI LRESULT   WINAPI CloseDriver(HDRVR hDriver, LONG lParam1, LONG lParam2);
  369. WINMMAPI HDRVR     WINAPI OpenDriver(LPCWSTR szDriverName, LPCWSTR szSectionName, LONG lParam2);
  370. WINMMAPI LRESULT   WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LONG lParam1, LONG lParam2);
  371. WINMMAPI HMODULE   WINAPI DrvGetModuleHandle(HDRVR hDriver);
  372. WINMMAPI HMODULE   WINAPI GetDriverModuleHandle(HDRVR hDriver);
  373. WINMMAPI LRESULT   WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  374.  #endif /* ifndef _WIN32_VXD */
  375. #else
  376. LRESULT   WINAPI DrvClose(HDRVR hdrvr, LPARAM lParam1, LPARAM lParam2);
  377. HDRVR     WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2);
  378. LRESULT   WINAPI DrvSendMessage(HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  379. HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hdrvr);
  380. LRESULT   WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  381. #define DefDriverProc DrvDefDriverProc
  382. #endif /* ifdef _WIN32 */
  383. #endif /* DRV_LOAD */
  384. #endif /* ifdef (WINVER < 0x030a) || defined(_WIN32) */
  385.  
  386. #if (WINVER >= 0x030a)
  387. /* return values from DriverProc() function */
  388. #define DRV_CANCEL             DRVCNF_CANCEL
  389. #define DRV_OK                 DRVCNF_OK
  390. #define DRV_RESTART            DRVCNF_RESTART
  391.  
  392. #endif /* ifdef WINVER >= 0x030a */
  393.  
  394. #define DRV_MCI_FIRST          DRV_RESERVED
  395. #define DRV_MCI_LAST           (DRV_RESERVED + 0xFFF)
  396.  
  397. #endif  /* ifndef MMNODRV */
  398.  
  399. /****************************************************************************
  400.  
  401.               Driver callback support
  402.  
  403. ****************************************************************************/
  404.  
  405. /* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */
  406. /* midiOutOpen() to specify the type of the dwCallback parameter. */
  407.  
  408. #define CALLBACK_TYPEMASK   0x00070000l    /* callback type mask */
  409. #define CALLBACK_NULL       0x00000000l    /* no callback */
  410. #define CALLBACK_WINDOW     0x00010000l    /* dwCallback is a HWND */
  411. #define CALLBACK_TASK       0x00020000l    /* dwCallback is a HTASK */
  412. #define CALLBACK_FUNCTION   0x00030000l    /* dwCallback is a FARPROC */
  413. #ifdef _WIN32
  414. #define CALLBACK_THREAD     (CALLBACK_TASK)/* thread ID replaces 16 bit task */
  415. #define CALLBACK_EVENT      0x00050000l    /* dwCallback is an EVENT Handle */
  416. #endif
  417.  
  418. #ifndef _WIN32_VXD 
  419.  
  420. typedef void (CALLBACK DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
  421.  
  422. typedef DRVCALLBACK FAR *LPDRVCALLBACK;
  423. #ifdef _WIN32
  424. typedef DRVCALLBACK     *PDRVCALLBACK;
  425. #endif
  426.  
  427. #endif   /* ifndef _WIN32_VXD */ 
  428.  
  429. #ifndef MMNOMMSYSTEM
  430. #ifndef _WIN32_VXD
  431. /****************************************************************************
  432.  
  433.             General MMSYSTEM support
  434.  
  435. ****************************************************************************/
  436.  
  437. #if (WINVER <= 0x030A)
  438. WINMMAPI UINT WINAPI mmsystemGetVersion(void);
  439. #endif
  440. #ifdef _WIN32
  441. #define OutputDebugStr  OutputDebugString
  442. #else
  443. void WINAPI OutputDebugStr(LPCSTR);
  444. #endif
  445.  
  446. #endif  /* ifndef _WIN32_VXD */
  447. #endif  /* ifndef MMNOMMSYSTEM */
  448.  
  449. #ifndef MMNOSOUND
  450. #ifndef _WIN32_VXD
  451. /****************************************************************************
  452.  
  453.                 Sound support
  454.  
  455. ****************************************************************************/
  456.  
  457. #ifdef _WIN32
  458.  
  459. #ifndef UNICODE_ONLY
  460. WINMMAPI BOOL WINAPI sndPlaySoundA(LPCSTR pszSound, UINT fuSound);
  461. #endif //!UNICODE_ONLY
  462. #ifndef ANSI_ONLY
  463. WINMMAPI BOOL WINAPI sndPlaySoundW(LPCWSTR pszSound, UINT fuSound);
  464. #endif //!ANSI_ONLY
  465. #ifdef UNICODE
  466. #define sndPlaySound  sndPlaySoundW
  467. #else
  468. #define sndPlaySound  sndPlaySoundA
  469. #endif // !UNICODE
  470.  
  471. #else
  472. BOOL WINAPI sndPlaySound(LPCSTR pszSound, UINT fuSound);
  473. #endif
  474.  
  475. /*
  476.  *  flag values for fuSound and fdwSound arguments on [snd]PlaySound
  477.  */
  478. #define SND_SYNC            0x0000  /* play synchronously (default) */
  479. #define SND_ASYNC           0x0001  /* play asynchronously */
  480. #define SND_NODEFAULT       0x0002  /* silence (!default) if sound not found */
  481. #define SND_MEMORY          0x0004  /* pszSound points to a memory file */
  482. #define SND_LOOP            0x0008  /* loop the sound until next sndPlaySound */
  483. #define SND_NOSTOP          0x0010  /* don't stop any currently playing sound */
  484.  
  485. #define SND_NOWAIT    0x00002000L /* don't wait if the driver is busy */
  486. #define SND_ALIAS       0x00010000L /* name is a registry alias */
  487. #define SND_ALIAS_ID    0x00110000L /* alias is a predefined ID */
  488. #define SND_FILENAME    0x00020000L /* name is file name */
  489. #define SND_RESOURCE    0x00040004L /* name is resource name or atom */
  490. #if(WINVER >= 0x0400)
  491. #define SND_PURGE           0x0040  /* purge non-static events for task */
  492. #define SND_APPLICATION     0x0080  /* look for application specific association */
  493. #endif /* WINVER >= 0x0400 */
  494.  
  495. #define SND_ALIAS_START    0           /* alias base */
  496.  
  497. #ifdef _WIN32
  498. #define    sndAlias(ch0, ch1)    (SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8))
  499.  
  500. #define SND_ALIAS_SYSTEMASTERISK        sndAlias('S', '*')
  501. #define SND_ALIAS_SYSTEMQUESTION        sndAlias('S', '?')
  502. #define SND_ALIAS_SYSTEMHAND            sndAlias('S', 'H')
  503. #define SND_ALIAS_SYSTEMEXIT            sndAlias('S', 'E')
  504. #define SND_ALIAS_SYSTEMSTART           sndAlias('S', 'S')
  505. #define SND_ALIAS_SYSTEMWELCOME         sndAlias('S', 'W')
  506. #define SND_ALIAS_SYSTEMEXCLAMATION     sndAlias('S', '!')
  507. #define SND_ALIAS_SYSTEMDEFAULT         sndAlias('S', 'D')
  508.  
  509. #ifndef UNICODE_ONLY
  510. WINMMAPI BOOL WINAPI PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
  511. #endif //!UNICODE_ONLY
  512. #ifndef ANSI_ONLY
  513. WINMMAPI BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
  514. #endif //!ANSI_ONLY
  515. #ifdef UNICODE
  516. #define PlaySound  PlaySoundW
  517. #else
  518. #define PlaySound  PlaySoundA
  519. #endif // !UNICODE
  520.  
  521. #else
  522. BOOL WINAPI PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
  523. #endif
  524.  
  525. #endif  /* ifndef _WIN32_VXD */
  526. #endif  /* ifndef MMNOSOUND */
  527.  
  528. #ifndef MMNOWAVE
  529. /****************************************************************************
  530.  
  531.             Waveform audio support
  532.  
  533. ****************************************************************************/
  534.  
  535. /* waveform audio error return values */
  536. #define WAVERR_BADFORMAT      (WAVERR_BASE + 0)    /* unsupported wave format */
  537. #define WAVERR_STILLPLAYING   (WAVERR_BASE + 1)    /* still something playing */
  538. #define WAVERR_UNPREPARED     (WAVERR_BASE + 2)    /* header not prepared */
  539. #define WAVERR_SYNC           (WAVERR_BASE + 3)    /* device is synchronous */
  540. #define WAVERR_LASTERROR      (WAVERR_BASE + 3)    /* last error in range */
  541.  
  542. /* waveform audio data types */
  543. DECLARE_HANDLE(HWAVE);
  544. DECLARE_HANDLE(HWAVEIN);
  545. DECLARE_HANDLE(HWAVEOUT);
  546. #ifndef _WIN32_VXD
  547. typedef HWAVEIN FAR *LPHWAVEIN;
  548. typedef HWAVEOUT FAR *LPHWAVEOUT;
  549. typedef DRVCALLBACK WAVECALLBACK;
  550. typedef WAVECALLBACK FAR *LPWAVECALLBACK;
  551. #endif
  552.  
  553. /* wave callback messages */
  554. #define WOM_OPEN        MM_WOM_OPEN
  555. #define WOM_CLOSE       MM_WOM_CLOSE
  556. #define WOM_DONE        MM_WOM_DONE
  557. #define WIM_OPEN        MM_WIM_OPEN
  558. #define WIM_CLOSE       MM_WIM_CLOSE
  559. #define WIM_DATA        MM_WIM_DATA
  560.  
  561. /* device ID for wave device mapper */
  562. #define WAVE_MAPPER     ((UINT)-1)
  563.  
  564. /* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
  565. #define  WAVE_FORMAT_QUERY         0x0001
  566. #define  WAVE_ALLOWSYNC            0x0002
  567. #if(WINVER >= 0x0400)
  568. #define  WAVE_MAPPED               0x0004
  569. #define  WAVE_FORMAT_DIRECT        0x0008
  570. #define  WAVE_FORMAT_DIRECT_QUERY  (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
  571. #endif /* WINVER >= 0x0400 */
  572.  
  573. /* wave data block header */
  574. typedef struct wavehdr_tag {
  575.     LPSTR       lpData;                 /* pointer to locked data buffer */
  576.     DWORD       dwBufferLength;         /* length of data buffer */
  577.     DWORD       dwBytesRecorded;        /* used for input only */
  578.     DWORD       dwUser;                 /* for client's use */
  579.     DWORD       dwFlags;                /* assorted flags (see defines) */
  580.     DWORD       dwLoops;                /* loop control counter */
  581.     struct wavehdr_tag FAR *lpNext;     /* reserved for driver */
  582.     DWORD       reserved;               /* reserved for driver */
  583. } WAVEHDR, *PWAVEHDR, NEAR *NPWAVEHDR, FAR *LPWAVEHDR;
  584.  
  585. /* flags for dwFlags field of WAVEHDR */
  586. #define WHDR_DONE       0x00000001  /* done bit */
  587. #define WHDR_PREPARED   0x00000002  /* set if this header has been prepared */
  588. #define WHDR_BEGINLOOP  0x00000004  /* loop start block */
  589. #define WHDR_ENDLOOP    0x00000008  /* loop end block */
  590. #define WHDR_INQUEUE    0x00000010  /* reserved for driver */
  591.  
  592. /* waveform output device capabilities structure */
  593. #ifdef _WIN32
  594.  
  595. #ifndef UNICODE_ONLY
  596. typedef struct tagWAVEOUTCAPSA {
  597.     WORD    wMid;                  /* manufacturer ID */
  598.     WORD    wPid;                  /* product ID */
  599.     MMVERSION vDriverVersion;      /* version of the driver */
  600.     CHAR    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  601.     DWORD   dwFormats;             /* formats supported */
  602.     WORD    wChannels;             /* number of sources supported */
  603.     WORD    wReserved1;            /* packing */
  604.     DWORD   dwSupport;             /* functionality supported by driver */
  605. } WAVEOUTCAPSA, *PWAVEOUTCAPSA, *NPWAVEOUTCAPSA, *LPWAVEOUTCAPSA;
  606. #endif //!UNICODE_ONLY
  607. #ifndef ANSI_ONLY
  608. typedef struct tagWAVEOUTCAPSW {
  609.     WORD    wMid;                  /* manufacturer ID */
  610.     WORD    wPid;                  /* product ID */
  611.     MMVERSION vDriverVersion;      /* version of the driver */
  612.     WCHAR   szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  613.     DWORD   dwFormats;             /* formats supported */
  614.     WORD    wChannels;             /* number of sources supported */
  615.     WORD    wReserved1;            /* packing */
  616.     DWORD   dwSupport;             /* functionality supported by driver */
  617. } WAVEOUTCAPSW, *PWAVEOUTCAPSW, *NPWAVEOUTCAPSW, *LPWAVEOUTCAPSW;
  618. #endif //!ANSI_ONLY
  619. #ifdef UNICODE
  620. typedef WAVEOUTCAPSW WAVEOUTCAPS;
  621. typedef PWAVEOUTCAPSW PWAVEOUTCAPS;
  622. typedef NPWAVEOUTCAPSW NPWAVEOUTCAPS;
  623. typedef LPWAVEOUTCAPSW LPWAVEOUTCAPS;
  624. #else
  625. typedef WAVEOUTCAPSA WAVEOUTCAPS;
  626. typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
  627. typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
  628. typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
  629. #endif // UNICODE
  630.  
  631. #else
  632. typedef struct waveoutcaps_tag {
  633.     WORD    wMid;                  /* manufacturer ID */
  634.     WORD    wPid;                  /* product ID */
  635.     VERSION vDriverVersion;        /* version of the driver */
  636.     char    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  637.     DWORD   dwFormats;             /* formats supported */
  638.     WORD    wChannels;             /* number of sources supported */
  639.     DWORD   dwSupport;             /* functionality supported by driver */
  640. } WAVEOUTCAPS, *PWAVEOUTCAPS, NEAR *NPWAVEOUTCAPS, FAR *LPWAVEOUTCAPS;
  641. #endif
  642.  
  643. /* flags for dwSupport field of WAVEOUTCAPS */
  644. #define WAVECAPS_PITCH          0x0001   /* supports pitch control */
  645. #define WAVECAPS_PLAYBACKRATE   0x0002   /* supports playback rate control */
  646. #define WAVECAPS_VOLUME         0x0004   /* supports volume control */
  647. #define WAVECAPS_LRVOLUME       0x0008   /* separate left-right volume control */
  648. #define WAVECAPS_SYNC           0x0010
  649. #define WAVECAPS_SAMPLEACCURATE 0x0020
  650. #define WAVECAPS_DIRECTSOUND    0x0040
  651.  
  652. /* waveform input device capabilities structure */
  653. #ifdef _WIN32
  654.  
  655. #ifndef UNICODE_ONLY
  656. typedef struct tagWAVEINCAPSA {
  657.     WORD    wMid;                    /* manufacturer ID */
  658.     WORD    wPid;                    /* product ID */
  659.     MMVERSION vDriverVersion;        /* version of the driver */
  660.     CHAR    szPname[MAXPNAMELEN];    /* product name (NULL terminated string) */
  661.     DWORD   dwFormats;               /* formats supported */
  662.     WORD    wChannels;               /* number of channels supported */
  663.     WORD    wReserved1;              /* structure packing */
  664. } WAVEINCAPSA, *PWAVEINCAPSA, *NPWAVEINCAPSA, *LPWAVEINCAPSA;
  665. #endif //!UNICODE_ONLY
  666. #ifndef ANSI_ONLY
  667. typedef struct tagWAVEINCAPSW {
  668.     WORD    wMid;                    /* manufacturer ID */
  669.     WORD    wPid;                    /* product ID */
  670.     MMVERSION vDriverVersion;        /* version of the driver */
  671.     WCHAR   szPname[MAXPNAMELEN];    /* product name (NULL terminated string) */
  672.     DWORD   dwFormats;               /* formats supported */
  673.     WORD    wChannels;               /* number of channels supported */
  674.     WORD    wReserved1;              /* structure packing */
  675. } WAVEINCAPSW, *PWAVEINCAPSW, *NPWAVEINCAPSW, *LPWAVEINCAPSW;
  676. #endif //!ANSI_ONLY
  677. #ifdef UNICODE
  678. typedef WAVEINCAPSW WAVEINCAPS;
  679. typedef PWAVEINCAPSW PWAVEINCAPS;
  680. typedef NPWAVEINCAPSW NPWAVEINCAPS;
  681. typedef LPWAVEINCAPSW LPWAVEINCAPS;
  682. #else
  683. typedef WAVEINCAPSA WAVEINCAPS;
  684. typedef PWAVEINCAPSA PWAVEINCAPS;
  685. typedef NPWAVEINCAPSA NPWAVEINCAPS;
  686. typedef LPWAVEINCAPSA LPWAVEINCAPS;
  687. #endif // UNICODE
  688.  
  689. #else
  690. typedef struct waveincaps_tag {
  691.     WORD    wMid;                    /* manufacturer ID */
  692.     WORD    wPid;                    /* product ID */
  693.     VERSION vDriverVersion;          /* version of the driver */
  694.     char    szPname[MAXPNAMELEN];    /* product name (NULL terminated string) */
  695.     DWORD   dwFormats;               /* formats supported */
  696.     WORD    wChannels;               /* number of channels supported */
  697. } WAVEINCAPS, *PWAVEINCAPS, NEAR *NPWAVEINCAPS, FAR *LPWAVEINCAPS;
  698. #endif
  699.  
  700. /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */
  701. #define WAVE_INVALIDFORMAT     0x00000000       /* invalid format */
  702. #define WAVE_FORMAT_1M08       0x00000001       /* 11.025 kHz, Mono,   8-bit  */
  703. #define WAVE_FORMAT_1S08       0x00000002       /* 11.025 kHz, Stereo, 8-bit  */
  704. #define WAVE_FORMAT_1M16       0x00000004       /* 11.025 kHz, Mono,   16-bit */
  705. #define WAVE_FORMAT_1S16       0x00000008       /* 11.025 kHz, Stereo, 16-bit */
  706. #define WAVE_FORMAT_2M08       0x00000010       /* 22.05  kHz, Mono,   8-bit  */
  707. #define WAVE_FORMAT_2S08       0x00000020       /* 22.05  kHz, Stereo, 8-bit  */
  708. #define WAVE_FORMAT_2M16       0x00000040       /* 22.05  kHz, Mono,   16-bit */
  709. #define WAVE_FORMAT_2S16       0x00000080       /* 22.05  kHz, Stereo, 16-bit */
  710. #define WAVE_FORMAT_4M08       0x00000100       /* 44.1   kHz, Mono,   8-bit  */
  711. #define WAVE_FORMAT_4S08       0x00000200       /* 44.1   kHz, Stereo, 8-bit  */
  712. #define WAVE_FORMAT_4M16       0x00000400       /* 44.1   kHz, Mono,   16-bit */
  713. #define WAVE_FORMAT_4S16       0x00000800       /* 44.1   kHz, Stereo, 16-bit */
  714.  
  715. /* OLD general waveform format structure (information common to all formats) */
  716. typedef struct waveformat_tag {
  717.     WORD    wFormatTag;        /* format type */
  718.     WORD    nChannels;         /* number of channels (i.e. mono, stereo, etc.) */
  719.     DWORD   nSamplesPerSec;    /* sample rate */
  720.     DWORD   nAvgBytesPerSec;   /* for buffer estimation */
  721.     WORD    nBlockAlign;       /* block size of data */
  722. } WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT;
  723.  
  724. /* flags for wFormatTag field of WAVEFORMAT */
  725. #define WAVE_FORMAT_PCM     1
  726.  
  727. /* specific waveform format structure for PCM data */
  728. typedef struct pcmwaveformat_tag {
  729.     WAVEFORMAT  wf;
  730.     WORD        wBitsPerSample;
  731. } PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT;
  732.  
  733. #ifndef _WAVEFORMATEX_
  734. #define _WAVEFORMATEX_
  735.  
  736. /*
  737.  *  extended waveform format structure used for all non-PCM formats. this
  738.  *  structure is common to all non-PCM formats.
  739.  */
  740. typedef struct tWAVEFORMATEX
  741. {
  742.     WORD        wFormatTag;         /* format type */
  743.     WORD        nChannels;          /* number of channels (i.e. mono, stereo...) */
  744.     DWORD       nSamplesPerSec;     /* sample rate */
  745.     DWORD       nAvgBytesPerSec;    /* for buffer estimation */
  746.     WORD        nBlockAlign;        /* block size of data */
  747.     WORD        wBitsPerSample;     /* number of bits per sample of mono data */
  748.     WORD        cbSize;             /* the count in bytes of the size of */
  749.                     /* extra information (after cbSize) */
  750. } WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX;
  751. typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;
  752.  
  753. #endif /* _WAVEFORMATEX_ */
  754.  
  755. #ifndef _WIN32_VXD
  756. /* waveform audio function prototypes */
  757. WINMMAPI UINT WINAPI waveOutGetNumDevs(void);
  758.  
  759. #ifdef _WIN32
  760.  
  761. #ifndef UNICODE_ONLY
  762. WINMMAPI MMRESULT WINAPI waveOutGetDevCapsA(UINT uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
  763. #endif //!UNICODE_ONLY
  764. #ifndef ANSI_ONLY
  765. WINMMAPI MMRESULT WINAPI waveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc);
  766. #endif //!ANSI_ONLY
  767. #ifdef UNICODE
  768. #define waveOutGetDevCaps  waveOutGetDevCapsW
  769. #else
  770. #define waveOutGetDevCaps  waveOutGetDevCapsA
  771. #endif // !UNICODE
  772.  
  773. #else
  774. WINMMAPI MMRESULT WINAPI waveOutGetDevCaps(UINT uDeviceID, LPWAVEOUTCAPS pwoc, UINT cbwoc);
  775. #endif
  776.  
  777. #if (WINVER >= 0x0400)
  778. WINMMAPI MMRESULT WINAPI waveOutGetVolume(HWAVEOUT hwo, LPDWORD pdwVolume);
  779. WINMMAPI MMRESULT WINAPI waveOutSetVolume(HWAVEOUT hwo, DWORD dwVolume);
  780. #else
  781. WINMMAPI MMRESULT WINAPI waveOutGetVolume(UINT uId, LPDWORD pdwVolume);
  782. WINMMAPI MMRESULT WINAPI waveOutSetVolume(UINT uId, DWORD dwVolume);
  783. #endif
  784.  
  785. #ifdef _WIN32
  786.  
  787. #ifndef UNICODE_ONLY
  788. WINMMAPI MMRESULT WINAPI waveOutGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  789. #endif //!UNICODE_ONLY
  790. #ifndef ANSI_ONLY
  791. WINMMAPI MMRESULT WINAPI waveOutGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  792. #endif //!ANSI_ONLY
  793. #ifdef UNICODE
  794. #define waveOutGetErrorText  waveOutGetErrorTextW
  795. #else
  796. #define waveOutGetErrorText  waveOutGetErrorTextA
  797. #endif // !UNICODE
  798.  
  799. #else
  800. MMRESULT WINAPI waveOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  801. #endif
  802.  
  803. WINMMAPI MMRESULT WINAPI waveOutOpen(LPHWAVEOUT phwo, UINT uDeviceID,
  804.     LPCWAVEFORMATEX pwfx, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  805.  
  806. WINMMAPI MMRESULT WINAPI waveOutClose(HWAVEOUT hwo);
  807. WINMMAPI MMRESULT WINAPI waveOutPrepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  808. WINMMAPI MMRESULT WINAPI waveOutUnprepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  809. WINMMAPI MMRESULT WINAPI waveOutWrite(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  810. WINMMAPI MMRESULT WINAPI waveOutPause(HWAVEOUT hwo);
  811. WINMMAPI MMRESULT WINAPI waveOutRestart(HWAVEOUT hwo);
  812. WINMMAPI MMRESULT WINAPI waveOutReset(HWAVEOUT hwo);
  813. WINMMAPI MMRESULT WINAPI waveOutBreakLoop(HWAVEOUT hwo);
  814. WINMMAPI MMRESULT WINAPI waveOutGetPosition(HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt);
  815. WINMMAPI MMRESULT WINAPI waveOutGetPitch(HWAVEOUT hwo, LPDWORD pdwPitch);
  816. WINMMAPI MMRESULT WINAPI waveOutSetPitch(HWAVEOUT hwo, DWORD dwPitch);
  817. WINMMAPI MMRESULT WINAPI waveOutGetPlaybackRate(HWAVEOUT hwo, LPDWORD pdwRate);
  818. WINMMAPI MMRESULT WINAPI waveOutSetPlaybackRate(HWAVEOUT hwo, DWORD dwRate);
  819. WINMMAPI MMRESULT WINAPI waveOutGetID(HWAVEOUT hwo, LPUINT puDeviceID);
  820.  
  821. #if (WINVER >= 0x030a)
  822. #ifdef _WIN32
  823. WINMMAPI MMRESULT WINAPI waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
  824. #else
  825. DWORD WINAPI waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
  826. #endif
  827. #endif /* ifdef WINVER >= 0x030a */
  828.  
  829. WINMMAPI UINT WINAPI waveInGetNumDevs(void);
  830.  
  831. #ifdef _WIN32
  832.  
  833. #ifndef UNICODE_ONLY
  834. WINMMAPI MMRESULT WINAPI waveInGetDevCapsA(UINT uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
  835. #endif //!UNICODE_ONLY
  836. #ifndef ANSI_ONLY
  837. WINMMAPI MMRESULT WINAPI waveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic);
  838. #endif //!ANSI_ONLY
  839. #ifdef UNICODE
  840. #define waveInGetDevCaps  waveInGetDevCapsW
  841. #else
  842. #define waveInGetDevCaps  waveInGetDevCapsA
  843. #endif // !UNICODE
  844.  
  845. #else
  846. MMRESULT WINAPI waveInGetDevCaps(UINT uDeviceID, LPWAVEINCAPS pwic, UINT cbwic);
  847. #endif
  848.  
  849. #ifdef _WIN32
  850.  
  851. #ifndef UNICODE_ONLY
  852. WINMMAPI MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  853. #endif //!UNICODE_ONLY
  854. #ifndef ANSI_ONLY
  855. WINMMAPI MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  856. #endif //!ANSI_ONLY
  857. #ifdef UNICODE
  858. #define waveInGetErrorText  waveInGetErrorTextW
  859. #else
  860. #define waveInGetErrorText  waveInGetErrorTextA
  861. #endif // !UNICODE
  862.  
  863. #else
  864. MMRESULT WINAPI waveInGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  865. #endif
  866.  
  867. WINMMAPI MMRESULT WINAPI waveInOpen(LPHWAVEIN phwi, UINT uDeviceID,
  868.     LPCWAVEFORMATEX pwfx, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  869.  
  870. WINMMAPI MMRESULT WINAPI waveInClose(HWAVEIN hwi);
  871. WINMMAPI MMRESULT WINAPI waveInPrepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  872. WINMMAPI MMRESULT WINAPI waveInUnprepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  873. WINMMAPI MMRESULT WINAPI waveInAddBuffer(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  874. WINMMAPI MMRESULT WINAPI waveInStart(HWAVEIN hwi);
  875. WINMMAPI MMRESULT WINAPI waveInStop(HWAVEIN hwi);
  876. WINMMAPI MMRESULT WINAPI waveInReset(HWAVEIN hwi);
  877. WINMMAPI MMRESULT WINAPI waveInGetPosition(HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt);
  878. WINMMAPI MMRESULT WINAPI waveInGetID(HWAVEIN hwi, LPUINT puDeviceID);
  879.  
  880. #if (WINVER >= 0x030a)
  881. #ifdef _WIN32
  882. WINMMAPI MMRESULT WINAPI waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
  883. #else
  884. DWORD WINAPI waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
  885. #endif
  886. #endif /* ifdef WINVER >= 0x030a */
  887.  
  888. #endif /* ifndef _WIN32_VXD */
  889.  
  890. #endif  /* ifndef MMNOWAVE */
  891.  
  892. #ifndef MMNOMIDI
  893. /****************************************************************************
  894.  
  895.                 MIDI audio support
  896.  
  897. ****************************************************************************/
  898.  
  899. /* MIDI error return values */
  900. #define MIDIERR_UNPREPARED    (MIDIERR_BASE + 0)   /* header not prepared */
  901. #define MIDIERR_STILLPLAYING  (MIDIERR_BASE + 1)   /* still something playing */
  902. #define MIDIERR_NOMAP         (MIDIERR_BASE + 2)   /* no configured instruments */
  903. #define MIDIERR_NOTREADY      (MIDIERR_BASE + 3)   /* hardware is still busy */
  904. #define MIDIERR_NODEVICE      (MIDIERR_BASE + 4)   /* port no longer connected */
  905. #define MIDIERR_INVALIDSETUP  (MIDIERR_BASE + 5)   /* invalid MIF */
  906. #define MIDIERR_BADOPENMODE   (MIDIERR_BASE + 6)   /* operation unsupported w/ open mode */
  907. #define MIDIERR_DONT_CONTINUE (MIDIERR_BASE + 7)   /* thru device 'eating' a message */
  908. #define MIDIERR_LASTERROR     (MIDIERR_BASE + 7)   /* last error in range */
  909.  
  910. /* MIDI audio data types */
  911. DECLARE_HANDLE(HMIDI);
  912. DECLARE_HANDLE(HMIDIIN);
  913. DECLARE_HANDLE(HMIDIOUT);
  914. DECLARE_HANDLE(HMIDISTRM);
  915. #ifndef _WIN32_VXD
  916. typedef HMIDI FAR *LPHMIDI;
  917. typedef HMIDIIN FAR *LPHMIDIIN;
  918. typedef HMIDIOUT FAR *LPHMIDIOUT;
  919. typedef HMIDISTRM FAR *LPHMIDISTRM;
  920. typedef DRVCALLBACK MIDICALLBACK;
  921. typedef MIDICALLBACK FAR *LPMIDICALLBACK;
  922. #define MIDIPATCHSIZE   128
  923. typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  924. typedef WORD FAR *LPPATCHARRAY;
  925. typedef WORD KEYARRAY[MIDIPATCHSIZE];
  926. typedef WORD FAR *LPKEYARRAY;
  927. #endif  /* ifndef _WIN32_VXD */
  928.  
  929. /* MIDI callback messages */
  930. #define MIM_OPEN        MM_MIM_OPEN
  931. #define MIM_CLOSE       MM_MIM_CLOSE
  932. #define MIM_DATA        MM_MIM_DATA
  933. #define MIM_LONGDATA    MM_MIM_LONGDATA
  934. #define MIM_ERROR       MM_MIM_ERROR
  935. #define MIM_LONGERROR   MM_MIM_LONGERROR
  936. #define MOM_OPEN        MM_MOM_OPEN
  937. #define MOM_CLOSE       MM_MOM_CLOSE
  938. #define MOM_DONE        MM_MOM_DONE
  939.  
  940. #if(WINVER >= 0x0400)
  941. #define MIM_MOREDATA      MM_MIM_MOREDATA
  942. #define MOM_POSITIONCB    MM_MOM_POSITIONCB
  943. #endif /* WINVER >= 0x0400 */
  944.  
  945. /* device ID for MIDI mapper */
  946. #define MIDIMAPPER     ((UINT)-1)
  947. #define MIDI_MAPPER    ((UINT)-1)
  948.  
  949. #if(WINVER >= 0x0400)
  950. /* flags for dwFlags parm of midiInOpen() */
  951. #define MIDI_IO_STATUS      0x00000020L
  952. #endif /* WINVER >= 0x0400 */
  953.  
  954. /* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */
  955. #define MIDI_CACHE_ALL      1
  956. #define MIDI_CACHE_BESTFIT  2
  957. #define MIDI_CACHE_QUERY    3
  958. #define MIDI_UNCACHE        4
  959.  
  960. /* MIDI output device capabilities structure */
  961. #ifdef _WIN32
  962.  
  963. #ifndef UNICODE_ONLY
  964. typedef struct tagMIDIOUTCAPSA {
  965.     WORD    wMid;                  /* manufacturer ID */
  966.     WORD    wPid;                  /* product ID */
  967.     MMVERSION vDriverVersion;      /* version of the driver */
  968.     CHAR    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  969.     WORD    wTechnology;           /* type of device */
  970.     WORD    wVoices;               /* # of voices (internal synth only) */
  971.     WORD    wNotes;                /* max # of notes (internal synth only) */
  972.     WORD    wChannelMask;          /* channels used (internal synth only) */
  973.     DWORD   dwSupport;             /* functionality supported by driver */
  974. } MIDIOUTCAPSA, *PMIDIOUTCAPSA, *NPMIDIOUTCAPSA, *LPMIDIOUTCAPSA;
  975. #endif //!UNICODE_ONLY
  976. #ifndef ANSI_ONLY
  977. typedef struct tagMIDIOUTCAPSW {
  978.     WORD    wMid;                  /* manufacturer ID */
  979.     WORD    wPid;                  /* product ID */
  980.     MMVERSION vDriverVersion;      /* version of the driver */
  981.     WCHAR   szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  982.     WORD    wTechnology;           /* type of device */
  983.     WORD    wVoices;               /* # of voices (internal synth only) */
  984.     WORD    wNotes;                /* max # of notes (internal synth only) */
  985.     WORD    wChannelMask;          /* channels used (internal synth only) */
  986.     DWORD   dwSupport;             /* functionality supported by driver */
  987. } MIDIOUTCAPSW, *PMIDIOUTCAPSW, *NPMIDIOUTCAPSW, *LPMIDIOUTCAPSW;
  988. #endif //!ANSI_ONLY
  989. #ifdef UNICODE
  990. typedef MIDIOUTCAPSW MIDIOUTCAPS;
  991. typedef PMIDIOUTCAPSW PMIDIOUTCAPS;
  992. typedef NPMIDIOUTCAPSW NPMIDIOUTCAPS;
  993. typedef LPMIDIOUTCAPSW LPMIDIOUTCAPS;
  994. #else
  995. typedef MIDIOUTCAPSA MIDIOUTCAPS;
  996. typedef PMIDIOUTCAPSA PMIDIOUTCAPS;
  997. typedef NPMIDIOUTCAPSA NPMIDIOUTCAPS;
  998. typedef LPMIDIOUTCAPSA LPMIDIOUTCAPS;
  999. #endif // UNICODE
  1000.  
  1001. #else
  1002. typedef struct midioutcaps_tag {
  1003.     WORD    wMid;                  /* manufacturer ID */
  1004.     WORD    wPid;                  /* product ID */
  1005.     VERSION vDriverVersion;        /* version of the driver */
  1006.     char    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  1007.     WORD    wTechnology;           /* type of device */
  1008.     WORD    wVoices;               /* # of voices (internal synth only) */
  1009.     WORD    wNotes;                /* max # of notes (internal synth only) */
  1010.     WORD    wChannelMask;          /* channels used (internal synth only) */
  1011.     DWORD   dwSupport;             /* functionality supported by driver */
  1012. } MIDIOUTCAPS, *PMIDIOUTCAPS, NEAR *NPMIDIOUTCAPS, FAR *LPMIDIOUTCAPS;
  1013. #endif
  1014.  
  1015. /* flags for wTechnology field of MIDIOUTCAPS structure */
  1016. #define MOD_MIDIPORT    1  /* output port */
  1017. #define MOD_SYNTH       2  /* generic internal synth */
  1018. #define MOD_SQSYNTH     3  /* square wave internal synth */
  1019. #define MOD_FMSYNTH     4  /* FM internal synth */
  1020. #define MOD_MAPPER      5  /* MIDI mapper */
  1021.  
  1022. /* flags for dwSupport field of MIDIOUTCAPS structure */
  1023. #define MIDICAPS_VOLUME          0x0001  /* supports volume control */
  1024. #define MIDICAPS_LRVOLUME        0x0002  /* separate left-right volume control */
  1025. #define MIDICAPS_CACHE           0x0004
  1026. #if(WINVER >= 0x0400)
  1027. #define MIDICAPS_STREAM          0x0008  /* driver supports midiStreamOut directly */
  1028. #endif /* WINVER >= 0x0400 */
  1029.  
  1030. /* MIDI input device capabilities structure */
  1031. #ifdef _WIN32
  1032.  
  1033. #ifndef UNICODE_ONLY
  1034. typedef struct tagMIDIINCAPSA {
  1035.     WORD        wMid;                   /* manufacturer ID */
  1036.     WORD        wPid;                   /* product ID */
  1037.     MMVERSION   vDriverVersion;         /* version of the driver */
  1038.     CHAR        szPname[MAXPNAMELEN];   /* product name (NULL terminated string) */
  1039. #if (WINVER >= 0x0400)
  1040.     DWORD   dwSupport;             /* functionality supported by driver */
  1041. #endif
  1042. } MIDIINCAPSA, *PMIDIINCAPSA, *NPMIDIINCAPSA, *LPMIDIINCAPSA;
  1043. #endif //!UNICODE_ONLY
  1044. #ifndef ANSI_ONLY
  1045. typedef struct tagMIDIINCAPSW {
  1046.     WORD        wMid;                   /* manufacturer ID */
  1047.     WORD        wPid;                   /* product ID */
  1048.     MMVERSION   vDriverVersion;         /* version of the driver */
  1049.     WCHAR       szPname[MAXPNAMELEN];   /* product name (NULL terminated string) */
  1050. #if (WINVER >= 0x0400)
  1051.     DWORD   dwSupport;             /* functionality supported by driver */
  1052. #endif
  1053. } MIDIINCAPSW, *PMIDIINCAPSW, *NPMIDIINCAPSW, *LPMIDIINCAPSW;
  1054. #endif //!ANSI_ONLY
  1055. #ifdef UNICODE
  1056. typedef MIDIINCAPSW MIDIINCAPS;
  1057. typedef PMIDIINCAPSW PMIDIINCAPS;
  1058. typedef NPMIDIINCAPSW NPMIDIINCAPS;
  1059. typedef LPMIDIINCAPSW LPMIDIINCAPS;
  1060. #else
  1061. typedef MIDIINCAPSA MIDIINCAPS;
  1062. typedef PMIDIINCAPSA PMIDIINCAPS;
  1063. typedef NPMIDIINCAPSA NPMIDIINCAPS;
  1064. typedef LPMIDIINCAPSA LPMIDIINCAPS;
  1065. #endif // UNICODE
  1066.  
  1067. #else
  1068. typedef struct midiincaps_tag {
  1069.     WORD    wMid;                  /* manufacturer ID */
  1070.     WORD    wPid;                  /* product ID */
  1071.     VERSION vDriverVersion;        /* version of the driver */
  1072.     char    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  1073. #if (WINVER >= 0x0400)
  1074.     DWORD   dwSupport;             /* functionality supported by driver */
  1075. #endif
  1076. } MIDIINCAPS, *PMIDIINCAPS, NEAR *NPMIDIINCAPS, FAR *LPMIDIINCAPS;
  1077. #endif
  1078.  
  1079. /* MIDI data block header */
  1080. typedef struct midihdr_tag {
  1081.     LPSTR       lpData;               /* pointer to locked data block */
  1082.     DWORD       dwBufferLength;       /* length of data in data block */
  1083.     DWORD       dwBytesRecorded;      /* used for input only */
  1084.     DWORD       dwUser;               /* for client's use */
  1085.     DWORD       dwFlags;              /* assorted flags (see defines) */
  1086.     struct midihdr_tag FAR *lpNext;   /* reserved for driver */
  1087.     DWORD       reserved;             /* reserved for driver */
  1088. #if (WINVER >= 0x0400)
  1089.     DWORD       dwOffset;             /* Callback offset into buffer */
  1090.     DWORD       dwReserved[8];        /* Reserved for MMSYSTEM */
  1091. #endif
  1092. } MIDIHDR, *PMIDIHDR, NEAR *NPMIDIHDR, FAR *LPMIDIHDR;
  1093.  
  1094. #if(WINVER >= 0x0400)
  1095. typedef struct midievent_tag
  1096. {
  1097.     DWORD       dwDeltaTime;          /* Ticks since last event */
  1098.     DWORD       dwStreamID;           /* Reserved; must be zero */
  1099.     DWORD       dwEvent;              /* Event type and parameters */
  1100.     DWORD       dwParms[1];           /* Parameters if this is a long event */
  1101. } MIDIEVENT;
  1102.  
  1103. typedef struct midistrmbuffver_tag
  1104. {
  1105.     DWORD       dwVersion;                  /* Stream buffer format version */
  1106.     DWORD       dwMid;                      /* Manufacturer ID as defined in MMREG.H */
  1107.     DWORD       dwOEMVersion;               /* Manufacturer version for custom ext */
  1108. } MIDISTRMBUFFVER;
  1109. #endif /* WINVER >= 0x0400 */
  1110.  
  1111. /* flags for dwFlags field of MIDIHDR structure */
  1112. #define MHDR_DONE       0x00000001       /* done bit */
  1113. #define MHDR_PREPARED   0x00000002       /* set if header prepared */
  1114. #define MHDR_INQUEUE    0x00000004       /* reserved for driver */
  1115. #define MHDR_ISSTRM     0x00000008       /* Buffer is stream buffer */
  1116.  
  1117. #if(WINVER >= 0x0400)
  1118. /* */
  1119. /* Type codes which go in the high byte of the event DWORD of a stream buffer */
  1120. /* */
  1121. /* Type codes 00-7F contain parameters within the low 24 bits */
  1122. /* Type codes 80-FF contain a length of their parameter in the low 24 */
  1123. /* bits, followed by their parameter data in the buffer. The event */
  1124. /* DWORD contains the exact byte length; the parm data itself must be */
  1125. /* padded to be an even multiple of 4 bytes long. */
  1126. /* */
  1127.  
  1128. #define MEVT_F_SHORT        0x00000000L
  1129. #define MEVT_F_LONG         0x80000000L
  1130. #define MEVT_F_CALLBACK     0x40000000L
  1131.  
  1132. #define MEVT_EVENTTYPE(x)   ((BYTE)(((x)>>24)&0xFF))
  1133. #define MEVT_EVENTPARM(x)   ((DWORD)((x)&0x00FFFFFFL))
  1134.  
  1135. #define MEVT_SHORTMSG       ((BYTE)0x00)    /* parm = shortmsg for midiOutShortMsg */
  1136. #define MEVT_TEMPO          ((BYTE)0x01)    /* parm = new tempo in microsec/qn     */
  1137. #define MEVT_NOP            ((BYTE)0x02)    /* parm = unused; does nothing         */
  1138.  
  1139. /* 0x04-0x7F reserved */
  1140.  
  1141. #define MEVT_LONGMSG        ((BYTE)0x80)    /* parm = bytes to send verbatim       */
  1142. #define MEVT_COMMENT        ((BYTE)0x82)    /* parm = comment data                 */
  1143. #define MEVT_VERSION        ((BYTE)0x84)    /* parm = MIDISTRMBUFFVER struct       */
  1144.  
  1145. /* 0x81-0xFF reserved */
  1146.  
  1147. #define MIDISTRM_ERROR      (-2)
  1148.  
  1149. /* */
  1150. /* Structures and defines for midiStreamProperty */
  1151. /* */
  1152. #define MIDIPROP_SET        0x80000000L
  1153. #define MIDIPROP_GET        0x40000000L
  1154.  
  1155. /* These are intentionally both non-zero so the app cannot accidentally */
  1156. /* leave the operation off and happen to appear to work due to default */
  1157. /* action. */
  1158.  
  1159. #define MIDIPROP_TIMEDIV    0x00000001L
  1160. #define MIDIPROP_TEMPO      0x00000002L
  1161.  
  1162. typedef struct midiproptimediv_tag
  1163. {
  1164.     DWORD       cbStruct;
  1165.     DWORD       dwTimeDiv;
  1166. } MIDIPROPTIMEDIV, FAR *LPMIDIPROPTIMEDIV;
  1167.  
  1168. typedef struct midiproptempo_tag
  1169. {
  1170.     DWORD       cbStruct;
  1171.     DWORD       dwTempo;
  1172. } MIDIPROPTEMPO, FAR *LPMIDIPROPTEMPO;
  1173.  
  1174. #endif /* WINVER >= 0x0400 */
  1175.  
  1176. #ifndef _WIN32_VXD
  1177.  
  1178. /* MIDI function prototypes */
  1179. WINMMAPI UINT WINAPI midiOutGetNumDevs(void);
  1180. #if(WINVER >= 0x0400)
  1181. WINMMAPI MMRESULT WINAPI midiStreamOpen(LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1182. WINMMAPI MMRESULT WINAPI midiStreamClose(HMIDISTRM hms);
  1183.  
  1184. WINMMAPI MMRESULT WINAPI midiStreamProperty(HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty);
  1185. WINMMAPI MMRESULT WINAPI midiStreamPosition(HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
  1186.  
  1187. WINMMAPI MMRESULT WINAPI midiStreamOut(HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh);
  1188. WINMMAPI MMRESULT WINAPI midiStreamPause(HMIDISTRM hms);
  1189. WINMMAPI MMRESULT WINAPI midiStreamRestart(HMIDISTRM hms);
  1190. WINMMAPI MMRESULT WINAPI midiStreamStop(HMIDISTRM hms);
  1191.  
  1192. #ifdef _WIN32
  1193. WINMMAPI MMRESULT WINAPI midiConnect(HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  1194. WINMMAPI MMRESULT WINAPI midiDisconnect(HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  1195. #endif
  1196. #endif /* WINVER >= 0x0400 */
  1197.  
  1198. #ifdef _WIN32
  1199.  
  1200. #ifndef UNICODE_ONLY
  1201. WINMMAPI MMRESULT WINAPI midiOutGetDevCapsA(UINT uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc);
  1202. #endif //!UNICODE_ONLY
  1203. #ifndef ANSI_ONLY
  1204. WINMMAPI MMRESULT WINAPI midiOutGetDevCapsW(UINT uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc);
  1205. #endif //!ANSI_ONLY
  1206. #ifdef UNICODE
  1207. #define midiOutGetDevCaps  midiOutGetDevCapsW
  1208. #else
  1209. #define midiOutGetDevCaps  midiOutGetDevCapsA
  1210. #endif // !UNICODE
  1211.  
  1212. #else
  1213. MMRESULT WINAPI midiOutGetDevCaps(UINT uDeviceID, LPMIDIOUTCAPS pmoc, UINT cbmoc);
  1214. #endif
  1215.  
  1216. #if (WINVER >= 0x0400)
  1217. WINMMAPI MMRESULT WINAPI midiOutGetVolume(HMIDIOUT hmo, LPDWORD pdwVolume);
  1218. WINMMAPI MMRESULT WINAPI midiOutSetVolume(HMIDIOUT hmo, DWORD dwVolume);
  1219. #else
  1220. WINMMAPI MMRESULT WINAPI midiOutGetVolume(UINT uId, LPDWORD pdwVolume);
  1221. WINMMAPI MMRESULT WINAPI midiOutSetVolume(UINT uId, DWORD dwVolume);
  1222. #endif
  1223.  
  1224. #ifdef _WIN32
  1225.  
  1226. #ifndef UNICODE_ONLY
  1227. WINMMAPI MMRESULT WINAPI midiOutGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1228. #endif //!UNICODE_ONLY
  1229. #ifndef ANSI_ONLY
  1230. WINMMAPI MMRESULT WINAPI midiOutGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  1231. #endif //!ANSI_ONLY
  1232. #ifdef UNICODE
  1233. #define midiOutGetErrorText  midiOutGetErrorTextW
  1234. #else
  1235. #define midiOutGetErrorText  midiOutGetErrorTextA
  1236. #endif // !UNICODE
  1237.  
  1238. #else
  1239. WINMMAPI MMRESULT WINAPI midiOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1240. #endif
  1241.  
  1242. WINMMAPI MMRESULT WINAPI midiOutOpen(LPHMIDIOUT phmo, UINT uDeviceID,
  1243.     DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1244. WINMMAPI MMRESULT WINAPI midiOutClose(HMIDIOUT hmo);
  1245. WINMMAPI MMRESULT WINAPI midiOutPrepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1246. WINMMAPI MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1247. WINMMAPI MMRESULT WINAPI midiOutShortMsg(HMIDIOUT hmo, DWORD dwMsg);
  1248. WINMMAPI MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1249. WINMMAPI MMRESULT WINAPI midiOutReset(HMIDIOUT hmo);
  1250. WINMMAPI MMRESULT WINAPI midiOutCachePatches(HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache);
  1251. WINMMAPI MMRESULT WINAPI midiOutCacheDrumPatches(HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache);
  1252. WINMMAPI MMRESULT WINAPI midiOutGetID(HMIDIOUT hmo, LPUINT puDeviceID);
  1253.  
  1254. #if (WINVER >= 0x030a)
  1255. #ifdef _WIN32
  1256. WINMMAPI MMRESULT WINAPI midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
  1257. #else
  1258. DWORD WINAPI midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
  1259. #endif
  1260. #endif /* ifdef WINVER >= 0x030a */
  1261.  
  1262. WINMMAPI UINT WINAPI midiInGetNumDevs(void);
  1263.  
  1264. #ifdef _WIN32
  1265.  
  1266. #ifndef UNICODE_ONLY
  1267. WINMMAPI MMRESULT WINAPI midiInGetDevCapsA(UINT uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic);
  1268. #endif //!UNICODE_ONLY
  1269. #ifndef ANSI_ONLY
  1270. WINMMAPI MMRESULT WINAPI midiInGetDevCapsW(UINT uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic);
  1271. #endif //!ANSI_ONLY
  1272. #ifdef UNICODE
  1273. #define midiInGetDevCaps  midiInGetDevCapsW
  1274. #else
  1275. #define midiInGetDevCaps  midiInGetDevCapsA
  1276. #endif // !UNICODE
  1277. #ifndef UNICODE_ONLY
  1278. WINMMAPI MMRESULT WINAPI midiInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1279. #endif //!UNICODE_ONLY
  1280. #ifndef ANSI_ONLY
  1281. WINMMAPI MMRESULT WINAPI midiInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  1282. #endif //!ANSI_ONLY
  1283. #ifdef UNICODE
  1284. #define midiInGetErrorText  midiInGetErrorTextW
  1285. #else
  1286. #define midiInGetErrorText  midiInGetErrorTextA
  1287. #endif // !UNICODE
  1288.  
  1289. #else
  1290. MMRESULT WINAPI midiInGetDevCaps(UINT uDeviceID, LPMIDIINCAPS pmic, UINT cbmic);
  1291. WINMMAPI MMRESULT WINAPI midiInGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1292. #endif
  1293.  
  1294. WINMMAPI MMRESULT WINAPI midiInOpen(LPHMIDIIN phmi, UINT uDeviceID,
  1295.     DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1296. WINMMAPI MMRESULT WINAPI midiInClose(HMIDIIN hmi);
  1297. WINMMAPI MMRESULT WINAPI midiInPrepareHeader(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1298. WINMMAPI MMRESULT WINAPI midiInUnprepareHeader(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1299. WINMMAPI MMRESULT WINAPI midiInAddBuffer(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1300. WINMMAPI MMRESULT WINAPI midiInStart(HMIDIIN hmi);
  1301. WINMMAPI MMRESULT WINAPI midiInStop(HMIDIIN hmi);
  1302. WINMMAPI MMRESULT WINAPI midiInReset(HMIDIIN hmi);
  1303. WINMMAPI MMRESULT WINAPI midiInGetID(HMIDIIN hmi, LPUINT puDeviceID);
  1304.  
  1305. #if (WINVER >= 0x030a)
  1306. #ifdef _WIN32
  1307. WINMMAPI MMRESULT WINAPI midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
  1308. #else
  1309. DWORD WINAPI midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
  1310. #endif
  1311. #endif /* ifdef WINVER >= 0x030a */
  1312.  
  1313. #endif /* ifndef _WIN32_VXD */
  1314.  
  1315. #endif  /* ifndef MMNOMIDI */
  1316.  
  1317. #ifndef MMNOAUX
  1318. /****************************************************************************
  1319.  
  1320.             Auxiliary audio support
  1321.  
  1322. ****************************************************************************/
  1323.  
  1324. /* device ID for aux device mapper */
  1325. #define AUX_MAPPER     ((UINT)-1)
  1326.  
  1327. /* Auxiliary audio device capabilities structure */
  1328. #ifdef _WIN32
  1329.  
  1330. #ifndef UNICODE_ONLY
  1331. typedef struct tagAUXCAPSA {
  1332.     WORD        wMid;                /* manufacturer ID */
  1333.     WORD        wPid;                /* product ID */
  1334.     MMVERSION   vDriverVersion;      /* version of the driver */
  1335.     CHAR        szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1336.     WORD        wTechnology;         /* type of device */
  1337.     WORD        wReserved1;          /* padding */
  1338.     DWORD       dwSupport;           /* functionality supported by driver */
  1339. } AUXCAPSA, *PAUXCAPSA, *NPAUXCAPSA, *LPAUXCAPSA;
  1340. #endif //!UNICODE_ONLY
  1341. #ifndef ANSI_ONLY
  1342. typedef struct tagAUXCAPSW {
  1343.     WORD        wMid;                /* manufacturer ID */
  1344.     WORD        wPid;                /* product ID */
  1345.     MMVERSION   vDriverVersion;      /* version of the driver */
  1346.     WCHAR       szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1347.     WORD        wTechnology;         /* type of device */
  1348.     WORD        wReserved1;          /* padding */
  1349.     DWORD       dwSupport;           /* functionality supported by driver */
  1350. } AUXCAPSW, *PAUXCAPSW, *NPAUXCAPSW, *LPAUXCAPSW;
  1351. #endif //!ANSI_ONLY
  1352. #ifdef UNICODE
  1353. typedef AUXCAPSW AUXCAPS;
  1354. typedef PAUXCAPSW PAUXCAPS;
  1355. typedef NPAUXCAPSW NPAUXCAPS;
  1356. typedef LPAUXCAPSW LPAUXCAPS;
  1357. #else
  1358. typedef AUXCAPSA AUXCAPS;
  1359. typedef PAUXCAPSA PAUXCAPS;
  1360. typedef NPAUXCAPSA NPAUXCAPS;
  1361. typedef LPAUXCAPSA LPAUXCAPS;
  1362. #endif // UNICODE
  1363.  
  1364. #else
  1365. typedef struct auxcaps_tag {
  1366.     WORD    wMid;                  /* manufacturer ID */
  1367.     WORD    wPid;                  /* product ID */
  1368.     VERSION vDriverVersion;        /* version of the driver */
  1369.     char    szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  1370.     WORD    wTechnology;           /* type of device */
  1371.     DWORD   dwSupport;             /* functionality supported by driver */
  1372. } AUXCAPS, *PAUXCAPS, NEAR *NPAUXCAPS, FAR *LPAUXCAPS;
  1373. #endif
  1374.  
  1375. /* flags for wTechnology field in AUXCAPS structure */
  1376. #define AUXCAPS_CDAUDIO    1       /* audio from internal CD-ROM drive */
  1377. #define AUXCAPS_AUXIN      2       /* audio from auxiliary input jacks */
  1378.  
  1379. /* flags for dwSupport field in AUXCAPS structure */
  1380. #define AUXCAPS_VOLUME          0x0001  /* supports volume control */
  1381. #define AUXCAPS_LRVOLUME        0x0002  /* separate left-right volume control */
  1382.  
  1383. #ifndef _WIN32_VXD
  1384.  
  1385. /* auxiliary audio function prototypes */
  1386. WINMMAPI UINT WINAPI auxGetNumDevs(void);
  1387. #ifdef _WIN32
  1388.  
  1389. #ifndef UNICODE_ONLY
  1390. WINMMAPI MMRESULT WINAPI auxGetDevCapsA(UINT uDeviceID, LPAUXCAPSA pac, UINT cbac);
  1391. #endif //!UNICODE_ONLY
  1392. #ifndef ANSI_ONLY
  1393. WINMMAPI MMRESULT WINAPI auxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW pac, UINT cbac);
  1394. #endif //!ANSI_ONLY
  1395. #ifdef UNICODE
  1396. #define auxGetDevCaps  auxGetDevCapsW
  1397. #else
  1398. #define auxGetDevCaps  auxGetDevCapsA
  1399. #endif // !UNICODE
  1400.  
  1401. #else
  1402. MMRESULT WINAPI auxGetDevCaps(UINT uDeviceID, LPAUXCAPS pac, UINT cbac);
  1403. #endif
  1404. WINMMAPI MMRESULT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  1405. WINMMAPI MMRESULT WINAPI auxGetVolume(UINT uDeviceID, LPDWORD pdwVolume);
  1406.  
  1407. #if (WINVER >= 0x030a)
  1408. #ifdef _WIN32
  1409. WINMMAPI MMRESULT WINAPI auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
  1410. #else
  1411. DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
  1412. #endif
  1413. #endif /* ifdef WINVER >= 0x030a */
  1414.  
  1415. #endif /* ifndef _WIN32_VXD */
  1416.  
  1417. #endif  /* ifndef MMNOAUX */
  1418.  
  1419. #ifndef MMNOMIXER
  1420. #ifndef _WIN32_VXD
  1421. /****************************************************************************
  1422.  
  1423.                 Mixer Support
  1424.  
  1425. ****************************************************************************/
  1426.  
  1427. DECLARE_HANDLE(HMIXEROBJ);
  1428. typedef HMIXEROBJ FAR *LPHMIXEROBJ;
  1429.  
  1430. DECLARE_HANDLE(HMIXER);
  1431. typedef HMIXER     FAR *LPHMIXER;
  1432.  
  1433. #define MIXER_SHORT_NAME_CHARS   16
  1434. #define MIXER_LONG_NAME_CHARS    64
  1435.  
  1436. /* */
  1437. /*  MMRESULT error return values specific to the mixer API */
  1438. /* */
  1439. /* */
  1440. #define MIXERR_INVALLINE            (MIXERR_BASE + 0)
  1441. #define MIXERR_INVALCONTROL         (MIXERR_BASE + 1)
  1442. #define MIXERR_INVALVALUE           (MIXERR_BASE + 2)
  1443. #define MIXERR_LASTERROR            (MIXERR_BASE + 2)
  1444.  
  1445. #define MIXER_OBJECTF_HANDLE    0x80000000L
  1446. #define MIXER_OBJECTF_MIXER     0x00000000L
  1447. #define MIXER_OBJECTF_HMIXER    (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
  1448. #define MIXER_OBJECTF_WAVEOUT   0x10000000L
  1449. #define MIXER_OBJECTF_HWAVEOUT  (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
  1450. #define MIXER_OBJECTF_WAVEIN    0x20000000L
  1451. #define MIXER_OBJECTF_HWAVEIN   (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
  1452. #define MIXER_OBJECTF_MIDIOUT   0x30000000L
  1453. #define MIXER_OBJECTF_HMIDIOUT  (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
  1454. #define MIXER_OBJECTF_MIDIIN    0x40000000L
  1455. #define MIXER_OBJECTF_HMIDIIN   (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
  1456. #define MIXER_OBJECTF_AUX       0x50000000L
  1457.  
  1458. WINMMAPI UINT WINAPI mixerGetNumDevs(void);
  1459.  
  1460. #ifdef _WIN32
  1461.  
  1462. #ifndef UNICODE_ONLY
  1463. typedef struct tagMIXERCAPSA {
  1464.     WORD            wMid;                   /* manufacturer id */
  1465.     WORD            wPid;                   /* product id */
  1466.     MMVERSION       vDriverVersion;         /* version of the driver */
  1467.     CHAR            szPname[MAXPNAMELEN];   /* product name */
  1468.     DWORD           fdwSupport;             /* misc. support bits */
  1469.     DWORD           cDestinations;          /* count of destinations */
  1470. } MIXERCAPSA, *PMIXERCAPSA, *LPMIXERCAPSA;
  1471. #endif //!UNICODE_ONLY
  1472. #ifndef ANSI_ONLY
  1473. typedef struct tagMIXERCAPSW {
  1474.     WORD            wMid;                   /* manufacturer id */
  1475.     WORD            wPid;                   /* product id */
  1476.     MMVERSION       vDriverVersion;         /* version of the driver */
  1477.     WCHAR           szPname[MAXPNAMELEN];   /* product name */
  1478.     DWORD           fdwSupport;             /* misc. support bits */
  1479.     DWORD           cDestinations;          /* count of destinations */
  1480. } MIXERCAPSW, *PMIXERCAPSW, *LPMIXERCAPSW;
  1481. #endif //!ANSI_ONLY
  1482. #ifdef UNICODE
  1483. typedef MIXERCAPSW MIXERCAPS;
  1484. typedef PMIXERCAPSW PMIXERCAPS;
  1485. typedef LPMIXERCAPSW LPMIXERCAPS;
  1486. #else
  1487. typedef MIXERCAPSA MIXERCAPS;
  1488. typedef PMIXERCAPSA PMIXERCAPS;
  1489. typedef LPMIXERCAPSA LPMIXERCAPS;
  1490. #endif // UNICODE
  1491.  
  1492. #else
  1493. typedef struct tMIXERCAPS {
  1494.     WORD            wMid;                   /* manufacturer id */
  1495.     WORD            wPid;                   /* product id */
  1496.     VERSION         vDriverVersion;         /* version of the driver */
  1497.     char            szPname[MAXPNAMELEN];   /* product name */
  1498.     DWORD           fdwSupport;             /* misc. support bits */
  1499.     DWORD           cDestinations;          /* count of destinations */
  1500. } MIXERCAPS, *PMIXERCAPS, FAR *LPMIXERCAPS;
  1501. #endif
  1502.  
  1503. #ifdef _WIN32
  1504.  
  1505. #ifndef UNICODE_ONLY
  1506. WINMMAPI MMRESULT WINAPI mixerGetDevCapsA(UINT uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
  1507. #endif //!UNICODE_ONLY
  1508. #ifndef ANSI_ONLY
  1509. WINMMAPI MMRESULT WINAPI mixerGetDevCapsW(UINT uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
  1510. #endif //!ANSI_ONLY
  1511. #ifdef UNICODE
  1512. #define mixerGetDevCaps  mixerGetDevCapsW
  1513. #else
  1514. #define mixerGetDevCaps  mixerGetDevCapsA
  1515. #endif // !UNICODE
  1516.  
  1517. #else
  1518. MMRESULT WINAPI mixerGetDevCaps(UINT uMxId, LPMIXERCAPS pmxcaps, UINT cbmxcaps);
  1519. #endif
  1520.  
  1521. WINMMAPI MMRESULT WINAPI mixerOpen(LPHMIXER phmx, UINT uMxId, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1522.  
  1523. WINMMAPI MMRESULT WINAPI mixerClose(HMIXER hmx);
  1524.  
  1525. WINMMAPI DWORD WINAPI mixerMessage(HMIXER hmx, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  1526.  
  1527. #ifdef _WIN32
  1528.  
  1529. #ifndef UNICODE_ONLY
  1530. typedef struct tagMIXERLINEA {
  1531.     DWORD       cbStruct;               /* size of MIXERLINE structure */
  1532.     DWORD       dwDestination;          /* zero based destination index */
  1533.     DWORD       dwSource;               /* zero based source index (if source) */
  1534.     DWORD       dwLineID;               /* unique line id for mixer device */
  1535.     DWORD       fdwLine;                /* state/information about line */
  1536.     DWORD       dwUser;                 /* driver specific information */
  1537.     DWORD       dwComponentType;        /* component type line connects to */
  1538.     DWORD       cChannels;              /* number of channels line supports */
  1539.     DWORD       cConnections;           /* number of connections [possible] */
  1540.     DWORD       cControls;              /* number of controls at this line */
  1541.     CHAR        szShortName[MIXER_SHORT_NAME_CHARS];
  1542.     CHAR        szName[MIXER_LONG_NAME_CHARS];
  1543.     struct {
  1544.     DWORD   dwType;                 /* MIXERLINE_TARGETTYPE_xxxx */
  1545.     DWORD   dwDeviceID;             /* target device ID of device type */
  1546.     WORD    wMid;                   /* of target device */
  1547.     WORD    wPid;                   /*      " */
  1548.     MMVERSION vDriverVersion;       /*      " */
  1549.     CHAR    szPname[MAXPNAMELEN];   /*      " */
  1550.     } Target;
  1551. } MIXERLINEA, *PMIXERLINEA, *LPMIXERLINEA;
  1552. #endif //!UNICODE_ONLY
  1553. #ifndef ANSI_ONLY
  1554. typedef struct tagMIXERLINEW {
  1555.     DWORD       cbStruct;               /* size of MIXERLINE structure */
  1556.     DWORD       dwDestination;          /* zero based destination index */
  1557.     DWORD       dwSource;               /* zero based source index (if source) */
  1558.     DWORD       dwLineID;               /* unique line id for mixer device */
  1559.     DWORD       fdwLine;                /* state/information about line */
  1560.     DWORD       dwUser;                 /* driver specific information */
  1561.     DWORD       dwComponentType;        /* component type line connects to */
  1562.     DWORD       cChannels;              /* number of channels line supports */
  1563.     DWORD       cConnections;           /* number of connections [possible] */
  1564.     DWORD       cControls;              /* number of controls at this line */
  1565.     WCHAR       szShortName[MIXER_SHORT_NAME_CHARS];
  1566.     WCHAR       szName[MIXER_LONG_NAME_CHARS];
  1567.     struct {
  1568.     DWORD   dwType;                 /* MIXERLINE_TARGETTYPE_xxxx */
  1569.     DWORD   dwDeviceID;             /* target device ID of device type */
  1570.     WORD    wMid;                   /* of target device */
  1571.     WORD    wPid;                   /*      " */
  1572.     MMVERSION vDriverVersion;       /*      " */
  1573.     WCHAR   szPname[MAXPNAMELEN];   /*      " */
  1574.     } Target;
  1575. } MIXERLINEW, *PMIXERLINEW, *LPMIXERLINEW;
  1576. #endif //!ANSI_ONLY
  1577. #ifdef UNICODE
  1578. typedef MIXERLINEW MIXERLINE;
  1579. typedef PMIXERLINEW PMIXERLINE;
  1580. typedef LPMIXERLINEW LPMIXERLINE;
  1581. #else
  1582. typedef MIXERLINEA MIXERLINE;
  1583. typedef PMIXERLINEA PMIXERLINE;
  1584. typedef LPMIXERLINEA LPMIXERLINE;
  1585. #endif // UNICODE
  1586.  
  1587. #else
  1588. typedef struct tMIXERLINE {
  1589.     DWORD       cbStruct;               /* size of MIXERLINE structure */
  1590.     DWORD       dwDestination;          /* zero based destination index */
  1591.     DWORD       dwSource;               /* zero based source index (if source) */
  1592.     DWORD       dwLineID;               /* unique line id for mixer device */
  1593.     DWORD       fdwLine;                /* state/information about line */
  1594.     DWORD       dwUser;                 /* driver specific information */
  1595.     DWORD       dwComponentType;        /* component type line connects to */
  1596.     DWORD       cChannels;              /* number of channels line supports */
  1597.     DWORD       cConnections;           /* number of connections [possible] */
  1598.     DWORD       cControls;              /* number of controls at this line */
  1599.     char        szShortName[MIXER_SHORT_NAME_CHARS];
  1600.     char        szName[MIXER_LONG_NAME_CHARS];
  1601.     struct {
  1602.     DWORD   dwType;                 /* MIXERLINE_TARGETTYPE_xxxx */
  1603.     DWORD   dwDeviceID;             /* target device ID of device type */
  1604.     WORD    wMid;                   /* of target device */
  1605.     WORD    wPid;                   /*      " */
  1606.     VERSION vDriverVersion;         /*      " */
  1607.     char    szPname[MAXPNAMELEN];   /*      " */
  1608.     } Target;
  1609. } MIXERLINE, *PMIXERLINE, FAR *LPMIXERLINE;
  1610. #endif
  1611.  
  1612. /* */
  1613. /*  MIXERLINE.fdwLine */
  1614. /* */
  1615. /* */
  1616. #define MIXERLINE_LINEF_ACTIVE              0x00000001L
  1617. #define MIXERLINE_LINEF_DISCONNECTED        0x00008000L
  1618. #define MIXERLINE_LINEF_SOURCE              0x80000000L
  1619.  
  1620. /* */
  1621. /*  MIXERLINE.dwComponentType */
  1622. /* */
  1623. /*  component types for destinations and sources */
  1624. /* */
  1625. /* */
  1626. #define MIXERLINE_COMPONENTTYPE_DST_FIRST       0x00000000L
  1627. #define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED   (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
  1628. #define MIXERLINE_COMPONENTTYPE_DST_DIGITAL     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
  1629. #define MIXERLINE_COMPONENTTYPE_DST_LINE        (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
  1630. #define MIXERLINE_COMPONENTTYPE_DST_MONITOR     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
  1631. #define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS    (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
  1632. #define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES  (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
  1633. #define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE   (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
  1634. #define MIXERLINE_COMPONENTTYPE_DST_WAVEIN      (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
  1635. #define MIXERLINE_COMPONENTTYPE_DST_VOICEIN     (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1636. #define MIXERLINE_COMPONENTTYPE_DST_LAST        (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1637.  
  1638. #define MIXERLINE_COMPONENTTYPE_SRC_FIRST       0x00001000L
  1639. #define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
  1640. #define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL     (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
  1641. #define MIXERLINE_COMPONENTTYPE_SRC_LINE        (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
  1642. #define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE  (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
  1643. #define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
  1644. #define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
  1645. #define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
  1646. #define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
  1647. #define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT     (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
  1648. #define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY   (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
  1649. #define MIXERLINE_COMPONENTTYPE_SRC_ANALOG      (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1650. #define MIXERLINE_COMPONENTTYPE_SRC_LAST        (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1651.  
  1652. /* */
  1653. /*  MIXERLINE.Target.dwType */
  1654. /* */
  1655. /* */
  1656. #define MIXERLINE_TARGETTYPE_UNDEFINED      0
  1657. #define MIXERLINE_TARGETTYPE_WAVEOUT        1
  1658. #define MIXERLINE_TARGETTYPE_WAVEIN         2
  1659. #define MIXERLINE_TARGETTYPE_MIDIOUT        3
  1660. #define MIXERLINE_TARGETTYPE_MIDIIN         4
  1661. #define MIXERLINE_TARGETTYPE_AUX            5
  1662.  
  1663. #ifdef _WIN32
  1664.  
  1665. #ifndef UNICODE_ONLY
  1666. WINMMAPI MMRESULT WINAPI mixerGetLineInfoA(HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
  1667. #endif //!UNICODE_ONLY
  1668. #ifndef ANSI_ONLY
  1669. WINMMAPI MMRESULT WINAPI mixerGetLineInfoW(HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
  1670. #endif //!ANSI_ONLY
  1671. #ifdef UNICODE
  1672. #define mixerGetLineInfo  mixerGetLineInfoW
  1673. #else
  1674. #define mixerGetLineInfo  mixerGetLineInfoA
  1675. #endif // !UNICODE
  1676.  
  1677. #else
  1678. MMRESULT WINAPI mixerGetLineInfo(HMIXEROBJ hmxobj, LPMIXERLINE pmxl, DWORD fdwInfo);
  1679. #endif
  1680.  
  1681. #define MIXER_GETLINEINFOF_DESTINATION      0x00000000L
  1682. #define MIXER_GETLINEINFOF_SOURCE           0x00000001L
  1683. #define MIXER_GETLINEINFOF_LINEID           0x00000002L
  1684. #define MIXER_GETLINEINFOF_COMPONENTTYPE    0x00000003L
  1685. #define MIXER_GETLINEINFOF_TARGETTYPE       0x00000004L
  1686.  
  1687. #define MIXER_GETLINEINFOF_QUERYMASK        0x0000000FL
  1688.  
  1689. WINMMAPI MMRESULT WINAPI mixerGetID(HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId);
  1690.  
  1691. /* */
  1692. /*  MIXERCONTROL */
  1693. /* */
  1694. /* */
  1695. #ifdef _WIN32
  1696.  
  1697. #ifndef UNICODE_ONLY
  1698. typedef struct tagMIXERCONTROLA {
  1699.     DWORD           cbStruct;           /* size in bytes of MIXERCONTROL */
  1700.     DWORD           dwControlID;        /* unique control id for mixer device */
  1701.     DWORD           dwControlType;      /* MIXERCONTROL_CONTROLTYPE_xxx */
  1702.     DWORD           fdwControl;         /* MIXERCONTROL_CONTROLF_xxx */
  1703.     DWORD           cMultipleItems;     /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1704.     CHAR            szShortName[MIXER_SHORT_NAME_CHARS];
  1705.     CHAR            szName[MIXER_LONG_NAME_CHARS];
  1706.     union {
  1707.     struct {
  1708.         LONG    lMinimum;           /* signed minimum for this control */
  1709.         LONG    lMaximum;           /* signed maximum for this control */
  1710.     } DUMMYUNIONNAME;
  1711.     struct {
  1712.         DWORD   dwMinimum;          /* unsigned minimum for this control */
  1713.         DWORD   dwMaximum;          /* unsigned maximum for this control */
  1714.     } DUMMYUNIONNAME2;
  1715.     DWORD       dwReserved[6];
  1716.     } Bounds;
  1717.     union {
  1718.     DWORD       cSteps;             /* # of steps between min & max */
  1719.     DWORD       cbCustomData;       /* size in bytes of custom data */
  1720.     DWORD       dwReserved[6];      /* !!! needed? we have cbStruct.... */
  1721.     } Metrics;
  1722. } MIXERCONTROLA, *PMIXERCONTROLA, *LPMIXERCONTROLA;
  1723. #endif //!UNICODE_ONLY
  1724. #ifndef ANSI_ONLY
  1725. typedef struct tagMIXERCONTROLW {
  1726.     DWORD           cbStruct;           /* size in bytes of MIXERCONTROL */
  1727.     DWORD           dwControlID;        /* unique control id for mixer device */
  1728.     DWORD           dwControlType;      /* MIXERCONTROL_CONTROLTYPE_xxx */
  1729.     DWORD           fdwControl;         /* MIXERCONTROL_CONTROLF_xxx */
  1730.     DWORD           cMultipleItems;     /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1731.     WCHAR           szShortName[MIXER_SHORT_NAME_CHARS];
  1732.     WCHAR           szName[MIXER_LONG_NAME_CHARS];
  1733.     union {
  1734.     struct {
  1735.         LONG    lMinimum;           /* signed minimum for this control */
  1736.         LONG    lMaximum;           /* signed maximum for this control */
  1737.     } DUMMYUNIONNAME;
  1738.     struct {
  1739.         DWORD   dwMinimum;          /* unsigned minimum for this control */
  1740.         DWORD   dwMaximum;          /* unsigned maximum for this control */
  1741.     } DUMMYUNIONNAME2;
  1742.     DWORD       dwReserved[6];
  1743.     } Bounds;
  1744.     union {
  1745.     DWORD       cSteps;             /* # of steps between min & max */
  1746.     DWORD       cbCustomData;       /* size in bytes of custom data */
  1747.     DWORD       dwReserved[6];      /* !!! needed? we have cbStruct.... */
  1748.     } Metrics;
  1749. } MIXERCONTROLW, *PMIXERCONTROLW, *LPMIXERCONTROLW;
  1750. #endif //!ANSI_ONLY
  1751. #ifdef UNICODE
  1752. typedef MIXERCONTROLW MIXERCONTROL;
  1753. typedef PMIXERCONTROLW PMIXERCONTROL;
  1754. typedef LPMIXERCONTROLW LPMIXERCONTROL;
  1755. #else
  1756. typedef MIXERCONTROLA MIXERCONTROL;
  1757. typedef PMIXERCONTROLA PMIXERCONTROL;
  1758. typedef LPMIXERCONTROLA LPMIXERCONTROL;
  1759. #endif // UNICODE
  1760.  
  1761. #else
  1762. typedef struct tMIXERCONTROL {
  1763.     DWORD           cbStruct;           /* size in bytes of MIXERCONTROL */
  1764.     DWORD           dwControlID;        /* unique control id for mixer device */
  1765.     DWORD           dwControlType;      /* MIXERCONTROL_CONTROLTYPE_xxx */
  1766.     DWORD           fdwControl;         /* MIXERCONTROL_CONTROLF_xxx */
  1767.     DWORD           cMultipleItems;     /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1768.     char            szShortName[MIXER_SHORT_NAME_CHARS];
  1769.     char            szName[MIXER_LONG_NAME_CHARS];
  1770.     union {
  1771.     struct {
  1772.         LONG    lMinimum;           /* signed minimum for this control */
  1773.         LONG    lMaximum;           /* signed maximum for this control */
  1774.     } DUMMYUNIONNAME;
  1775.     struct {
  1776.         DWORD   dwMinimum;          /* unsigned minimum for this control */
  1777.         DWORD   dwMaximum;          /* unsigned maximum for this control */
  1778.     } DUMMYUNIONNAME2;
  1779.     DWORD       dwReserved[6];
  1780.     } Bounds;
  1781.     union {
  1782.     DWORD       cSteps;             /* # of steps between min & max */
  1783.     DWORD       cbCustomData;       /* size in bytes of custom data */
  1784.     DWORD       dwReserved[6];      /* !!! needed? we have cbStruct.... */
  1785.     } Metrics;
  1786. } MIXERCONTROL, *PMIXERCONTROL, FAR *LPMIXERCONTROL;
  1787. #endif
  1788.  
  1789. /* */
  1790. /*  MIXERCONTROL.fdwControl */
  1791. /* */
  1792. /* */
  1793. #define MIXERCONTROL_CONTROLF_UNIFORM   0x00000001L
  1794. #define MIXERCONTROL_CONTROLF_MULTIPLE  0x00000002L
  1795. #define MIXERCONTROL_CONTROLF_DISABLED  0x80000000L
  1796.  
  1797. /* */
  1798. /*  MIXERCONTROL_CONTROLTYPE_xxx building block defines */
  1799. /* */
  1800. /* */
  1801. #define MIXERCONTROL_CT_CLASS_MASK          0xF0000000L
  1802. #define MIXERCONTROL_CT_CLASS_CUSTOM        0x00000000L
  1803. #define MIXERCONTROL_CT_CLASS_METER         0x10000000L
  1804. #define MIXERCONTROL_CT_CLASS_SWITCH        0x20000000L
  1805. #define MIXERCONTROL_CT_CLASS_NUMBER        0x30000000L
  1806. #define MIXERCONTROL_CT_CLASS_SLIDER        0x40000000L
  1807. #define MIXERCONTROL_CT_CLASS_FADER         0x50000000L
  1808. #define MIXERCONTROL_CT_CLASS_TIME          0x60000000L
  1809. #define MIXERCONTROL_CT_CLASS_LIST          0x70000000L
  1810.  
  1811. #define MIXERCONTROL_CT_SUBCLASS_MASK       0x0F000000L
  1812.  
  1813. #define MIXERCONTROL_CT_SC_SWITCH_BOOLEAN   0x00000000L
  1814. #define MIXERCONTROL_CT_SC_SWITCH_BUTTON    0x01000000L
  1815.  
  1816. #define MIXERCONTROL_CT_SC_METER_POLLED     0x00000000L
  1817.  
  1818. #define MIXERCONTROL_CT_SC_TIME_MICROSECS   0x00000000L
  1819. #define MIXERCONTROL_CT_SC_TIME_MILLISECS   0x01000000L
  1820.  
  1821. #define MIXERCONTROL_CT_SC_LIST_SINGLE      0x00000000L
  1822. #define MIXERCONTROL_CT_SC_LIST_MULTIPLE    0x01000000L
  1823.  
  1824. #define MIXERCONTROL_CT_UNITS_MASK          0x00FF0000L
  1825. #define MIXERCONTROL_CT_UNITS_CUSTOM        0x00000000L
  1826. #define MIXERCONTROL_CT_UNITS_BOOLEAN       0x00010000L
  1827. #define MIXERCONTROL_CT_UNITS_SIGNED        0x00020000L
  1828. #define MIXERCONTROL_CT_UNITS_UNSIGNED      0x00030000L
  1829. #define MIXERCONTROL_CT_UNITS_DECIBELS      0x00040000L /* in 10ths */
  1830. #define MIXERCONTROL_CT_UNITS_PERCENT       0x00050000L /* in 10ths */
  1831.  
  1832. /* */
  1833. /*  Commonly used control types for specifying MIXERCONTROL.dwControlType */
  1834. /* */
  1835.  
  1836. #define MIXERCONTROL_CONTROLTYPE_CUSTOM         (MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM)
  1837. #define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER   (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1838. #define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER    (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED)
  1839. #define MIXERCONTROL_CONTROLTYPE_PEAKMETER      (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
  1840. #define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER  (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1841. #define MIXERCONTROL_CONTROLTYPE_BOOLEAN        (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1842. #define MIXERCONTROL_CONTROLTYPE_ONOFF          (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
  1843. #define MIXERCONTROL_CONTROLTYPE_MUTE           (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
  1844. #define MIXERCONTROL_CONTROLTYPE_MONO           (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
  1845. #define MIXERCONTROL_CONTROLTYPE_LOUDNESS       (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
  1846. #define MIXERCONTROL_CONTROLTYPE_STEREOENH      (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
  1847. #define MIXERCONTROL_CONTROLTYPE_BUTTON         (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1848. #define MIXERCONTROL_CONTROLTYPE_DECIBELS       (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS)
  1849. #define MIXERCONTROL_CONTROLTYPE_SIGNED         (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED)
  1850. #define MIXERCONTROL_CONTROLTYPE_UNSIGNED       (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1851. #define MIXERCONTROL_CONTROLTYPE_PERCENT        (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT)
  1852. #define MIXERCONTROL_CONTROLTYPE_SLIDER         (MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED)
  1853. #define MIXERCONTROL_CONTROLTYPE_PAN            (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
  1854. #define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN      (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
  1855. #define MIXERCONTROL_CONTROLTYPE_FADER          (MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1856. #define MIXERCONTROL_CONTROLTYPE_VOLUME         (MIXERCONTROL_CONTROLTYPE_FADER + 1)
  1857. #define MIXERCONTROL_CONTROLTYPE_BASS           (MIXERCONTROL_CONTROLTYPE_FADER + 2)
  1858. #define MIXERCONTROL_CONTROLTYPE_TREBLE         (MIXERCONTROL_CONTROLTYPE_FADER + 3)
  1859. #define MIXERCONTROL_CONTROLTYPE_EQUALIZER      (MIXERCONTROL_CONTROLTYPE_FADER + 4)
  1860. #define MIXERCONTROL_CONTROLTYPE_SINGLESELECT   (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1861. #define MIXERCONTROL_CONTROLTYPE_MUX            (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
  1862. #define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1863. #define MIXERCONTROL_CONTROLTYPE_MIXER          (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
  1864. #define MIXERCONTROL_CONTROLTYPE_MICROTIME      (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1865. #define MIXERCONTROL_CONTROLTYPE_MILLITIME      (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1866.  
  1867. /* */
  1868. /*  MIXERLINECONTROLS */
  1869. /* */
  1870. #ifdef _WIN32
  1871.  
  1872. #ifndef UNICODE_ONLY
  1873. typedef struct tagMIXERLINECONTROLSA {
  1874.     DWORD           cbStruct;       /* size in bytes of MIXERLINECONTROLS */
  1875.     DWORD           dwLineID;       /* line id (from MIXERLINE.dwLineID) */
  1876.     union {
  1877.     DWORD       dwControlID;    /* MIXER_GETLINECONTROLSF_ONEBYID */
  1878.     DWORD       dwControlType;  /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1879.     } DUMMYUNIONNAME;
  1880.     DWORD           cControls;      /* count of controls pmxctrl points to */
  1881.     DWORD           cbmxctrl;       /* size in bytes of _one_ MIXERCONTROL */
  1882.     LPMIXERCONTROLA pamxctrl;       /* pointer to first MIXERCONTROL array */
  1883. } MIXERLINECONTROLSA, *PMIXERLINECONTROLSA, *LPMIXERLINECONTROLSA;
  1884. #endif //!UNICODE_ONLY
  1885. #ifndef ANSI_ONLY
  1886. typedef struct tagMIXERLINECONTROLSW {
  1887.     DWORD           cbStruct;       /* size in bytes of MIXERLINECONTROLS */
  1888.     DWORD           dwLineID;       /* line id (from MIXERLINE.dwLineID) */
  1889.     union {
  1890.     DWORD       dwControlID;    /* MIXER_GETLINECONTROLSF_ONEBYID */
  1891.     DWORD       dwControlType;  /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1892.     } DUMMYUNIONNAME;
  1893.     DWORD           cControls;      /* count of controls pmxctrl points to */
  1894.     DWORD           cbmxctrl;       /* size in bytes of _one_ MIXERCONTROL */
  1895.     LPMIXERCONTROLW pamxctrl;       /* pointer to first MIXERCONTROL array */
  1896. } MIXERLINECONTROLSW, *PMIXERLINECONTROLSW, *LPMIXERLINECONTROLSW;
  1897. #endif //!ANSI_ONLY
  1898. #ifdef UNICODE
  1899. typedef MIXERLINECONTROLSW MIXERLINECONTROLS;
  1900. typedef PMIXERLINECONTROLSW PMIXERLINECONTROLS;
  1901. typedef LPMIXERLINECONTROLSW LPMIXERLINECONTROLS;
  1902. #else
  1903. typedef MIXERLINECONTROLSA MIXERLINECONTROLS;
  1904. typedef PMIXERLINECONTROLSA PMIXERLINECONTROLS;
  1905. typedef LPMIXERLINECONTROLSA LPMIXERLINECONTROLS;
  1906. #endif // UNICODE
  1907.  
  1908. #else
  1909. typedef struct tMIXERLINECONTROLS {
  1910.     DWORD           cbStruct;       /* size in bytes of MIXERLINECONTROLS */
  1911.     DWORD           dwLineID;       /* line id (from MIXERLINE.dwLineID) */
  1912.     union {
  1913.     DWORD       dwControlID;    /* MIXER_GETLINECONTROLSF_ONEBYID */
  1914.     DWORD       dwControlType;  /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1915.     } DUMMYUNIONNAME;
  1916.     DWORD           cControls;      /* count of controls pmxctrl points to */
  1917.     DWORD           cbmxctrl;       /* size in bytes of _one_ MIXERCONTROL */
  1918.     LPMIXERCONTROL  pamxctrl;       /* pointer to first MIXERCONTROL array */
  1919. } MIXERLINECONTROLS, *PMIXERLINECONTROLS, FAR *LPMIXERLINECONTROLS;
  1920. #endif
  1921.  
  1922. /* */
  1923. /* */
  1924. /* */
  1925. #ifdef _WIN32
  1926.  
  1927. #ifndef UNICODE_ONLY
  1928. WINMMAPI MMRESULT WINAPI mixerGetLineControlsA(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
  1929. #endif //!UNICODE_ONLY
  1930. #ifndef ANSI_ONLY
  1931. WINMMAPI MMRESULT WINAPI mixerGetLineControlsW(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
  1932. #endif //!ANSI_ONLY
  1933. #ifdef UNICODE
  1934. #define mixerGetLineControls  mixerGetLineControlsW
  1935. #else
  1936. #define mixerGetLineControls  mixerGetLineControlsA
  1937. #endif // !UNICODE
  1938.  
  1939. #else
  1940. MMRESULT WINAPI mixerGetLineControls(HMIXEROBJ hmxobj, LPMIXERLINECONTROLS pmxlc, DWORD fdwControls);
  1941. #endif
  1942.  
  1943. #define MIXER_GETLINECONTROLSF_ALL          0x00000000L
  1944. #define MIXER_GETLINECONTROLSF_ONEBYID      0x00000001L
  1945. #define MIXER_GETLINECONTROLSF_ONEBYTYPE    0x00000002L
  1946.  
  1947. #define MIXER_GETLINECONTROLSF_QUERYMASK    0x0000000FL
  1948.  
  1949. typedef struct tMIXERCONTROLDETAILS {
  1950.     DWORD           cbStruct;       /* size in bytes of MIXERCONTROLDETAILS */
  1951.     DWORD           dwControlID;    /* control id to get/set details on */
  1952.     DWORD           cChannels;      /* number of channels in paDetails array */
  1953.     union {
  1954.     HWND        hwndOwner;      /* for MIXER_SETCONTROLDETAILSF_CUSTOM */
  1955.     DWORD       cMultipleItems; /* if _MULTIPLE, the number of items per channel */
  1956.     } DUMMYUNIONNAME;
  1957.     DWORD           cbDetails;      /* size of _one_ details_XX struct */
  1958.     LPVOID          paDetails;      /* pointer to array of details_XX structs */
  1959. } MIXERCONTROLDETAILS, *PMIXERCONTROLDETAILS, FAR *LPMIXERCONTROLDETAILS;
  1960.  
  1961. /* */
  1962. /*  MIXER_GETCONTROLDETAILSF_LISTTEXT */
  1963. /* */
  1964. /* */
  1965. #ifdef _WIN32
  1966.  
  1967. #ifndef UNICODE_ONLY
  1968. typedef struct tagMIXERCONTROLDETAILS_LISTTEXTA {
  1969.     DWORD           dwParam1;
  1970.     DWORD           dwParam2;
  1971.     CHAR            szName[MIXER_LONG_NAME_CHARS];
  1972. } MIXERCONTROLDETAILS_LISTTEXTA, *PMIXERCONTROLDETAILS_LISTTEXTA, *LPMIXERCONTROLDETAILS_LISTTEXTA;
  1973. #endif //!UNICODE_ONLY
  1974. #ifndef ANSI_ONLY
  1975. typedef struct tagMIXERCONTROLDETAILS_LISTTEXTW {
  1976.     DWORD           dwParam1;
  1977.     DWORD           dwParam2;
  1978.     WCHAR           szName[MIXER_LONG_NAME_CHARS];
  1979. } MIXERCONTROLDETAILS_LISTTEXTW, *PMIXERCONTROLDETAILS_LISTTEXTW, *LPMIXERCONTROLDETAILS_LISTTEXTW;
  1980. #endif //!ANSI_ONLY
  1981. #ifdef UNICODE
  1982. typedef MIXERCONTROLDETAILS_LISTTEXTW MIXERCONTROLDETAILS_LISTTEXT;
  1983. typedef PMIXERCONTROLDETAILS_LISTTEXTW PMIXERCONTROLDETAILS_LISTTEXT;
  1984. typedef LPMIXERCONTROLDETAILS_LISTTEXTW LPMIXERCONTROLDETAILS_LISTTEXT;
  1985. #else
  1986. typedef MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT;
  1987. typedef PMIXERCONTROLDETAILS_LISTTEXTA PMIXERCONTROLDETAILS_LISTTEXT;
  1988. typedef LPMIXERCONTROLDETAILS_LISTTEXTA LPMIXERCONTROLDETAILS_LISTTEXT;
  1989. #endif // UNICODE
  1990.  
  1991. #else
  1992. typedef struct tMIXERCONTROLDETAILS_LISTTEXT {
  1993.     DWORD           dwParam1;
  1994.     DWORD           dwParam2;
  1995.     char            szName[MIXER_LONG_NAME_CHARS];
  1996. } MIXERCONTROLDETAILS_LISTTEXT, *PMIXERCONTROLDETAILS_LISTTEXT, FAR *LPMIXERCONTROLDETAILS_LISTTEXT;
  1997. #endif
  1998.  
  1999. /* */
  2000. /*  MIXER_GETCONTROLDETAILSF_VALUE */
  2001. /* */
  2002. /* */
  2003. typedef struct tMIXERCONTROLDETAILS_BOOLEAN {
  2004.     LONG            fValue;
  2005. }       MIXERCONTROLDETAILS_BOOLEAN,
  2006.       *PMIXERCONTROLDETAILS_BOOLEAN,
  2007.  FAR *LPMIXERCONTROLDETAILS_BOOLEAN;
  2008.  
  2009. typedef struct tMIXERCONTROLDETAILS_SIGNED {
  2010.     LONG            lValue;
  2011. }       MIXERCONTROLDETAILS_SIGNED,
  2012.       *PMIXERCONTROLDETAILS_SIGNED,
  2013.  FAR *LPMIXERCONTROLDETAILS_SIGNED;
  2014.  
  2015. typedef struct tMIXERCONTROLDETAILS_UNSIGNED {
  2016.     DWORD           dwValue;
  2017. }       MIXERCONTROLDETAILS_UNSIGNED,
  2018.       *PMIXERCONTROLDETAILS_UNSIGNED,
  2019.  FAR *LPMIXERCONTROLDETAILS_UNSIGNED;
  2020.  
  2021. #ifdef _WIN32
  2022.  
  2023. #ifndef UNICODE_ONLY
  2024. WINMMAPI MMRESULT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  2025. #endif //!UNICODE_ONLY
  2026. #ifndef ANSI_ONLY
  2027. WINMMAPI MMRESULT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  2028. #endif //!ANSI_ONLY
  2029. #ifdef UNICODE
  2030. #define mixerGetControlDetails  mixerGetControlDetailsW
  2031. #else
  2032. #define mixerGetControlDetails  mixerGetControlDetailsA
  2033. #endif // !UNICODE
  2034.  
  2035. #else
  2036. MMRESULT WINAPI mixerGetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  2037. #endif
  2038.  
  2039. #define MIXER_GETCONTROLDETAILSF_VALUE      0x00000000L
  2040. #define MIXER_GETCONTROLDETAILSF_LISTTEXT   0x00000001L
  2041.  
  2042. #define MIXER_GETCONTROLDETAILSF_QUERYMASK  0x0000000FL
  2043.  
  2044. WINMMAPI MMRESULT WINAPI mixerSetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  2045.  
  2046. #define MIXER_SETCONTROLDETAILSF_VALUE      0x00000000L
  2047. #define MIXER_SETCONTROLDETAILSF_CUSTOM     0x00000001L
  2048.  
  2049. #define MIXER_SETCONTROLDETAILSF_QUERYMASK  0x0000000FL
  2050.  
  2051. #endif /* ifndef _WIN32_VXD */
  2052. #endif /* ifndef MMNOMIXER */
  2053.  
  2054. #ifndef MMNOTIMER
  2055. #ifndef _WIN32_VXD
  2056. /****************************************************************************
  2057.  
  2058.                 Timer support
  2059.  
  2060. ****************************************************************************/
  2061.  
  2062. /* timer error return values */
  2063. #define TIMERR_NOERROR        (0)                  /* no error */
  2064. #define TIMERR_NOCANDO        (TIMERR_BASE+1)      /* request not completed */
  2065. #define TIMERR_STRUCT         (TIMERR_BASE+33)     /* time struct size */
  2066.  
  2067. /* timer data types */
  2068. typedef void (CALLBACK TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
  2069.  
  2070. typedef TIMECALLBACK FAR *LPTIMECALLBACK;
  2071.  
  2072. /* flags for fuEvent parameter of timeSetEvent() function */
  2073. #define TIME_ONESHOT    0x0000   /* program timer for single event */
  2074. #define TIME_PERIODIC   0x0001   /* program for continuous periodic event */
  2075.  
  2076. #ifdef _WIN32
  2077. #define TIME_CALLBACK_FUNCTION      0x0000  /* callback is function */
  2078. #define TIME_CALLBACK_EVENT_SET     0x0010  /* callback is event - use SetEvent */
  2079. #define TIME_CALLBACK_EVENT_PULSE   0x0020  /* callback is event - use PulseEvent */
  2080. #endif
  2081.  
  2082. /* timer device capabilities data structure */
  2083. typedef struct timecaps_tag {
  2084.     UINT    wPeriodMin;     /* minimum period supported  */
  2085.     UINT    wPeriodMax;     /* maximum period supported  */
  2086. } TIMECAPS, *PTIMECAPS, NEAR *NPTIMECAPS, FAR *LPTIMECAPS;
  2087.  
  2088. /* timer function prototypes */
  2089. WINMMAPI MMRESULT WINAPI timeGetSystemTime(LPMMTIME pmmt, UINT cbmmt);
  2090. WINMMAPI DWORD WINAPI timeGetTime(void);
  2091. WINMMAPI MMRESULT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
  2092.     LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent);
  2093. WINMMAPI MMRESULT WINAPI timeKillEvent(UINT uTimerID);
  2094. WINMMAPI MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc);
  2095. WINMMAPI MMRESULT WINAPI timeBeginPeriod(UINT uPeriod);
  2096. WINMMAPI MMRESULT WINAPI timeEndPeriod(UINT uPeriod);
  2097.  
  2098. #endif  /* ifndef _WIN32_VXD */
  2099. #endif  /* ifndef MMNOTIMER */
  2100.  
  2101. #ifndef MMNOJOY
  2102. /****************************************************************************
  2103.  
  2104.                 Joystick support
  2105.  
  2106. ****************************************************************************/
  2107.  
  2108. /* joystick error return values */
  2109. #define JOYERR_NOERROR        (0)                  /* no error */
  2110. #define JOYERR_PARMS          (JOYERR_BASE+5)      /* bad parameters */
  2111. #define JOYERR_NOCANDO        (JOYERR_BASE+6)      /* request not completed */
  2112. #define JOYERR_UNPLUGGED      (JOYERR_BASE+7)      /* joystick is unplugged */
  2113.  
  2114. /* constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages */
  2115. #define JOY_BUTTON1         0x0001
  2116. #define JOY_BUTTON2         0x0002
  2117. #define JOY_BUTTON3         0x0004
  2118. #define JOY_BUTTON4         0x0008
  2119. #define JOY_BUTTON1CHG      0x0100
  2120. #define JOY_BUTTON2CHG      0x0200
  2121. #define JOY_BUTTON3CHG      0x0400
  2122. #define JOY_BUTTON4CHG      0x0800
  2123.  
  2124. /* constants used with JOYINFOEX */
  2125. #define JOY_BUTTON5         0x00000010l
  2126. #define JOY_BUTTON6         0x00000020l
  2127. #define JOY_BUTTON7         0x00000040l
  2128. #define JOY_BUTTON8         0x00000080l
  2129. #define JOY_BUTTON9         0x00000100l
  2130. #define JOY_BUTTON10        0x00000200l
  2131. #define JOY_BUTTON11        0x00000400l
  2132. #define JOY_BUTTON12        0x00000800l
  2133. #define JOY_BUTTON13        0x00001000l
  2134. #define JOY_BUTTON14        0x00002000l
  2135. #define JOY_BUTTON15        0x00004000l
  2136. #define JOY_BUTTON16        0x00008000l
  2137. #define JOY_BUTTON17        0x00010000l
  2138. #define JOY_BUTTON18        0x00020000l
  2139. #define JOY_BUTTON19        0x00040000l
  2140. #define JOY_BUTTON20        0x00080000l
  2141. #define JOY_BUTTON21        0x00100000l
  2142. #define JOY_BUTTON22        0x00200000l
  2143. #define JOY_BUTTON23        0x00400000l
  2144. #define JOY_BUTTON24        0x00800000l
  2145. #define JOY_BUTTON25        0x01000000l
  2146. #define JOY_BUTTON26        0x02000000l
  2147. #define JOY_BUTTON27        0x04000000l
  2148. #define JOY_BUTTON28        0x08000000l
  2149. #define JOY_BUTTON29        0x10000000l
  2150. #define JOY_BUTTON30        0x20000000l
  2151. #define JOY_BUTTON31        0x40000000l
  2152. #define JOY_BUTTON32        0x80000000l
  2153.  
  2154. /* constants used with JOYINFOEX structure */
  2155. #define JOY_POVCENTERED        (WORD) -1
  2156. #define JOY_POVFORWARD        0
  2157. #define JOY_POVRIGHT        9000
  2158. #define JOY_POVBACKWARD        18000
  2159. #define JOY_POVLEFT        27000
  2160.  
  2161. #define JOY_RETURNX        0x00000001l
  2162. #define JOY_RETURNY        0x00000002l
  2163. #define JOY_RETURNZ        0x00000004l
  2164. #define JOY_RETURNR        0x00000008l
  2165. #define JOY_RETURNU        0x00000010l    /* axis 5 */
  2166. #define JOY_RETURNV        0x00000020l    /* axis 6 */
  2167. #define JOY_RETURNPOV        0x00000040l
  2168. #define JOY_RETURNBUTTONS    0x00000080l
  2169. #define JOY_RETURNRAWDATA    0x00000100l
  2170. #define JOY_RETURNPOVCTS    0x00000200l
  2171. #define JOY_RETURNCENTERED    0x00000400l
  2172. #define JOY_USEDEADZONE        0x00000800l
  2173. #define JOY_RETURNALL        (JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | \
  2174.                  JOY_RETURNR | JOY_RETURNU | JOY_RETURNV | \
  2175.                  JOY_RETURNPOV | JOY_RETURNBUTTONS)
  2176. #define JOY_CAL_READALWAYS    0x00010000l
  2177. #define JOY_CAL_READXYONLY    0x00020000l
  2178. #define JOY_CAL_READ3        0x00040000l
  2179. #define JOY_CAL_READ4        0x00080000l
  2180. #define JOY_CAL_READXONLY    0x00100000l
  2181. #define JOY_CAL_READYONLY    0x00200000l
  2182. #define JOY_CAL_READ5        0x00400000l
  2183. #define JOY_CAL_READ6        0x00800000l
  2184. #define JOY_CAL_READZONLY    0x01000000l
  2185. #define JOY_CAL_READRONLY    0x02000000l
  2186. #define JOY_CAL_READUONLY    0x04000000l
  2187. #define JOY_CAL_READVONLY    0x08000000l
  2188.  
  2189. /* joystick ID constants */
  2190. #define JOYSTICKID1         0
  2191. #define JOYSTICKID2         1
  2192.  
  2193. /* joystick driver capabilites */
  2194. #define JOYCAPS_HASZ        0x0001
  2195. #define JOYCAPS_HASR        0x0002
  2196. #define JOYCAPS_HASU        0x0004
  2197. #define JOYCAPS_HASV        0x0008
  2198. #define JOYCAPS_HASPOV        0x0010
  2199. #define JOYCAPS_POV4DIR        0x0020
  2200. #define JOYCAPS_POVCTS        0x0040
  2201.  
  2202. /* joystick device capabilities data structure */
  2203. #ifdef _WIN32
  2204.  
  2205. #ifndef UNICODE_ONLY
  2206. typedef struct tagJOYCAPSA {
  2207.     WORD    wMid;                /* manufacturer ID */
  2208.     WORD    wPid;                /* product ID */
  2209.     CHAR    szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  2210.     UINT    wXmin;               /* minimum x position value */
  2211.     UINT    wXmax;               /* maximum x position value */
  2212.     UINT    wYmin;               /* minimum y position value */
  2213.     UINT    wYmax;               /* maximum y position value */
  2214.     UINT    wZmin;               /* minimum z position value */
  2215.     UINT    wZmax;               /* maximum z position value */
  2216.     UINT    wNumButtons;         /* number of buttons */
  2217.     UINT    wPeriodMin;          /* minimum message period when captured */
  2218.     UINT    wPeriodMax;          /* maximum message period when captured */
  2219. #if (WINVER >= 0x0400)
  2220.     UINT    wRmin;               /* minimum r position value */
  2221.     UINT    wRmax;               /* maximum r position value */
  2222.     UINT    wUmin;               /* minimum u (5th axis) position value */
  2223.     UINT    wUmax;               /* maximum u (5th axis) position value */
  2224.     UINT    wVmin;               /* minimum v (6th axis) position value */
  2225.     UINT    wVmax;               /* maximum v (6th axis) position value */
  2226.     UINT    wCaps;          /* joystick capabilites */
  2227.     UINT    wMaxAxes;          /* maximum number of axes supported */
  2228.     UINT    wNumAxes;          /* number of axes in use */
  2229.     UINT    wMaxButtons;     /* maximum number of buttons supported */
  2230.     CHAR    szRegKey[MAXPNAMELEN];/* registry key */
  2231.     CHAR    szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  2232. #endif
  2233. } JOYCAPSA, *PJOYCAPSA, *NPJOYCAPSA, *LPJOYCAPSA;
  2234. #endif //!UNICODE_ONLY
  2235. #ifndef ANSI_ONLY
  2236. typedef struct tagJOYCAPSW {
  2237.     WORD    wMid;                /* manufacturer ID */
  2238.     WORD    wPid;                /* product ID */
  2239.     WCHAR   szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  2240.     UINT    wXmin;               /* minimum x position value */
  2241.     UINT    wXmax;               /* maximum x position value */
  2242.     UINT    wYmin;               /* minimum y position value */
  2243.     UINT    wYmax;               /* maximum y position value */
  2244.     UINT    wZmin;               /* minimum z position value */
  2245.     UINT    wZmax;               /* maximum z position value */
  2246.     UINT    wNumButtons;         /* number of buttons */
  2247.     UINT    wPeriodMin;          /* minimum message period when captured */
  2248.     UINT    wPeriodMax;          /* maximum message period when captured */
  2249. #if (WINVER >= 0x0400)
  2250.     UINT    wRmin;               /* minimum r position value */
  2251.     UINT    wRmax;               /* maximum r position value */
  2252.     UINT    wUmin;               /* minimum u (5th axis) position value */
  2253.     UINT    wUmax;               /* maximum u (5th axis) position value */
  2254.     UINT    wVmin;               /* minimum v (6th axis) position value */
  2255.     UINT    wVmax;               /* maximum v (6th axis) position value */
  2256.     UINT    wCaps;          /* joystick capabilites */
  2257.     UINT    wMaxAxes;          /* maximum number of axes supported */
  2258.     UINT    wNumAxes;          /* number of axes in use */
  2259.     UINT    wMaxButtons;     /* maximum number of buttons supported */
  2260.     WCHAR   szRegKey[MAXPNAMELEN];/* registry key */
  2261.     WCHAR   szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  2262. #endif
  2263. } JOYCAPSW, *PJOYCAPSW, *NPJOYCAPSW, *LPJOYCAPSW;
  2264. #endif //!ANSI_ONLY
  2265. #ifdef UNICODE
  2266. typedef JOYCAPSW JOYCAPS;
  2267. typedef PJOYCAPSW PJOYCAPS;
  2268. typedef NPJOYCAPSW NPJOYCAPS;
  2269. typedef LPJOYCAPSW LPJOYCAPS;
  2270. #else
  2271. typedef JOYCAPSA JOYCAPS;
  2272. typedef PJOYCAPSA PJOYCAPS;
  2273. typedef NPJOYCAPSA NPJOYCAPS;
  2274. typedef LPJOYCAPSA LPJOYCAPS;
  2275. #endif // UNICODE
  2276.  
  2277. #else
  2278. typedef struct joycaps_tag {
  2279.     WORD wMid;                  /* manufacturer ID */
  2280.     WORD wPid;                  /* product ID */
  2281.     char szPname[MAXPNAMELEN];  /* product name (NULL terminated string) */
  2282.     UINT wXmin;                 /* minimum x position value */
  2283.     UINT wXmax;                 /* maximum x position value */
  2284.     UINT wYmin;                 /* minimum y position value */
  2285.     UINT wYmax;                 /* maximum y position value */
  2286.     UINT wZmin;                 /* minimum z position value */
  2287.     UINT wZmax;                 /* maximum z position value */
  2288.     UINT wNumButtons;           /* number of buttons */
  2289.     UINT wPeriodMin;            /* minimum message period when captured */
  2290.     UINT wPeriodMax;            /* maximum message period when captured */
  2291. #if (WINVER >= 0x0400)
  2292.     UINT wRmin;                 /* minimum r position value */
  2293.     UINT wRmax;                 /* maximum r position value */
  2294.     UINT wUmin;                 /* minimum u (5th axis) position value */
  2295.     UINT wUmax;                 /* maximum u (5th axis) position value */
  2296.     UINT wVmin;                 /* minimum v (6th axis) position value */
  2297.     UINT wVmax;                 /* maximum v (6th axis) position value */
  2298.     UINT wCaps;                 /* joystick capabilites */
  2299.     UINT wMaxAxes;         /* maximum number of axes supported */
  2300.     UINT wNumAxes;         /* number of axes in use */
  2301.     UINT wMaxButtons;         /* maximum number of buttons supported */
  2302.     char szRegKey[MAXPNAMELEN]; /* registry key */
  2303.     char szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  2304. #endif
  2305. } JOYCAPS, *PJOYCAPS, NEAR *NPJOYCAPS, FAR *LPJOYCAPS;
  2306. #endif
  2307.  
  2308. /* joystick information data structure */
  2309. typedef struct joyinfo_tag {
  2310.     UINT wXpos;                 /* x position */
  2311.     UINT wYpos;                 /* y position */
  2312.     UINT wZpos;                 /* z position */
  2313.     UINT wButtons;              /* button states */
  2314. } JOYINFO, *PJOYINFO, NEAR *NPJOYINFO, FAR *LPJOYINFO;
  2315.  
  2316. #if(WINVER >= 0x0400)
  2317. typedef struct joyinfoex_tag {
  2318.     DWORD dwSize;         /* size of structure */
  2319.     DWORD dwFlags;         /* flags to indicate what to return */
  2320.     DWORD dwXpos;                /* x position */
  2321.     DWORD dwYpos;                /* y position */
  2322.     DWORD dwZpos;                /* z position */
  2323.     DWORD dwRpos;         /* rudder/4th axis position */
  2324.     DWORD dwUpos;         /* 5th axis position */
  2325.     DWORD dwVpos;         /* 6th axis position */
  2326.     DWORD dwButtons;             /* button states */
  2327.     DWORD dwButtonNumber;        /* current button number pressed */
  2328.     DWORD dwPOV;                 /* point of view state */
  2329.     DWORD dwReserved1;         /* reserved for communication between winmm & driver */
  2330.     DWORD dwReserved2;         /* reserved for future expansion */
  2331. } JOYINFOEX, *PJOYINFOEX, NEAR *NPJOYINFOEX, FAR *LPJOYINFOEX;
  2332. #endif /* WINVER >= 0x0400 */
  2333.  
  2334. #ifndef _WIN32_VXD
  2335.  
  2336. /* joystick function prototypes */
  2337. WINMMAPI UINT WINAPI joyGetNumDevs(void);
  2338. #ifdef _WIN32
  2339.  
  2340. #ifndef UNICODE_ONLY
  2341. WINMMAPI MMRESULT WINAPI joyGetDevCapsA(UINT uJoyID, LPJOYCAPSA pjc, UINT cbjc);
  2342. #endif //!UNICODE_ONLY
  2343. #ifndef ANSI_ONLY
  2344. WINMMAPI MMRESULT WINAPI joyGetDevCapsW(UINT uJoyID, LPJOYCAPSW pjc, UINT cbjc);
  2345. #endif //!ANSI_ONLY
  2346. #ifdef UNICODE
  2347. #define joyGetDevCaps  joyGetDevCapsW
  2348. #else
  2349. #define joyGetDevCaps  joyGetDevCapsA
  2350. #endif // !UNICODE
  2351.  
  2352. #else
  2353. MMRESULT WINAPI joyGetDevCaps(UINT uJoyID, LPJOYCAPS pjc, UINT cbjc);
  2354. #endif
  2355. WINMMAPI MMRESULT WINAPI joyGetPos(UINT uJoyID, LPJOYINFO pji);
  2356.  
  2357. #if(WINVER >= 0x0400)
  2358. WINMMAPI MMRESULT WINAPI joyGetPosEx(UINT uJoyID, LPJOYINFOEX pji);
  2359. #endif /* WINVER >= 0x0400 */
  2360.  
  2361. WINMMAPI MMRESULT WINAPI joyGetThreshold(UINT uJoyID, LPUINT puThreshold);
  2362. WINMMAPI MMRESULT WINAPI joyReleaseCapture(UINT uJoyID);
  2363. WINMMAPI MMRESULT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
  2364.     BOOL fChanged);
  2365. WINMMAPI MMRESULT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
  2366.  
  2367. #endif /* ifndef _WIN32_VXD */
  2368.  
  2369. #endif  /* ifndef MMNOJOY */
  2370.  
  2371. #ifndef MMNOMMIO
  2372. #ifndef _WIN32_VXD
  2373. /****************************************************************************
  2374.  
  2375.             Multimedia File I/O support
  2376.  
  2377. ****************************************************************************/
  2378.  
  2379. /* MMIO error return values */
  2380. #define MMIOERR_BASE                256
  2381. #define MMIOERR_FILENOTFOUND        (MMIOERR_BASE + 1)  /* file not found */
  2382. #define MMIOERR_OUTOFMEMORY         (MMIOERR_BASE + 2)  /* out of memory */
  2383. #define MMIOERR_CANNOTOPEN          (MMIOERR_BASE + 3)  /* cannot open */
  2384. #define MMIOERR_CANNOTCLOSE         (MMIOERR_BASE + 4)  /* cannot close */
  2385. #define MMIOERR_CANNOTREAD          (MMIOERR_BASE + 5)  /* cannot read */
  2386. #define MMIOERR_CANNOTWRITE         (MMIOERR_BASE + 6)  /* cannot write */
  2387. #define MMIOERR_CANNOTSEEK          (MMIOERR_BASE + 7)  /* cannot seek */
  2388. #define MMIOERR_CANNOTEXPAND        (MMIOERR_BASE + 8)  /* cannot expand file */
  2389. #define MMIOERR_CHUNKNOTFOUND       (MMIOERR_BASE + 9)  /* chunk not found */
  2390. #define MMIOERR_UNBUFFERED          (MMIOERR_BASE + 10) /*  */
  2391. #define MMIOERR_PATHNOTFOUND        (MMIOERR_BASE + 11) /* path incorrect */
  2392. #define MMIOERR_ACCESSDENIED        (MMIOERR_BASE + 12) /* file was protected */
  2393. #define MMIOERR_SHARINGVIOLATION    (MMIOERR_BASE + 13) /* file in use */
  2394. #define MMIOERR_NETWORKERROR        (MMIOERR_BASE + 14) /* network not responding */
  2395. #define MMIOERR_TOOMANYOPENFILES    (MMIOERR_BASE + 15) /* no more file handles  */
  2396. #define MMIOERR_INVALIDFILE         (MMIOERR_BASE + 16) /* default error file error */
  2397.  
  2398. /* MMIO constants */
  2399. #define CFSEPCHAR       '+'             /* compound file name separator char. */
  2400.  
  2401. /* MMIO data types */
  2402. typedef DWORD           FOURCC;         /* a four character code */
  2403. typedef char _huge *    HPSTR;          /* a huge version of LPSTR */
  2404. DECLARE_HANDLE(HMMIO);                  /* a handle to an open file */
  2405. typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMsg,
  2406.         LPARAM lParam1, LPARAM lParam2);
  2407. typedef MMIOPROC FAR *LPMMIOPROC;
  2408.  
  2409. /* general MMIO information data structure */
  2410. typedef struct _MMIOINFO
  2411. {
  2412.     /* general fields */
  2413.     DWORD           dwFlags;        /* general status flags */
  2414.     FOURCC          fccIOProc;      /* pointer to I/O procedure */
  2415.     LPMMIOPROC      pIOProc;        /* pointer to I/O procedure */
  2416.     UINT            wErrorRet;      /* place for error to be returned */
  2417.     HTASK           htask;          /* alternate local task */
  2418.  
  2419.     /* fields maintained by MMIO functions during buffered I/O */
  2420.     LONG            cchBuffer;      /* size of I/O buffer (or 0L) */
  2421.     HPSTR           pchBuffer;      /* start of I/O buffer (or NULL) */
  2422.     HPSTR           pchNext;        /* pointer to next byte to read/write */
  2423.     HPSTR           pchEndRead;     /* pointer to last valid byte to read */
  2424.     HPSTR           pchEndWrite;    /* pointer to last byte to write */
  2425.     LONG            lBufOffset;     /* disk offset of start of buffer */
  2426.  
  2427.     /* fields maintained by I/O procedure */
  2428.     LONG            lDiskOffset;    /* disk offset of next read or write */
  2429.     DWORD           adwInfo[3];     /* data specific to type of MMIOPROC */
  2430.  
  2431.     /* other fields maintained by MMIO */
  2432.     DWORD           dwReserved1;    /* reserved for MMIO use */
  2433.     DWORD           dwReserved2;    /* reserved for MMIO use */
  2434.     HMMIO           hmmio;          /* handle to open file */
  2435. } MMIOINFO, *PMMIOINFO, NEAR *NPMMIOINFO, FAR *LPMMIOINFO;
  2436. typedef const MMIOINFO FAR *LPCMMIOINFO;
  2437.  
  2438. /* RIFF chunk information data structure */
  2439. typedef struct _MMCKINFO
  2440. {
  2441.     FOURCC          ckid;           /* chunk ID */
  2442.     DWORD           cksize;         /* chunk size */
  2443.     FOURCC          fccType;        /* form type or list type */
  2444.     DWORD           dwDataOffset;   /* offset of data portion of chunk */
  2445.     DWORD           dwFlags;        /* flags used by MMIO functions */
  2446. } MMCKINFO, *PMMCKINFO, NEAR *NPMMCKINFO, FAR *LPMMCKINFO;
  2447. typedef const MMCKINFO *LPCMMCKINFO;
  2448.  
  2449. /* bit field masks */
  2450. #define MMIO_RWMODE     0x00000003      /* open file for reading/writing/both */
  2451. #define MMIO_SHAREMODE  0x00000070      /* file sharing mode number */
  2452.  
  2453. /* constants for dwFlags field of MMIOINFO */
  2454. #define MMIO_CREATE     0x00001000      /* create new file (or truncate file) */
  2455. #define MMIO_PARSE      0x00000100      /* parse new file returning path */
  2456. #define MMIO_DELETE     0x00000200      /* create new file (or truncate file) */
  2457. #define MMIO_EXIST      0x00004000      /* checks for existence of file */
  2458. #define MMIO_ALLOCBUF   0x00010000      /* mmioOpen() should allocate a buffer */
  2459. #define MMIO_GETTEMP    0x00020000      /* mmioOpen() should retrieve temp name */
  2460.  
  2461. #define MMIO_DIRTY      0x10000000      /* I/O buffer is dirty */
  2462.  
  2463. /* read/write mode numbers (bit field MMIO_RWMODE) */
  2464. #define MMIO_READ       0x00000000      /* open file for reading only */
  2465. #define MMIO_WRITE      0x00000001      /* open file for writing only */
  2466. #define MMIO_READWRITE  0x00000002      /* open file for reading and writing */
  2467.  
  2468. /* share mode numbers (bit field MMIO_SHAREMODE) */
  2469. #define MMIO_COMPAT     0x00000000      /* compatibility mode */
  2470. #define MMIO_EXCLUSIVE  0x00000010      /* exclusive-access mode */
  2471. #define MMIO_DENYWRITE  0x00000020      /* deny writing to other processes */
  2472. #define MMIO_DENYREAD   0x00000030      /* deny reading to other processes */
  2473. #define MMIO_DENYNONE   0x00000040      /* deny nothing to other processes */
  2474.  
  2475. /* various MMIO flags */
  2476. #define MMIO_FHOPEN             0x0010  /* mmioClose: keep file handle open */
  2477. #define MMIO_EMPTYBUF           0x0010  /* mmioFlush: empty the I/O buffer */
  2478. #define MMIO_TOUPPER            0x0010  /* mmioStringToFOURCC: to u-case */
  2479. #define MMIO_INSTALLPROC    0x00010000  /* mmioInstallIOProc: install MMIOProc */
  2480. #define MMIO_GLOBALPROC     0x10000000  /* mmioInstallIOProc: install globally */
  2481. #define MMIO_REMOVEPROC     0x00020000  /* mmioInstallIOProc: remove MMIOProc */
  2482. #define MMIO_UNICODEPROC    0x01000000  /* mmioInstallIOProc: Unicode MMIOProc */
  2483. #define MMIO_FINDPROC       0x00040000  /* mmioInstallIOProc: find an MMIOProc */
  2484. #define MMIO_FINDCHUNK          0x0010  /* mmioDescend: find a chunk by ID */
  2485. #define MMIO_FINDRIFF           0x0020  /* mmioDescend: find a LIST chunk */
  2486. #define MMIO_FINDLIST           0x0040  /* mmioDescend: find a RIFF chunk */
  2487. #define MMIO_CREATERIFF         0x0020  /* mmioCreateChunk: make a LIST chunk */
  2488. #define MMIO_CREATELIST         0x0040  /* mmioCreateChunk: make a RIFF chunk */
  2489.  
  2490. /* message numbers for MMIOPROC I/O procedure functions */
  2491. #define MMIOM_READ      MMIO_READ       /* read */
  2492. #define MMIOM_WRITE    MMIO_WRITE       /* write */
  2493. #define MMIOM_SEEK              2       /* seek to a new position in file */
  2494. #define MMIOM_OPEN              3       /* open file */
  2495. #define MMIOM_CLOSE             4       /* close file */
  2496. #define MMIOM_WRITEFLUSH        5       /* write and flush */
  2497.  
  2498. #if (WINVER >= 0x030a)
  2499. #define MMIOM_RENAME            6       /* rename specified file */
  2500. #endif /* ifdef WINVER >= 0x030a */
  2501.  
  2502. #define MMIOM_USER         0x8000       /* beginning of user-defined messages */
  2503.  
  2504. /* standard four character codes */
  2505. #define FOURCC_RIFF     mmioFOURCC('R', 'I', 'F', 'F')
  2506. #define FOURCC_LIST     mmioFOURCC('L', 'I', 'S', 'T')
  2507.  
  2508. /* four character codes used to identify standard built-in I/O procedures */
  2509. #define FOURCC_DOS      mmioFOURCC('D', 'O', 'S', ' ')
  2510. #define FOURCC_MEM      mmioFOURCC('M', 'E', 'M', ' ')
  2511.  
  2512. /* flags for mmioSeek() */
  2513. #ifndef SEEK_SET
  2514. #define SEEK_SET        0               /* seek to an absolute position */
  2515. #define SEEK_CUR        1               /* seek relative to current position */
  2516. #define SEEK_END        2               /* seek relative to end of file */
  2517. #endif  /* ifndef SEEK_SET */
  2518.  
  2519. /* other constants */
  2520. #define MMIO_DEFAULTBUFFER      8192    /* default buffer size */
  2521.  
  2522. /* MMIO macros */
  2523. #define mmioFOURCC(ch0, ch1, ch2, ch3)  MAKEFOURCC(ch0, ch1, ch2, ch3)
  2524.  
  2525. /* MMIO function prototypes */
  2526. #ifdef _WIN32
  2527.  
  2528. #ifndef UNICODE_ONLY
  2529. WINMMAPI FOURCC WINAPI mmioStringToFOURCCA(LPCSTR sz, UINT uFlags);
  2530. #endif //!UNICODE_ONLY
  2531. #ifndef ANSI_ONLY
  2532. WINMMAPI FOURCC WINAPI mmioStringToFOURCCW(LPCWSTR sz, UINT uFlags);
  2533. #endif //!ANSI_ONLY
  2534. #ifdef UNICODE
  2535. #define mmioStringToFOURCC  mmioStringToFOURCCW
  2536. #else
  2537. #define mmioStringToFOURCC  mmioStringToFOURCCA
  2538. #endif // !UNICODE
  2539. #ifndef UNICODE_ONLY
  2540. WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2541. #endif //!UNICODE_ONLY
  2542. #ifndef ANSI_ONLY
  2543. WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2544. #endif //!ANSI_ONLY
  2545. #ifdef UNICODE
  2546. #define mmioInstallIOProc  mmioInstallIOProcW
  2547. #else
  2548. #define mmioInstallIOProc  mmioInstallIOProcA
  2549. #endif // !UNICODE
  2550. #ifndef UNICODE_ONLY
  2551. WINMMAPI HMMIO WINAPI mmioOpenA(LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2552. #endif //!UNICODE_ONLY
  2553. #ifndef ANSI_ONLY
  2554. WINMMAPI HMMIO WINAPI mmioOpenW(LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2555. #endif //!ANSI_ONLY
  2556. #ifdef UNICODE
  2557. #define mmioOpen  mmioOpenW
  2558. #else
  2559. #define mmioOpen  mmioOpenA
  2560. #endif // !UNICODE
  2561. #ifndef UNICODE_ONLY
  2562. WINMMAPI MMRESULT WINAPI mmioRenameA(LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  2563. #endif //!UNICODE_ONLY
  2564. #ifndef ANSI_ONLY
  2565. WINMMAPI MMRESULT WINAPI mmioRenameW(LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  2566. #endif //!ANSI_ONLY
  2567. #ifdef UNICODE
  2568. #define mmioRename  mmioRenameW
  2569. #else
  2570. #define mmioRename  mmioRenameA
  2571. #endif // !UNICODE
  2572. #else
  2573. FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
  2574. LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2575. HMMIO WINAPI mmioOpen(LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2576. #if (WINVER >= 0x030a)
  2577. MMRESULT WINAPI mmioRename(LPCSTR pszFileName, LPCSTR pszNewFileName, const MMIOINFO FAR* pmmioinfo, DWORD fdwRename);
  2578. #endif /* ifdef WINVER >= 0x030a */
  2579. #endif
  2580.  
  2581. WINMMAPI MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT fuClose);
  2582. WINMMAPI LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  2583. WINMMAPI LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch);
  2584. WINMMAPI LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  2585. WINMMAPI MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo);
  2586. WINMMAPI MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo);
  2587. WINMMAPI MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  2588.     UINT fuBuffer);
  2589. WINMMAPI MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT fuFlush);
  2590. WINMMAPI MMRESULT WINAPI mmioAdvance(HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance);
  2591. WINMMAPI LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMsg,
  2592.     LPARAM lParam1, LPARAM lParam2);
  2593. WINMMAPI MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO pmmcki,
  2594.     const MMCKINFO FAR* pmmckiParent, UINT fuDescend);
  2595. WINMMAPI MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend);
  2596. WINMMAPI MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate);
  2597.  
  2598. #endif  /* ifndef _WIN32_VXD */
  2599. #endif  /* ifndef MMNOMMIO */
  2600.  
  2601. #ifndef MMNOMCI
  2602. #ifndef _WIN32_VXD
  2603. /****************************************************************************
  2604.  
  2605.                 MCI support
  2606.  
  2607. ****************************************************************************/
  2608.  
  2609. #ifndef _MCIERROR_              /* MCIERROR is defined in some post 3.1 apps */
  2610. #define _MCIERROR_
  2611. typedef DWORD   MCIERROR;       /* error return code, 0 means no error */
  2612. #endif
  2613.  
  2614. #ifndef _MCIDEVICEID_           /* Same with MCIDEVICEID */
  2615. #define _MCIDEVICEID_
  2616. typedef UINT    MCIDEVICEID;    /* MCI device ID type */
  2617. #endif
  2618.  
  2619. typedef UINT (CALLBACK *YIELDPROC)(MCIDEVICEID mciId, DWORD dwYieldData);
  2620.  
  2621. /* MCI function prototypes */
  2622. #ifdef _WIN32
  2623.  
  2624. #ifndef UNICODE_ONLY
  2625. WINMMAPI MCIERROR WINAPI mciSendCommandA(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2626. #endif //!UNICODE_ONLY
  2627. #ifndef ANSI_ONLY
  2628. WINMMAPI MCIERROR WINAPI mciSendCommandW(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2629. #endif //!ANSI_ONLY
  2630. #ifdef UNICODE
  2631. #define mciSendCommand  mciSendCommandW
  2632. #else
  2633. #define mciSendCommand  mciSendCommandA
  2634. #endif // !UNICODE
  2635. #ifndef UNICODE_ONLY
  2636. WINMMAPI MCIERROR  WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2637. #endif //!UNICODE_ONLY
  2638. #ifndef ANSI_ONLY
  2639. WINMMAPI MCIERROR  WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2640. #endif //!ANSI_ONLY
  2641. #ifdef UNICODE
  2642. #define mciSendString  mciSendStringW
  2643. #else
  2644. #define mciSendString  mciSendStringA
  2645. #endif // !UNICODE
  2646. #ifndef UNICODE_ONLY
  2647. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDA(LPCSTR pszDevice);
  2648. #endif //!UNICODE_ONLY
  2649. #ifndef ANSI_ONLY
  2650. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDW(LPCWSTR pszDevice);
  2651. #endif //!ANSI_ONLY
  2652. #ifdef UNICODE
  2653. #define mciGetDeviceID  mciGetDeviceIDW
  2654. #else
  2655. #define mciGetDeviceID  mciGetDeviceIDA
  2656. #endif // !UNICODE
  2657. #ifndef UNICODE_ONLY
  2658. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA(DWORD dwElementID, LPCSTR lpstrType );
  2659. #endif //!UNICODE_ONLY
  2660. #ifndef ANSI_ONLY
  2661. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW(DWORD dwElementID, LPCWSTR lpstrType );
  2662. #endif //!ANSI_ONLY
  2663. #ifdef UNICODE
  2664. #define mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDW
  2665. #else
  2666. #define mciGetDeviceIDFromElementID  mciGetDeviceIDFromElementIDA
  2667. #endif // !UNICODE
  2668. #ifndef UNICODE_ONLY
  2669. WINMMAPI BOOL WINAPI mciGetErrorStringA(MCIERROR mcierr, LPSTR pszText, UINT cchText);
  2670. #endif //!UNICODE_ONLY
  2671. #ifndef ANSI_ONLY
  2672. WINMMAPI BOOL WINAPI mciGetErrorStringW(MCIERROR mcierr, LPWSTR pszText, UINT cchText);
  2673. #endif //!ANSI_ONLY
  2674. #ifdef UNICODE
  2675. #define mciGetErrorString  mciGetErrorStringW
  2676. #else
  2677. #define mciGetErrorString  mciGetErrorStringA
  2678. #endif // !UNICODE
  2679.  
  2680. #else
  2681. MCIERROR WINAPI mciSendCommand(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2682. MCIERROR  WINAPI mciSendString(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2683. MCIDEVICEID WINAPI mciGetDeviceID(LPCSTR pszDevice);
  2684. BOOL WINAPI mciGetErrorString(MCIERROR mcierr, LPSTR pszText, UINT cchText);
  2685. #endif
  2686.  
  2687. WINMMAPI BOOL WINAPI mciSetYieldProc(MCIDEVICEID mciId, YIELDPROC fpYieldProc,
  2688.     DWORD dwYieldData);
  2689.  
  2690. #if (WINVER >= 0x030a)
  2691. WINMMAPI HTASK WINAPI mciGetCreatorTask(MCIDEVICEID mciId);
  2692. WINMMAPI YIELDPROC WINAPI mciGetYieldProc(MCIDEVICEID mciId, LPDWORD pdwYieldData);
  2693. #endif /* ifdef WINVER >= 0x030a */
  2694.  
  2695. #if (WINVER < 0x030a)
  2696. WINMMAPI BOOL WINAPI mciExecute(LPCSTR pszCommand);
  2697. #endif /* ifdef WINVER < 0x030a */
  2698.  
  2699. /* MCI error return values */
  2700. #define MCIERR_INVALID_DEVICE_ID        (MCIERR_BASE + 1)
  2701. #define MCIERR_UNRECOGNIZED_KEYWORD     (MCIERR_BASE + 3)
  2702. #define MCIERR_UNRECOGNIZED_COMMAND     (MCIERR_BASE + 5)
  2703. #define MCIERR_HARDWARE                 (MCIERR_BASE + 6)
  2704. #define MCIERR_INVALID_DEVICE_NAME      (MCIERR_BASE + 7)
  2705. #define MCIERR_OUT_OF_MEMORY            (MCIERR_BASE + 8)
  2706. #define MCIERR_DEVICE_OPEN              (MCIERR_BASE + 9)
  2707. #define MCIERR_CANNOT_LOAD_DRIVER       (MCIERR_BASE + 10)
  2708. #define MCIERR_MISSING_COMMAND_STRING   (MCIERR_BASE + 11)
  2709. #define MCIERR_PARAM_OVERFLOW           (MCIERR_BASE + 12)
  2710. #define MCIERR_MISSING_STRING_ARGUMENT  (MCIERR_BASE + 13)
  2711. #define MCIERR_BAD_INTEGER              (MCIERR_BASE + 14)
  2712. #define MCIERR_PARSER_INTERNAL          (MCIERR_BASE + 15)
  2713. #define MCIERR_DRIVER_INTERNAL          (MCIERR_BASE + 16)
  2714. #define MCIERR_MISSING_PARAMETER        (MCIERR_BASE + 17)
  2715. #define MCIERR_UNSUPPORTED_FUNCTION     (MCIERR_BASE + 18)
  2716. #define MCIERR_FILE_NOT_FOUND           (MCIERR_BASE + 19)
  2717. #define MCIERR_DEVICE_NOT_READY         (MCIERR_BASE + 20)
  2718. #define MCIERR_INTERNAL                 (MCIERR_BASE + 21)
  2719. #define MCIERR_DRIVER                   (MCIERR_BASE + 22)
  2720. #define MCIERR_CANNOT_USE_ALL           (MCIERR_BASE + 23)
  2721. #define MCIERR_MULTIPLE                 (MCIERR_BASE + 24)
  2722. #define MCIERR_EXTENSION_NOT_FOUND      (MCIERR_BASE + 25)
  2723. #define MCIERR_OUTOFRANGE               (MCIERR_BASE + 26)
  2724. #define MCIERR_FLAGS_NOT_COMPATIBLE     (MCIERR_BASE + 28)
  2725. #define MCIERR_FILE_NOT_SAVED           (MCIERR_BASE + 30)
  2726. #define MCIERR_DEVICE_TYPE_REQUIRED     (MCIERR_BASE + 31)
  2727. #define MCIERR_DEVICE_LOCKED            (MCIERR_BASE + 32)
  2728. #define MCIERR_DUPLICATE_ALIAS          (MCIERR_BASE + 33)
  2729. #define MCIERR_BAD_CONSTANT             (MCIERR_BASE + 34)
  2730. #define MCIERR_MUST_USE_SHAREABLE       (MCIERR_BASE + 35)
  2731. #define MCIERR_MISSING_DEVICE_NAME      (MCIERR_BASE + 36)
  2732. #define MCIERR_BAD_TIME_FORMAT          (MCIERR_BASE + 37)
  2733. #define MCIERR_NO_CLOSING_QUOTE         (MCIERR_BASE + 38)
  2734. #define MCIERR_DUPLICATE_FLAGS          (MCIERR_BASE + 39)
  2735. #define MCIERR_INVALID_FILE             (MCIERR_BASE + 40)
  2736. #define MCIERR_NULL_PARAMETER_BLOCK     (MCIERR_BASE + 41)
  2737. #define MCIERR_UNNAMED_RESOURCE         (MCIERR_BASE + 42)
  2738. #define MCIERR_NEW_REQUIRES_ALIAS       (MCIERR_BASE + 43)
  2739. #define MCIERR_NOTIFY_ON_AUTO_OPEN      (MCIERR_BASE + 44)
  2740. #define MCIERR_NO_ELEMENT_ALLOWED       (MCIERR_BASE + 45)
  2741. #define MCIERR_NONAPPLICABLE_FUNCTION   (MCIERR_BASE + 46)
  2742. #define MCIERR_ILLEGAL_FOR_AUTO_OPEN    (MCIERR_BASE + 47)
  2743. #define MCIERR_FILENAME_REQUIRED        (MCIERR_BASE + 48)
  2744. #define MCIERR_EXTRA_CHARACTERS         (MCIERR_BASE + 49)
  2745. #define MCIERR_DEVICE_NOT_INSTALLED     (MCIERR_BASE + 50)
  2746. #define MCIERR_GET_CD                   (MCIERR_BASE + 51)
  2747. #define MCIERR_SET_CD                   (MCIERR_BASE + 52)
  2748. #define MCIERR_SET_DRIVE                (MCIERR_BASE + 53)
  2749. #define MCIERR_DEVICE_LENGTH            (MCIERR_BASE + 54)
  2750. #define MCIERR_DEVICE_ORD_LENGTH        (MCIERR_BASE + 55)
  2751. #define MCIERR_NO_INTEGER               (MCIERR_BASE + 56)
  2752.  
  2753. #define MCIERR_WAVE_OUTPUTSINUSE        (MCIERR_BASE + 64)
  2754. #define MCIERR_WAVE_SETOUTPUTINUSE      (MCIERR_BASE + 65)
  2755. #define MCIERR_WAVE_INPUTSINUSE         (MCIERR_BASE + 66)
  2756. #define MCIERR_WAVE_SETINPUTINUSE       (MCIERR_BASE + 67)
  2757. #define MCIERR_WAVE_OUTPUTUNSPECIFIED   (MCIERR_BASE + 68)
  2758. #define MCIERR_WAVE_INPUTUNSPECIFIED    (MCIERR_BASE + 69)
  2759. #define MCIERR_WAVE_OUTPUTSUNSUITABLE   (MCIERR_BASE + 70)
  2760. #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
  2761. #define MCIERR_WAVE_INPUTSUNSUITABLE    (MCIERR_BASE + 72)
  2762. #define MCIERR_WAVE_SETINPUTUNSUITABLE  (MCIERR_BASE + 73)
  2763.  
  2764. #define MCIERR_SEQ_DIV_INCOMPATIBLE     (MCIERR_BASE + 80)
  2765. #define MCIERR_SEQ_PORT_INUSE           (MCIERR_BASE + 81)
  2766. #define MCIERR_SEQ_PORT_NONEXISTENT     (MCIERR_BASE + 82)
  2767. #define MCIERR_SEQ_PORT_MAPNODEVICE     (MCIERR_BASE + 83)
  2768. #define MCIERR_SEQ_PORT_MISCERROR       (MCIERR_BASE + 84)
  2769. #define MCIERR_SEQ_TIMER                (MCIERR_BASE + 85)
  2770. #define MCIERR_SEQ_PORTUNSPECIFIED      (MCIERR_BASE + 86)
  2771. #define MCIERR_SEQ_NOMIDIPRESENT        (MCIERR_BASE + 87)
  2772.  
  2773. #define MCIERR_NO_WINDOW                (MCIERR_BASE + 90)
  2774. #define MCIERR_CREATEWINDOW             (MCIERR_BASE + 91)
  2775. #define MCIERR_FILE_READ                (MCIERR_BASE + 92)
  2776. #define MCIERR_FILE_WRITE               (MCIERR_BASE + 93)
  2777.  
  2778. #define MCIERR_NO_IDENTITY              (MCIERR_BASE + 94)
  2779.  
  2780. /* all custom device driver errors must be >= than this value */
  2781. #define MCIERR_CUSTOM_DRIVER_BASE       (MCIERR_BASE + 256)
  2782.  
  2783. #define MCI_FIRST                       DRV_MCI_FIRST   /* 0x0800 */
  2784. /* MCI command message identifiers */
  2785. #define MCI_OPEN                        0x0803
  2786. #define MCI_CLOSE                       0x0804
  2787. #define MCI_ESCAPE                      0x0805
  2788. #define MCI_PLAY                        0x0806
  2789. #define MCI_SEEK                        0x0807
  2790. #define MCI_STOP                        0x0808
  2791. #define MCI_PAUSE                       0x0809
  2792. #define MCI_INFO                        0x080A
  2793. #define MCI_GETDEVCAPS                  0x080B
  2794. #define MCI_SPIN                        0x080C
  2795. #define MCI_SET                         0x080D
  2796. #define MCI_STEP                        0x080E
  2797. #define MCI_RECORD                      0x080F
  2798. #define MCI_SYSINFO                     0x0810
  2799. #define MCI_BREAK                       0x0811
  2800. #define MCI_SAVE                        0x0813
  2801. #define MCI_STATUS                      0x0814
  2802. #define MCI_CUE                         0x0830
  2803. #define MCI_REALIZE                     0x0840
  2804. #define MCI_WINDOW                      0x0841
  2805. #define MCI_PUT                         0x0842
  2806. #define MCI_WHERE                       0x0843
  2807. #define MCI_FREEZE                      0x0844
  2808. #define MCI_UNFREEZE                    0x0845
  2809. #define MCI_LOAD                        0x0850
  2810. #define MCI_CUT                         0x0851
  2811. #define MCI_COPY                        0x0852
  2812. #define MCI_PASTE                       0x0853
  2813. #define MCI_UPDATE                      0x0854
  2814. #define MCI_RESUME                      0x0855
  2815. #define MCI_DELETE                      0x0856
  2816.  
  2817. /* all custom MCI command messages must be >= than this value */
  2818. #define MCI_USER_MESSAGES               (DRV_MCI_FIRST + 0x400)
  2819. #define MCI_LAST                        0x0FFF
  2820.  
  2821. /* device ID for "all devices" */
  2822. #define MCI_ALL_DEVICE_ID               ((MCIDEVICEID)-1)
  2823.  
  2824. /* constants for predefined MCI device types */
  2825. #define MCI_DEVTYPE_VCR                 513 /* (MCI_STRING_OFFSET + 1) */
  2826. #define MCI_DEVTYPE_VIDEODISC           514 /* (MCI_STRING_OFFSET + 2) */
  2827. #define MCI_DEVTYPE_OVERLAY             515 /* (MCI_STRING_OFFSET + 3) */
  2828. #define MCI_DEVTYPE_CD_AUDIO            516 /* (MCI_STRING_OFFSET + 4) */
  2829. #define MCI_DEVTYPE_DAT                 517 /* (MCI_STRING_OFFSET + 5) */
  2830. #define MCI_DEVTYPE_SCANNER             518 /* (MCI_STRING_OFFSET + 6) */
  2831. #define MCI_DEVTYPE_ANIMATION           519 /* (MCI_STRING_OFFSET + 7) */
  2832. #define MCI_DEVTYPE_DIGITAL_VIDEO       520 /* (MCI_STRING_OFFSET + 8) */
  2833. #define MCI_DEVTYPE_OTHER               521 /* (MCI_STRING_OFFSET + 9) */
  2834. #define MCI_DEVTYPE_WAVEFORM_AUDIO      522 /* (MCI_STRING_OFFSET + 10) */
  2835. #define MCI_DEVTYPE_SEQUENCER           523 /* (MCI_STRING_OFFSET + 11) */
  2836.  
  2837. #define MCI_DEVTYPE_FIRST               MCI_DEVTYPE_VCR
  2838. #define MCI_DEVTYPE_LAST                MCI_DEVTYPE_SEQUENCER
  2839.  
  2840. #define MCI_DEVTYPE_FIRST_USER          0x1000
  2841. /* return values for 'status mode' command */
  2842. #define MCI_MODE_NOT_READY              (MCI_STRING_OFFSET + 12)
  2843. #define MCI_MODE_STOP                   (MCI_STRING_OFFSET + 13)
  2844. #define MCI_MODE_PLAY                   (MCI_STRING_OFFSET + 14)
  2845. #define MCI_MODE_RECORD                 (MCI_STRING_OFFSET + 15)
  2846. #define MCI_MODE_SEEK                   (MCI_STRING_OFFSET + 16)
  2847. #define MCI_MODE_PAUSE                  (MCI_STRING_OFFSET + 17)
  2848. #define MCI_MODE_OPEN                   (MCI_STRING_OFFSET + 18)
  2849.  
  2850. /* constants used in 'set time format' and 'status time format' commands */
  2851. #define MCI_FORMAT_MILLISECONDS         0
  2852. #define MCI_FORMAT_HMS                  1
  2853. #define MCI_FORMAT_MSF                  2
  2854. #define MCI_FORMAT_FRAMES               3
  2855. #define MCI_FORMAT_SMPTE_24             4
  2856. #define MCI_FORMAT_SMPTE_25             5
  2857. #define MCI_FORMAT_SMPTE_30             6
  2858. #define MCI_FORMAT_SMPTE_30DROP         7
  2859. #define MCI_FORMAT_BYTES                8
  2860. #define MCI_FORMAT_SAMPLES              9
  2861. #define MCI_FORMAT_TMSF                 10
  2862.  
  2863. /* MCI time format conversion macros */
  2864. #define MCI_MSF_MINUTE(msf)             ((BYTE)(msf))
  2865. #define MCI_MSF_SECOND(msf)             ((BYTE)(((WORD)(msf)) >> 8))
  2866. #define MCI_MSF_FRAME(msf)              ((BYTE)((msf)>>16))
  2867.  
  2868. #define MCI_MAKE_MSF(m, s, f)           ((DWORD)(((BYTE)(m) | \
  2869.                           ((WORD)(s)<<8)) | \
  2870.                          (((DWORD)(BYTE)(f))<<16)))
  2871.  
  2872. #define MCI_TMSF_TRACK(tmsf)            ((BYTE)(tmsf))
  2873. #define MCI_TMSF_MINUTE(tmsf)           ((BYTE)(((WORD)(tmsf)) >> 8))
  2874. #define MCI_TMSF_SECOND(tmsf)           ((BYTE)((tmsf)>>16))
  2875. #define MCI_TMSF_FRAME(tmsf)            ((BYTE)((tmsf)>>24))
  2876.  
  2877. #define MCI_MAKE_TMSF(t, m, s, f)       ((DWORD)(((BYTE)(t) | \
  2878.                           ((WORD)(m)<<8)) | \
  2879.                          (((DWORD)(BYTE)(s) | \
  2880.                            ((WORD)(f)<<8))<<16)))
  2881.  
  2882. #define MCI_HMS_HOUR(hms)               ((BYTE)(hms))
  2883. #define MCI_HMS_MINUTE(hms)             ((BYTE)(((WORD)(hms)) >> 8))
  2884. #define MCI_HMS_SECOND(hms)             ((BYTE)((hms)>>16))
  2885.  
  2886. #define MCI_MAKE_HMS(h, m, s)           ((DWORD)(((BYTE)(h) | \
  2887.                           ((WORD)(m)<<8)) | \
  2888.                          (((DWORD)(BYTE)(s))<<16)))
  2889.  
  2890. /* flags for wParam of MM_MCINOTIFY message */
  2891. #define MCI_NOTIFY_SUCCESSFUL           0x0001
  2892. #define MCI_NOTIFY_SUPERSEDED           0x0002
  2893. #define MCI_NOTIFY_ABORTED              0x0004
  2894. #define MCI_NOTIFY_FAILURE              0x0008
  2895.  
  2896. /* common flags for dwFlags parameter of MCI command messages */
  2897. #define MCI_NOTIFY                      0x00000001L
  2898. #define MCI_WAIT                        0x00000002L
  2899. #define MCI_FROM                        0x00000004L
  2900. #define MCI_TO                          0x00000008L
  2901. #define MCI_TRACK                       0x00000010L
  2902.  
  2903. /* flags for dwFlags parameter of MCI_OPEN command message */
  2904. #define MCI_OPEN_SHAREABLE              0x00000100L
  2905. #define MCI_OPEN_ELEMENT                0x00000200L
  2906. #define MCI_OPEN_ALIAS                  0x00000400L
  2907. #define MCI_OPEN_ELEMENT_ID             0x00000800L
  2908. #define MCI_OPEN_TYPE_ID                0x00001000L
  2909. #define MCI_OPEN_TYPE                   0x00002000L
  2910.  
  2911. /* flags for dwFlags parameter of MCI_SEEK command message */
  2912. #define MCI_SEEK_TO_START               0x00000100L
  2913. #define MCI_SEEK_TO_END                 0x00000200L
  2914.  
  2915. /* flags for dwFlags parameter of MCI_STATUS command message */
  2916. #define MCI_STATUS_ITEM                 0x00000100L
  2917. #define MCI_STATUS_START                0x00000200L
  2918.  
  2919. /* flags for dwItem field of the MCI_STATUS_PARMS parameter block */
  2920. #define MCI_STATUS_LENGTH               0x00000001L
  2921. #define MCI_STATUS_POSITION             0x00000002L
  2922. #define MCI_STATUS_NUMBER_OF_TRACKS     0x00000003L
  2923. #define MCI_STATUS_MODE                 0x00000004L
  2924. #define MCI_STATUS_MEDIA_PRESENT        0x00000005L
  2925. #define MCI_STATUS_TIME_FORMAT          0x00000006L
  2926. #define MCI_STATUS_READY                0x00000007L
  2927. #define MCI_STATUS_CURRENT_TRACK        0x00000008L
  2928.  
  2929. /* flags for dwFlags parameter of MCI_INFO command message */
  2930. #define MCI_INFO_PRODUCT                0x00000100L
  2931. #define MCI_INFO_FILE                   0x00000200L
  2932. #define MCI_INFO_MEDIA_UPC              0x00000400L
  2933. #define MCI_INFO_MEDIA_IDENTITY         0x00000800L
  2934. #define MCI_INFO_NAME                   0x00001000L
  2935. #define MCI_INFO_COPYRIGHT              0x00002000L
  2936.  
  2937. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  2938. #define MCI_GETDEVCAPS_ITEM             0x00000100L
  2939.  
  2940. /* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */
  2941. #define MCI_GETDEVCAPS_CAN_RECORD       0x00000001L
  2942. #define MCI_GETDEVCAPS_HAS_AUDIO        0x00000002L
  2943. #define MCI_GETDEVCAPS_HAS_VIDEO        0x00000003L
  2944. #define MCI_GETDEVCAPS_DEVICE_TYPE      0x00000004L
  2945. #define MCI_GETDEVCAPS_USES_FILES       0x00000005L
  2946. #define MCI_GETDEVCAPS_COMPOUND_DEVICE  0x00000006L
  2947. #define MCI_GETDEVCAPS_CAN_EJECT        0x00000007L
  2948. #define MCI_GETDEVCAPS_CAN_PLAY         0x00000008L
  2949. #define MCI_GETDEVCAPS_CAN_SAVE         0x00000009L
  2950.  
  2951. /* flags for dwFlags parameter of MCI_SYSINFO command message */
  2952. #define MCI_SYSINFO_QUANTITY            0x00000100L
  2953. #define MCI_SYSINFO_OPEN                0x00000200L
  2954. #define MCI_SYSINFO_NAME                0x00000400L
  2955. #define MCI_SYSINFO_INSTALLNAME         0x00000800L
  2956.  
  2957. /* flags for dwFlags parameter of MCI_SET command message */
  2958. #define MCI_SET_DOOR_OPEN               0x00000100L
  2959. #define MCI_SET_DOOR_CLOSED             0x00000200L
  2960. #define MCI_SET_TIME_FORMAT             0x00000400L
  2961. #define MCI_SET_AUDIO                   0x00000800L
  2962. #define MCI_SET_VIDEO                   0x00001000L
  2963. #define MCI_SET_ON                      0x00002000L
  2964. #define MCI_SET_OFF                     0x00004000L
  2965.  
  2966. /* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */
  2967. #define MCI_SET_AUDIO_ALL               0x00000000L
  2968. #define MCI_SET_AUDIO_LEFT              0x00000001L
  2969. #define MCI_SET_AUDIO_RIGHT             0x00000002L
  2970.  
  2971. /* flags for dwFlags parameter of MCI_BREAK command message */
  2972. #define MCI_BREAK_KEY                   0x00000100L
  2973. #define MCI_BREAK_HWND                  0x00000200L
  2974. #define MCI_BREAK_OFF                   0x00000400L
  2975.  
  2976. /* flags for dwFlags parameter of MCI_RECORD command message */
  2977. #define MCI_RECORD_INSERT               0x00000100L
  2978. #define MCI_RECORD_OVERWRITE            0x00000200L
  2979.  
  2980. /* flags for dwFlags parameter of MCI_SAVE command message */
  2981. #define MCI_SAVE_FILE                   0x00000100L
  2982.  
  2983. /* flags for dwFlags parameter of MCI_LOAD command message */
  2984. #define MCI_LOAD_FILE                   0x00000100L
  2985.  
  2986. /* generic parameter block for MCI command messages with no special parameters */
  2987. typedef struct tagMCI_GENERIC_PARMS {
  2988.     DWORD   dwCallback;
  2989. } MCI_GENERIC_PARMS, *PMCI_GENERIC_PARMS, FAR *LPMCI_GENERIC_PARMS;
  2990.  
  2991. /* parameter block for MCI_OPEN command message */
  2992. #ifdef _WIN32
  2993.  
  2994. #ifndef UNICODE_ONLY
  2995. typedef struct tagMCI_OPEN_PARMSA {
  2996.     DWORD   dwCallback;
  2997.     MCIDEVICEID wDeviceID;
  2998.     LPCSTR     lpstrDeviceType;
  2999.     LPCSTR     lpstrElementName;
  3000.     LPCSTR     lpstrAlias;
  3001. } MCI_OPEN_PARMSA, *PMCI_OPEN_PARMSA, *LPMCI_OPEN_PARMSA;
  3002. #endif //!UNICODE_ONLY
  3003. #ifndef ANSI_ONLY
  3004. typedef struct tagMCI_OPEN_PARMSW {
  3005.     DWORD   dwCallback;
  3006.     MCIDEVICEID wDeviceID;
  3007.     LPCWSTR    lpstrDeviceType;
  3008.     LPCWSTR    lpstrElementName;
  3009.     LPCWSTR    lpstrAlias;
  3010. } MCI_OPEN_PARMSW, *PMCI_OPEN_PARMSW, *LPMCI_OPEN_PARMSW;
  3011. #endif //!ANSI_ONLY
  3012. #ifdef UNICODE
  3013. typedef MCI_OPEN_PARMSW MCI_OPEN_PARMS;
  3014. typedef PMCI_OPEN_PARMSW PMCI_OPEN_PARMS;
  3015. typedef LPMCI_OPEN_PARMSW LPMCI_OPEN_PARMS;
  3016. #else
  3017. typedef MCI_OPEN_PARMSA MCI_OPEN_PARMS;
  3018. typedef PMCI_OPEN_PARMSA PMCI_OPEN_PARMS;
  3019. typedef LPMCI_OPEN_PARMSA LPMCI_OPEN_PARMS;
  3020. #endif // UNICODE
  3021.  
  3022. #else
  3023. typedef struct tagMCI_OPEN_PARMS {
  3024.     DWORD       dwCallback;
  3025.     MCIDEVICEID wDeviceID;
  3026.     WORD        wReserved0;
  3027.     LPCSTR      lpstrDeviceType;
  3028.     LPCSTR      lpstrElementName;
  3029.     LPCSTR      lpstrAlias;
  3030. } MCI_OPEN_PARMS, FAR *LPMCI_OPEN_PARMS;
  3031. #endif
  3032.  
  3033. /* parameter block for MCI_PLAY command message */
  3034. typedef struct tagMCI_PLAY_PARMS {
  3035.     DWORD   dwCallback;
  3036.     DWORD   dwFrom;
  3037.     DWORD   dwTo;
  3038. } MCI_PLAY_PARMS, *PMCI_PLAY_PARMS, FAR *LPMCI_PLAY_PARMS;
  3039.  
  3040. /* parameter block for MCI_SEEK command message */
  3041. typedef struct tagMCI_SEEK_PARMS {
  3042.     DWORD   dwCallback;
  3043.     DWORD   dwTo;
  3044. } MCI_SEEK_PARMS, *PMCI_SEEK_PARMS, FAR *LPMCI_SEEK_PARMS;
  3045.  
  3046. /* parameter block for MCI_STATUS command message */
  3047. typedef struct tagMCI_STATUS_PARMS {
  3048.     DWORD   dwCallback;
  3049.     DWORD   dwReturn;
  3050.     DWORD   dwItem;
  3051.     DWORD   dwTrack;
  3052. } MCI_STATUS_PARMS, *PMCI_STATUS_PARMS, FAR * LPMCI_STATUS_PARMS;
  3053.  
  3054. /* parameter block for MCI_INFO command message */
  3055. #ifdef _WIN32
  3056.  
  3057. #ifndef UNICODE_ONLY
  3058. typedef struct tagMCI_INFO_PARMSA {
  3059.     DWORD   dwCallback;
  3060.     LPSTR   lpstrReturn;
  3061.     DWORD   dwRetSize;
  3062. } MCI_INFO_PARMSA, * LPMCI_INFO_PARMSA;
  3063. #endif //!UNICODE_ONLY
  3064. #ifndef ANSI_ONLY
  3065. typedef struct tagMCI_INFO_PARMSW {
  3066.     DWORD   dwCallback;
  3067.     LPWSTR  lpstrReturn;
  3068.     DWORD   dwRetSize;
  3069. } MCI_INFO_PARMSW, * LPMCI_INFO_PARMSW;
  3070. #endif //!ANSI_ONLY
  3071. #ifdef UNICODE
  3072. typedef MCI_INFO_PARMSW MCI_INFO_PARMS;
  3073. typedef LPMCI_INFO_PARMSW LPMCI_INFO_PARMS;
  3074. #else
  3075. typedef MCI_INFO_PARMSA MCI_INFO_PARMS;
  3076. typedef LPMCI_INFO_PARMSA LPMCI_INFO_PARMS;
  3077. #endif // UNICODE
  3078.  
  3079. #else
  3080. typedef struct tagMCI_INFO_PARMS {
  3081.     DWORD   dwCallback;
  3082.     LPSTR   lpstrReturn;
  3083.     DWORD   dwRetSize;
  3084. } MCI_INFO_PARMS, FAR * LPMCI_INFO_PARMS;
  3085. #endif
  3086.  
  3087. /* parameter block for MCI_GETDEVCAPS command message */
  3088. typedef struct tagMCI_GETDEVCAPS_PARMS {
  3089.     DWORD   dwCallback;
  3090.     DWORD   dwReturn;
  3091.     DWORD   dwItem;
  3092. } MCI_GETDEVCAPS_PARMS, *PMCI_GETDEVCAPS_PARMS, FAR * LPMCI_GETDEVCAPS_PARMS;
  3093.  
  3094. /* parameter block for MCI_SYSINFO command message */
  3095. #ifdef _WIN32
  3096.  
  3097. #ifndef UNICODE_ONLY
  3098. typedef struct tagMCI_SYSINFO_PARMSA {
  3099.     DWORD   dwCallback;
  3100.     LPSTR   lpstrReturn;
  3101.     DWORD   dwRetSize;
  3102.     DWORD   dwNumber;
  3103.     UINT    wDeviceType;
  3104. } MCI_SYSINFO_PARMSA, *PMCI_SYSINFO_PARMSA, * LPMCI_SYSINFO_PARMSA;
  3105. #endif //!UNICODE_ONLY
  3106. #ifndef ANSI_ONLY
  3107. typedef struct tagMCI_SYSINFO_PARMSW {
  3108.     DWORD   dwCallback;
  3109.     LPWSTR  lpstrReturn;
  3110.     DWORD   dwRetSize;
  3111.     DWORD   dwNumber;
  3112.     UINT    wDeviceType;
  3113. } MCI_SYSINFO_PARMSW, *PMCI_SYSINFO_PARMSW, * LPMCI_SYSINFO_PARMSW;
  3114. #endif //!ANSI_ONLY
  3115. #ifdef UNICODE
  3116. typedef MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS;
  3117. typedef PMCI_SYSINFO_PARMSW PMCI_SYSINFO_PARMS;
  3118. typedef LPMCI_SYSINFO_PARMSW LPMCI_SYSINFO_PARMS;
  3119. #else
  3120. typedef MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS;
  3121. typedef PMCI_SYSINFO_PARMSA PMCI_SYSINFO_PARMS;
  3122. typedef LPMCI_SYSINFO_PARMSA LPMCI_SYSINFO_PARMS;
  3123. #endif // UNICODE
  3124. #else
  3125. typedef struct tagMCI_SYSINFO_PARMS {
  3126.     DWORD   dwCallback;
  3127.     LPSTR   lpstrReturn;
  3128.     DWORD   dwRetSize;
  3129.     DWORD   dwNumber;
  3130.     WORD    wDeviceType;
  3131.     WORD    wReserved0;
  3132. } MCI_SYSINFO_PARMS, FAR * LPMCI_SYSINFO_PARMS;
  3133. #endif
  3134.  
  3135. /* parameter block for MCI_SET command message */
  3136. typedef struct tagMCI_SET_PARMS {
  3137.     DWORD   dwCallback;
  3138.     DWORD   dwTimeFormat;
  3139.     DWORD   dwAudio;
  3140. } MCI_SET_PARMS, *PMCI_SET_PARMS, FAR *LPMCI_SET_PARMS;
  3141.  
  3142. /* parameter block for MCI_BREAK command message */
  3143. typedef struct tagMCI_BREAK_PARMS {
  3144.     DWORD   dwCallback;
  3145. #ifdef _WIN32
  3146.     int     nVirtKey;
  3147.     HWND    hwndBreak;
  3148. #else
  3149.     short   nVirtKey;
  3150.     WORD    wReserved0;             /* padding for Win 16 */
  3151.     HWND    hwndBreak;
  3152.     WORD    wReserved1;             /* padding for Win 16 */
  3153. #endif
  3154. } MCI_BREAK_PARMS, *PMCI_BREAK_PARMS, FAR * LPMCI_BREAK_PARMS;
  3155.  
  3156. /* parameter block for MCI_SAVE command message */
  3157. #ifdef _WIN32
  3158.  
  3159. #ifndef UNICODE_ONLY
  3160. typedef struct tagMCI_SAVE_PARMSA {
  3161.     DWORD    dwCallback;
  3162.     LPCSTR    lpfilename;
  3163. } MCI_SAVE_PARMSA, *PMCI_SAVE_PARMSA, * LPMCI_SAVE_PARMSA;
  3164. #endif //!UNICODE_ONLY
  3165. #ifndef ANSI_ONLY
  3166. typedef struct tagMCI_SAVE_PARMSW {
  3167.     DWORD    dwCallback;
  3168.     LPCWSTR   lpfilename;
  3169. } MCI_SAVE_PARMSW, *PMCI_SAVE_PARMSW, * LPMCI_SAVE_PARMSW;
  3170. #endif //!ANSI_ONLY
  3171. #ifdef UNICODE
  3172. typedef MCI_SAVE_PARMSW MCI_SAVE_PARMS;
  3173. typedef PMCI_SAVE_PARMSW PMCI_SAVE_PARMS;
  3174. typedef LPMCI_SAVE_PARMSW LPMCI_SAVE_PARMS;
  3175. #else
  3176. typedef MCI_SAVE_PARMSA MCI_SAVE_PARMS;
  3177. typedef PMCI_SAVE_PARMSA PMCI_SAVE_PARMS;
  3178. typedef LPMCI_SAVE_PARMSA LPMCI_SAVE_PARMS;
  3179. #endif // UNICODE
  3180.  
  3181. #else
  3182. typedef struct tagMCI_SAVE_PARMS {
  3183.     DWORD   dwCallback;
  3184.     LPCSTR  lpfilename;
  3185. } MCI_SAVE_PARMS, FAR * LPMCI_SAVE_PARMS;
  3186. #endif
  3187.  
  3188. /* parameter block for MCI_LOAD command message */
  3189. #ifdef _WIN32
  3190.  
  3191. #ifndef UNICODE_ONLY
  3192. typedef struct tagMCI_LOAD_PARMSA {
  3193.     DWORD    dwCallback;
  3194.     LPCSTR      lpfilename;
  3195. } MCI_LOAD_PARMSA, *PMCI_LOAD_PARMSA, * LPMCI_LOAD_PARMSA;
  3196. #endif //!UNICODE_ONLY
  3197. #ifndef ANSI_ONLY
  3198. typedef struct tagMCI_LOAD_PARMSW {
  3199.     DWORD    dwCallback;
  3200.     LPCWSTR     lpfilename;
  3201. } MCI_LOAD_PARMSW, *PMCI_LOAD_PARMSW, * LPMCI_LOAD_PARMSW;
  3202. #endif //!ANSI_ONLY
  3203. #ifdef UNICODE
  3204. typedef MCI_LOAD_PARMSW MCI_LOAD_PARMS;
  3205. typedef PMCI_LOAD_PARMSW PMCI_LOAD_PARMS;
  3206. typedef LPMCI_LOAD_PARMSW LPMCI_LOAD_PARMS;
  3207. #else
  3208. typedef MCI_LOAD_PARMSA MCI_LOAD_PARMS;
  3209. typedef PMCI_LOAD_PARMSA PMCI_LOAD_PARMS;
  3210. typedef LPMCI_LOAD_PARMSA LPMCI_LOAD_PARMS;
  3211. #endif // UNICODE
  3212.  
  3213. #else
  3214. typedef struct tagMCI_LOAD_PARMS {
  3215.     DWORD   dwCallback;
  3216.     LPCSTR  lpfilename;
  3217. } MCI_LOAD_PARMS, FAR * LPMCI_LOAD_PARMS;
  3218. #endif
  3219.  
  3220. /* parameter block for MCI_RECORD command message */
  3221. typedef struct tagMCI_RECORD_PARMS {
  3222.     DWORD   dwCallback;
  3223.     DWORD   dwFrom;
  3224.     DWORD   dwTo;
  3225. } MCI_RECORD_PARMS, FAR *LPMCI_RECORD_PARMS;
  3226.  
  3227. /* MCI extensions for videodisc devices */
  3228.  
  3229. /* flag for dwReturn field of MCI_STATUS_PARMS */
  3230. /* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */
  3231. #define MCI_VD_MODE_PARK                (MCI_VD_OFFSET + 1)
  3232.  
  3233. /* flag for dwReturn field of MCI_STATUS_PARMS */
  3234. /* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */
  3235. #define MCI_VD_MEDIA_CLV                (MCI_VD_OFFSET + 2)
  3236. #define MCI_VD_MEDIA_CAV                (MCI_VD_OFFSET + 3)
  3237. #define MCI_VD_MEDIA_OTHER              (MCI_VD_OFFSET + 4)
  3238.  
  3239. #define MCI_VD_FORMAT_TRACK             0x4001
  3240.  
  3241. /* flags for dwFlags parameter of MCI_PLAY command message */
  3242. #define MCI_VD_PLAY_REVERSE             0x00010000L
  3243. #define MCI_VD_PLAY_FAST                0x00020000L
  3244. #define MCI_VD_PLAY_SPEED               0x00040000L
  3245. #define MCI_VD_PLAY_SCAN                0x00080000L
  3246. #define MCI_VD_PLAY_SLOW                0x00100000L
  3247.  
  3248. /* flag for dwFlags parameter of MCI_SEEK command message */
  3249. #define MCI_VD_SEEK_REVERSE             0x00010000L
  3250.  
  3251. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  3252. #define MCI_VD_STATUS_SPEED             0x00004002L
  3253. #define MCI_VD_STATUS_FORWARD           0x00004003L
  3254. #define MCI_VD_STATUS_MEDIA_TYPE        0x00004004L
  3255. #define MCI_VD_STATUS_SIDE              0x00004005L
  3256. #define MCI_VD_STATUS_DISC_SIZE         0x00004006L
  3257.  
  3258. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  3259. #define MCI_VD_GETDEVCAPS_CLV           0x00010000L
  3260. #define MCI_VD_GETDEVCAPS_CAV           0x00020000L
  3261.  
  3262. #define MCI_VD_SPIN_UP                  0x00010000L
  3263. #define MCI_VD_SPIN_DOWN                0x00020000L
  3264.  
  3265. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3266. #define MCI_VD_GETDEVCAPS_CAN_REVERSE   0x00004002L
  3267. #define MCI_VD_GETDEVCAPS_FAST_RATE     0x00004003L
  3268. #define MCI_VD_GETDEVCAPS_SLOW_RATE     0x00004004L
  3269. #define MCI_VD_GETDEVCAPS_NORMAL_RATE   0x00004005L
  3270.  
  3271. /* flags for the dwFlags parameter of MCI_STEP command message */
  3272. #define MCI_VD_STEP_FRAMES              0x00010000L
  3273. #define MCI_VD_STEP_REVERSE             0x00020000L
  3274.  
  3275. /* flag for the MCI_ESCAPE command message */
  3276. #define MCI_VD_ESCAPE_STRING            0x00000100L
  3277.  
  3278. /* parameter block for MCI_PLAY command message */
  3279. typedef struct tagMCI_VD_PLAY_PARMS {
  3280.     DWORD   dwCallback;
  3281.     DWORD   dwFrom;
  3282.     DWORD   dwTo;
  3283.     DWORD   dwSpeed;
  3284. } MCI_VD_PLAY_PARMS, *PMCI_VD_PLAY_PARMS, FAR *LPMCI_VD_PLAY_PARMS;
  3285.  
  3286. /* parameter block for MCI_STEP command message */
  3287. typedef struct tagMCI_VD_STEP_PARMS {
  3288.     DWORD   dwCallback;
  3289.     DWORD   dwFrames;
  3290. } MCI_VD_STEP_PARMS, *PMCI_VD_STEP_PARMS, FAR *LPMCI_VD_STEP_PARMS;
  3291.  
  3292. /* parameter block for MCI_ESCAPE command message */
  3293. #ifdef _WIN32
  3294.  
  3295. #ifndef UNICODE_ONLY
  3296. typedef struct tagMCI_VD_ESCAPE_PARMSA {
  3297.     DWORD   dwCallback;
  3298.     LPCSTR      lpstrCommand;
  3299. } MCI_VD_ESCAPE_PARMSA, *PMCI_VD_ESCAPE_PARMSA, *LPMCI_VD_ESCAPE_PARMSA;
  3300. #endif //!UNICODE_ONLY
  3301. #ifndef ANSI_ONLY
  3302. typedef struct tagMCI_VD_ESCAPE_PARMSW {
  3303.     DWORD   dwCallback;
  3304.     LPCWSTR     lpstrCommand;
  3305. } MCI_VD_ESCAPE_PARMSW, *PMCI_VD_ESCAPE_PARMSW, *LPMCI_VD_ESCAPE_PARMSW;
  3306. #endif //!ANSI_ONLY
  3307. #ifdef UNICODE
  3308. typedef MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS;
  3309. typedef PMCI_VD_ESCAPE_PARMSW PMCI_VD_ESCAPE_PARMS;
  3310. typedef LPMCI_VD_ESCAPE_PARMSW LPMCI_VD_ESCAPE_PARMS;
  3311. #else
  3312. typedef MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS;
  3313. typedef PMCI_VD_ESCAPE_PARMSA PMCI_VD_ESCAPE_PARMS;
  3314. typedef LPMCI_VD_ESCAPE_PARMSA LPMCI_VD_ESCAPE_PARMS;
  3315. #endif // UNICODE
  3316.  
  3317. #else
  3318. typedef struct tagMCI_VD_ESCAPE_PARMS {
  3319.     DWORD   dwCallback;
  3320.     LPCSTR  lpstrCommand;
  3321. } MCI_VD_ESCAPE_PARMS, FAR *LPMCI_VD_ESCAPE_PARMS;
  3322. #endif
  3323.  
  3324. /* MCI extensions for CD audio devices */
  3325.  
  3326. /* flags for the dwItem field of the MCI_STATUS_PARMS parameter block */
  3327. #define MCI_CDA_STATUS_TYPE_TRACK       0x00004001L
  3328.  
  3329. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  3330. /* MCI_STATUS command, (dwItem == MCI_CDA_STATUS_TYPE_TRACK) */
  3331. #define MCI_CDA_TRACK_AUDIO             (MCI_CD_OFFSET + 0)
  3332. #define MCI_CDA_TRACK_OTHER             (MCI_CD_OFFSET + 1)
  3333.  
  3334. /* MCI extensions for waveform audio devices */
  3335.  
  3336. #define MCI_WAVE_PCM                    (MCI_WAVE_OFFSET + 0)
  3337. #define MCI_WAVE_MAPPER                 (MCI_WAVE_OFFSET + 1)
  3338.  
  3339. /* flags for the dwFlags parameter of MCI_OPEN command message */
  3340. #define MCI_WAVE_OPEN_BUFFER            0x00010000L
  3341.  
  3342. /* flags for the dwFlags parameter of MCI_SET command message */
  3343. #define MCI_WAVE_SET_FORMATTAG          0x00010000L
  3344. #define MCI_WAVE_SET_CHANNELS           0x00020000L
  3345. #define MCI_WAVE_SET_SAMPLESPERSEC      0x00040000L
  3346. #define MCI_WAVE_SET_AVGBYTESPERSEC     0x00080000L
  3347. #define MCI_WAVE_SET_BLOCKALIGN         0x00100000L
  3348. #define MCI_WAVE_SET_BITSPERSAMPLE      0x00200000L
  3349.  
  3350. /* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */
  3351. #define MCI_WAVE_INPUT                  0x00400000L
  3352. #define MCI_WAVE_OUTPUT                 0x00800000L
  3353.  
  3354. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  3355. #define MCI_WAVE_STATUS_FORMATTAG       0x00004001L
  3356. #define MCI_WAVE_STATUS_CHANNELS        0x00004002L
  3357. #define MCI_WAVE_STATUS_SAMPLESPERSEC   0x00004003L
  3358. #define MCI_WAVE_STATUS_AVGBYTESPERSEC  0x00004004L
  3359. #define MCI_WAVE_STATUS_BLOCKALIGN      0x00004005L
  3360. #define MCI_WAVE_STATUS_BITSPERSAMPLE   0x00004006L
  3361. #define MCI_WAVE_STATUS_LEVEL           0x00004007L
  3362.  
  3363. /* flags for the dwFlags parameter of MCI_SET command message */
  3364. #define MCI_WAVE_SET_ANYINPUT           0x04000000L
  3365. #define MCI_WAVE_SET_ANYOUTPUT          0x08000000L
  3366.  
  3367. /* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */
  3368. #define MCI_WAVE_GETDEVCAPS_INPUTS      0x00004001L
  3369. #define MCI_WAVE_GETDEVCAPS_OUTPUTS     0x00004002L
  3370.  
  3371. /* parameter block for MCI_OPEN command message */
  3372. #ifdef _WIN32
  3373.  
  3374. #ifndef UNICODE_ONLY
  3375. typedef struct tagMCI_WAVE_OPEN_PARMSA {
  3376.     DWORD   dwCallback;
  3377.     MCIDEVICEID wDeviceID;
  3378.     LPCSTR      lpstrDeviceType;
  3379.     LPCSTR      lpstrElementName;
  3380.     LPCSTR      lpstrAlias;
  3381.     DWORD   dwBufferSeconds;
  3382. } MCI_WAVE_OPEN_PARMSA, *PMCI_WAVE_OPEN_PARMSA, *LPMCI_WAVE_OPEN_PARMSA;
  3383. #endif //!UNICODE_ONLY
  3384. #ifndef ANSI_ONLY
  3385. typedef struct tagMCI_WAVE_OPEN_PARMSW {
  3386.     DWORD   dwCallback;
  3387.     MCIDEVICEID wDeviceID;
  3388.     LPCWSTR     lpstrDeviceType;
  3389.     LPCWSTR     lpstrElementName;
  3390.     LPCWSTR     lpstrAlias;
  3391.     DWORD   dwBufferSeconds;
  3392. } MCI_WAVE_OPEN_PARMSW, *PMCI_WAVE_OPEN_PARMSW, *LPMCI_WAVE_OPEN_PARMSW;
  3393. #endif //!ANSI_ONLY
  3394. #ifdef UNICODE
  3395. typedef MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS;
  3396. typedef PMCI_WAVE_OPEN_PARMSW PMCI_WAVE_OPEN_PARMS;
  3397. typedef LPMCI_WAVE_OPEN_PARMSW LPMCI_WAVE_OPEN_PARMS;
  3398. #else
  3399. typedef MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS;
  3400. typedef PMCI_WAVE_OPEN_PARMSA PMCI_WAVE_OPEN_PARMS;
  3401. typedef LPMCI_WAVE_OPEN_PARMSA LPMCI_WAVE_OPEN_PARMS;
  3402. #endif // UNICODE
  3403.  
  3404. #else
  3405. typedef struct tagMCI_WAVE_OPEN_PARMS {
  3406.     DWORD   dwCallback;
  3407.     MCIDEVICEID wDeviceID;
  3408.     WORD        wReserved0;
  3409.     LPCSTR      lpstrDeviceType;
  3410.     LPCSTR      lpstrElementName;
  3411.     LPCSTR      lpstrAlias;
  3412.     DWORD       dwBufferSeconds;
  3413. } MCI_WAVE_OPEN_PARMS, FAR *LPMCI_WAVE_OPEN_PARMS;
  3414. #endif
  3415.  
  3416. /* parameter block for MCI_DELETE command message */
  3417. typedef struct tagMCI_WAVE_DELETE_PARMS {
  3418.     DWORD   dwCallback;
  3419.     DWORD   dwFrom;
  3420.     DWORD   dwTo;
  3421. } MCI_WAVE_DELETE_PARMS, *PMCI_WAVE_DELETE_PARMS, FAR *LPMCI_WAVE_DELETE_PARMS;
  3422.  
  3423. /* parameter block for MCI_SET command message */
  3424. typedef struct tagMCI_WAVE_SET_PARMS {
  3425.     DWORD   dwCallback;
  3426.     DWORD   dwTimeFormat;
  3427.     DWORD   dwAudio;
  3428. #ifdef _WIN32
  3429.     UINT    wInput;
  3430.     UINT    wOutput;
  3431. #else
  3432.     WORD    wInput;
  3433.     WORD    wReserved0;
  3434.     WORD    wOutput;
  3435.     WORD    wReserved1;
  3436. #endif
  3437.     WORD    wFormatTag;
  3438.     WORD    wReserved2;
  3439.     WORD    nChannels;
  3440.     WORD    wReserved3;
  3441.     DWORD   nSamplesPerSec;
  3442.     DWORD   nAvgBytesPerSec;
  3443.     WORD    nBlockAlign;
  3444.     WORD    wReserved4;
  3445.     WORD    wBitsPerSample;
  3446.     WORD    wReserved5;
  3447. } MCI_WAVE_SET_PARMS, *PMCI_WAVE_SET_PARMS, FAR * LPMCI_WAVE_SET_PARMS;
  3448.  
  3449. /* MCI extensions for MIDI sequencer devices */
  3450.  
  3451. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  3452. /* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */
  3453. #define     MCI_SEQ_DIV_PPQN            (0 + MCI_SEQ_OFFSET)
  3454. #define     MCI_SEQ_DIV_SMPTE_24        (1 + MCI_SEQ_OFFSET)
  3455. #define     MCI_SEQ_DIV_SMPTE_25        (2 + MCI_SEQ_OFFSET)
  3456. #define     MCI_SEQ_DIV_SMPTE_30DROP    (3 + MCI_SEQ_OFFSET)
  3457. #define     MCI_SEQ_DIV_SMPTE_30        (4 + MCI_SEQ_OFFSET)
  3458.  
  3459. /* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */
  3460. /* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */
  3461. #define     MCI_SEQ_FORMAT_SONGPTR      0x4001
  3462. #define     MCI_SEQ_FILE                0x4002
  3463. #define     MCI_SEQ_MIDI                0x4003
  3464. #define     MCI_SEQ_SMPTE               0x4004
  3465. #define     MCI_SEQ_NONE                65533
  3466. #define     MCI_SEQ_MAPPER              65535
  3467.  
  3468. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  3469. #define MCI_SEQ_STATUS_TEMPO            0x00004002L
  3470. #define MCI_SEQ_STATUS_PORT             0x00004003L
  3471. #define MCI_SEQ_STATUS_SLAVE            0x00004007L
  3472. #define MCI_SEQ_STATUS_MASTER           0x00004008L
  3473. #define MCI_SEQ_STATUS_OFFSET           0x00004009L
  3474. #define MCI_SEQ_STATUS_DIVTYPE          0x0000400AL
  3475. #define MCI_SEQ_STATUS_NAME             0x0000400BL
  3476. #define MCI_SEQ_STATUS_COPYRIGHT        0x0000400CL
  3477.  
  3478. /* flags for the dwFlags parameter of MCI_SET command message */
  3479. #define MCI_SEQ_SET_TEMPO               0x00010000L
  3480. #define MCI_SEQ_SET_PORT                0x00020000L
  3481. #define MCI_SEQ_SET_SLAVE               0x00040000L
  3482. #define MCI_SEQ_SET_MASTER              0x00080000L
  3483. #define MCI_SEQ_SET_OFFSET              0x01000000L
  3484.  
  3485. /* parameter block for MCI_SET command message */
  3486. typedef struct tagMCI_SEQ_SET_PARMS {
  3487.     DWORD   dwCallback;
  3488.     DWORD   dwTimeFormat;
  3489.     DWORD   dwAudio;
  3490.     DWORD   dwTempo;
  3491.     DWORD   dwPort;
  3492.     DWORD   dwSlave;
  3493.     DWORD   dwMaster;
  3494.     DWORD   dwOffset;
  3495. } MCI_SEQ_SET_PARMS, *PMCI_SEQ_SET_PARMS, FAR * LPMCI_SEQ_SET_PARMS;
  3496.  
  3497. /* MCI extensions for animation devices */
  3498.  
  3499. /* flags for dwFlags parameter of MCI_OPEN command message */
  3500. #define MCI_ANIM_OPEN_WS                0x00010000L
  3501. #define MCI_ANIM_OPEN_PARENT            0x00020000L
  3502. #define MCI_ANIM_OPEN_NOSTATIC          0x00040000L
  3503.  
  3504. /* flags for dwFlags parameter of MCI_PLAY command message */
  3505. #define MCI_ANIM_PLAY_SPEED             0x00010000L
  3506. #define MCI_ANIM_PLAY_REVERSE           0x00020000L
  3507. #define MCI_ANIM_PLAY_FAST              0x00040000L
  3508. #define MCI_ANIM_PLAY_SLOW              0x00080000L
  3509. #define MCI_ANIM_PLAY_SCAN              0x00100000L
  3510.  
  3511. /* flags for dwFlags parameter of MCI_STEP command message */
  3512. #define MCI_ANIM_STEP_REVERSE           0x00010000L
  3513. #define MCI_ANIM_STEP_FRAMES            0x00020000L
  3514.  
  3515. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  3516. #define MCI_ANIM_STATUS_SPEED           0x00004001L
  3517. #define MCI_ANIM_STATUS_FORWARD         0x00004002L
  3518. #define MCI_ANIM_STATUS_HWND            0x00004003L
  3519. #define MCI_ANIM_STATUS_HPAL            0x00004004L
  3520. #define MCI_ANIM_STATUS_STRETCH         0x00004005L
  3521.  
  3522. /* flags for the dwFlags parameter of MCI_INFO command message */
  3523. #define MCI_ANIM_INFO_TEXT              0x00010000L
  3524.  
  3525. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3526. #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
  3527. #define MCI_ANIM_GETDEVCAPS_FAST_RATE   0x00004002L
  3528. #define MCI_ANIM_GETDEVCAPS_SLOW_RATE   0x00004003L
  3529. #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
  3530. #define MCI_ANIM_GETDEVCAPS_PALETTES    0x00004006L
  3531. #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
  3532. #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
  3533.  
  3534. /* flags for the MCI_REALIZE command message */
  3535. #define MCI_ANIM_REALIZE_NORM           0x00010000L
  3536. #define MCI_ANIM_REALIZE_BKGD           0x00020000L
  3537.  
  3538. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3539. #define MCI_ANIM_WINDOW_HWND            0x00010000L
  3540. #define MCI_ANIM_WINDOW_STATE           0x00040000L
  3541. #define MCI_ANIM_WINDOW_TEXT            0x00080000L
  3542. #define MCI_ANIM_WINDOW_ENABLE_STRETCH  0x00100000L
  3543. #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
  3544.  
  3545. /* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */
  3546. /* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */
  3547. #define MCI_ANIM_WINDOW_DEFAULT         0x00000000L
  3548.  
  3549. /* flags for dwFlags parameter of MCI_PUT command message */
  3550. #define MCI_ANIM_RECT                   0x00010000L
  3551. #define MCI_ANIM_PUT_SOURCE             0x00020000L
  3552. #define MCI_ANIM_PUT_DESTINATION        0x00040000L
  3553.  
  3554. /* flags for dwFlags parameter of MCI_WHERE command message */
  3555. #define MCI_ANIM_WHERE_SOURCE           0x00020000L
  3556. #define MCI_ANIM_WHERE_DESTINATION      0x00040000L
  3557.  
  3558. /* flags for dwFlags parameter of MCI_UPDATE command message */
  3559. #define MCI_ANIM_UPDATE_HDC             0x00020000L
  3560.  
  3561. /* parameter block for MCI_OPEN command message */
  3562. #ifdef _WIN32
  3563.  
  3564. #ifndef UNICODE_ONLY
  3565. typedef struct tagMCI_ANIM_OPEN_PARMSA {
  3566.     DWORD   dwCallback;
  3567.     MCIDEVICEID wDeviceID;
  3568.     LPCSTR      lpstrDeviceType;
  3569.     LPCSTR      lpstrElementName;
  3570.     LPCSTR      lpstrAlias;
  3571.     DWORD   dwStyle;
  3572.     HWND    hWndParent;
  3573. } MCI_ANIM_OPEN_PARMSA, *PMCI_ANIM_OPEN_PARMSA, *LPMCI_ANIM_OPEN_PARMSA;
  3574. #endif //!UNICODE_ONLY
  3575. #ifndef ANSI_ONLY
  3576. typedef struct tagMCI_ANIM_OPEN_PARMSW {
  3577.     DWORD   dwCallback;
  3578.     MCIDEVICEID wDeviceID;
  3579.     LPCWSTR     lpstrDeviceType;
  3580.     LPCWSTR     lpstrElementName;
  3581.     LPCWSTR     lpstrAlias;
  3582.     DWORD   dwStyle;
  3583.     HWND    hWndParent;
  3584. } MCI_ANIM_OPEN_PARMSW, *PMCI_ANIM_OPEN_PARMSW, *LPMCI_ANIM_OPEN_PARMSW;
  3585. #endif //!ANSI_ONLY
  3586. #ifdef UNICODE
  3587. typedef MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS;
  3588. typedef PMCI_ANIM_OPEN_PARMSW PMCI_ANIM_OPEN_PARMS;
  3589. typedef LPMCI_ANIM_OPEN_PARMSW LPMCI_ANIM_OPEN_PARMS;
  3590. #else
  3591. typedef MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS;
  3592. typedef PMCI_ANIM_OPEN_PARMSA PMCI_ANIM_OPEN_PARMS;
  3593. typedef LPMCI_ANIM_OPEN_PARMSA LPMCI_ANIM_OPEN_PARMS;
  3594. #endif // UNICODE
  3595.  
  3596. #else
  3597. typedef struct tagMCI_ANIM_OPEN_PARMS {
  3598.     DWORD   dwCallback;
  3599.     MCIDEVICEID wDeviceID;
  3600.     WORD        wReserved0;
  3601.     LPCSTR      lpstrDeviceType;
  3602.     LPCSTR      lpstrElementName;
  3603.     LPCSTR      lpstrAlias;
  3604.     DWORD       dwStyle;
  3605.     HWND        hWndParent;
  3606.     WORD        wReserved1;
  3607. } MCI_ANIM_OPEN_PARMS, FAR *LPMCI_ANIM_OPEN_PARMS;
  3608. #endif
  3609.  
  3610. /* parameter block for MCI_PLAY command message */
  3611. typedef struct tagMCI_ANIM_PLAY_PARMS {
  3612.     DWORD   dwCallback;
  3613.     DWORD   dwFrom;
  3614.     DWORD   dwTo;
  3615.     DWORD   dwSpeed;
  3616. } MCI_ANIM_PLAY_PARMS, *PMCI_ANIM_PLAY_PARMS, FAR *LPMCI_ANIM_PLAY_PARMS;
  3617.  
  3618. /* parameter block for MCI_STEP command message */
  3619. typedef struct tagMCI_ANIM_STEP_PARMS {
  3620.     DWORD   dwCallback;
  3621.     DWORD   dwFrames;
  3622. } MCI_ANIM_STEP_PARMS, *PMCI_ANIM_STEP_PARMS, FAR *LPMCI_ANIM_STEP_PARMS;
  3623.  
  3624. /* parameter block for MCI_WINDOW command message */
  3625. #ifdef _WIN32
  3626.  
  3627. #ifndef UNICODE_ONLY
  3628. typedef struct tagMCI_ANIM_WINDOW_PARMSA {
  3629.     DWORD   dwCallback;
  3630.     HWND    hWnd;
  3631.     UINT    nCmdShow;
  3632.     LPCSTR     lpstrText;
  3633. } MCI_ANIM_WINDOW_PARMSA, *PMCI_ANIM_WINDOW_PARMSA, * LPMCI_ANIM_WINDOW_PARMSA;
  3634. #endif //!UNICODE_ONLY
  3635. #ifndef ANSI_ONLY
  3636. typedef struct tagMCI_ANIM_WINDOW_PARMSW {
  3637.     DWORD   dwCallback;
  3638.     HWND    hWnd;
  3639.     UINT    nCmdShow;
  3640.     LPCWSTR    lpstrText;
  3641. } MCI_ANIM_WINDOW_PARMSW, *PMCI_ANIM_WINDOW_PARMSW, * LPMCI_ANIM_WINDOW_PARMSW;
  3642. #endif //!ANSI_ONLY
  3643. #ifdef UNICODE
  3644. typedef MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS;
  3645. typedef PMCI_ANIM_WINDOW_PARMSW PMCI_ANIM_WINDOW_PARMS;
  3646. typedef LPMCI_ANIM_WINDOW_PARMSW LPMCI_ANIM_WINDOW_PARMS;
  3647. #else
  3648. typedef MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS;
  3649. typedef PMCI_ANIM_WINDOW_PARMSA PMCI_ANIM_WINDOW_PARMS;
  3650. typedef LPMCI_ANIM_WINDOW_PARMSA LPMCI_ANIM_WINDOW_PARMS;
  3651. #endif // UNICODE
  3652.  
  3653. #else
  3654. typedef struct tagMCI_ANIM_WINDOW_PARMS {
  3655.     DWORD   dwCallback;
  3656.     HWND    hWnd;
  3657.     WORD    wReserved1;
  3658.     WORD    nCmdShow;
  3659.     WORD    wReserved2;
  3660.     LPCSTR  lpstrText;
  3661. } MCI_ANIM_WINDOW_PARMS, FAR * LPMCI_ANIM_WINDOW_PARMS;
  3662. #endif
  3663.  
  3664. /* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */
  3665. typedef struct tagMCI_ANIM_RECT_PARMS {
  3666.     DWORD   dwCallback;
  3667. #ifdef MCI_USE_OFFEXT
  3668.     POINT   ptOffset;
  3669.     POINT   ptExtent;
  3670. #else   /* ifdef MCI_USE_OFFEXT */
  3671.     RECT    rc;
  3672. #endif  /* ifdef MCI_USE_OFFEXT */
  3673. } MCI_ANIM_RECT_PARMS;
  3674. typedef MCI_ANIM_RECT_PARMS * PMCI_ANIM_RECT_PARMS;
  3675. typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS;
  3676.  
  3677. /* parameter block for MCI_UPDATE PARMS */
  3678. typedef struct tagMCI_ANIM_UPDATE_PARMS {
  3679.     DWORD   dwCallback;
  3680.     RECT    rc;
  3681.     HDC     hDC;
  3682. } MCI_ANIM_UPDATE_PARMS, *PMCI_ANIM_UPDATE_PARMS, FAR * LPMCI_ANIM_UPDATE_PARMS;
  3683.  
  3684. /* MCI extensions for video overlay devices */
  3685.  
  3686. /* flags for dwFlags parameter of MCI_OPEN command message */
  3687. #define MCI_OVLY_OPEN_WS                0x00010000L
  3688. #define MCI_OVLY_OPEN_PARENT            0x00020000L
  3689.  
  3690. /* flags for dwFlags parameter of MCI_STATUS command message */
  3691. #define MCI_OVLY_STATUS_HWND            0x00004001L
  3692. #define MCI_OVLY_STATUS_STRETCH         0x00004002L
  3693.  
  3694. /* flags for dwFlags parameter of MCI_INFO command message */
  3695. #define MCI_OVLY_INFO_TEXT              0x00010000L
  3696.  
  3697. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3698. #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
  3699. #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE  0x00004002L
  3700. #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
  3701.  
  3702. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3703. #define MCI_OVLY_WINDOW_HWND            0x00010000L
  3704. #define MCI_OVLY_WINDOW_STATE           0x00040000L
  3705. #define MCI_OVLY_WINDOW_TEXT            0x00080000L
  3706. #define MCI_OVLY_WINDOW_ENABLE_STRETCH  0x00100000L
  3707. #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
  3708.  
  3709. /* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */
  3710. #define MCI_OVLY_WINDOW_DEFAULT         0x00000000L
  3711.  
  3712. /* flags for dwFlags parameter of MCI_PUT command message */
  3713. #define MCI_OVLY_RECT                   0x00010000L
  3714. #define MCI_OVLY_PUT_SOURCE             0x00020000L
  3715. #define MCI_OVLY_PUT_DESTINATION        0x00040000L
  3716. #define MCI_OVLY_PUT_FRAME              0x00080000L
  3717. #define MCI_OVLY_PUT_VIDEO              0x00100000L
  3718.  
  3719. /* flags for dwFlags parameter of MCI_WHERE command message */
  3720. #define MCI_OVLY_WHERE_SOURCE           0x00020000L
  3721. #define MCI_OVLY_WHERE_DESTINATION      0x00040000L
  3722. #define MCI_OVLY_WHERE_FRAME            0x00080000L
  3723. #define MCI_OVLY_WHERE_VIDEO            0x00100000L
  3724.  
  3725. /* parameter block for MCI_OPEN command message */
  3726. #ifdef _WIN32
  3727.  
  3728. #ifndef UNICODE_ONLY
  3729. typedef struct tagMCI_OVLY_OPEN_PARMSA {
  3730.     DWORD   dwCallback;
  3731.     MCIDEVICEID wDeviceID;
  3732.     LPCSTR      lpstrDeviceType;
  3733.     LPCSTR      lpstrElementName;
  3734.     LPCSTR      lpstrAlias;
  3735.     DWORD   dwStyle;
  3736.     HWND    hWndParent;
  3737. } MCI_OVLY_OPEN_PARMSA, *PMCI_OVLY_OPEN_PARMSA, *LPMCI_OVLY_OPEN_PARMSA;
  3738. #endif //!UNICODE_ONLY
  3739. #ifndef ANSI_ONLY
  3740. typedef struct tagMCI_OVLY_OPEN_PARMSW {
  3741.     DWORD   dwCallback;
  3742.     MCIDEVICEID wDeviceID;
  3743.     LPCWSTR     lpstrDeviceType;
  3744.     LPCWSTR     lpstrElementName;
  3745.     LPCWSTR     lpstrAlias;
  3746.     DWORD   dwStyle;
  3747.     HWND    hWndParent;
  3748. } MCI_OVLY_OPEN_PARMSW, *PMCI_OVLY_OPEN_PARMSW, *LPMCI_OVLY_OPEN_PARMSW;
  3749. #endif //!ANSI_ONLY
  3750. #ifdef UNICODE
  3751. typedef MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS;
  3752. typedef PMCI_OVLY_OPEN_PARMSW PMCI_OVLY_OPEN_PARMS;
  3753. typedef LPMCI_OVLY_OPEN_PARMSW LPMCI_OVLY_OPEN_PARMS;
  3754. #else
  3755. typedef MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS;
  3756. typedef PMCI_OVLY_OPEN_PARMSA PMCI_OVLY_OPEN_PARMS;
  3757. typedef LPMCI_OVLY_OPEN_PARMSA LPMCI_OVLY_OPEN_PARMS;
  3758. #endif // UNICODE
  3759.  
  3760. #else
  3761. typedef struct tagMCI_OVLY_OPEN_PARMS {
  3762.     DWORD   dwCallback;
  3763.     MCIDEVICEID wDeviceID;
  3764.     WORD        wReserved0;
  3765.     LPCSTR      lpstrDeviceType;
  3766.     LPCSTR      lpstrElementName;
  3767.     LPCSTR      lpstrAlias;
  3768.     DWORD       dwStyle;
  3769.     HWND        hWndParent;
  3770.     WORD        wReserved1;
  3771. } MCI_OVLY_OPEN_PARMS, FAR *LPMCI_OVLY_OPEN_PARMS;
  3772. #endif
  3773.  
  3774. /* parameter block for MCI_WINDOW command message */
  3775. #ifdef _WIN32
  3776.  
  3777. #ifndef UNICODE_ONLY
  3778. typedef struct tagMCI_OVLY_WINDOW_PARMSA {
  3779.     DWORD   dwCallback;
  3780.     HWND    hWnd;
  3781.     UINT    nCmdShow;
  3782.     LPCSTR      lpstrText;
  3783. } MCI_OVLY_WINDOW_PARMSA, *PMCI_OVLY_WINDOW_PARMSA, * LPMCI_OVLY_WINDOW_PARMSA;
  3784. #endif //!UNICODE_ONLY
  3785. #ifndef ANSI_ONLY
  3786. typedef struct tagMCI_OVLY_WINDOW_PARMSW {
  3787.     DWORD   dwCallback;
  3788.     HWND    hWnd;
  3789.     UINT    nCmdShow;
  3790.     LPCWSTR     lpstrText;
  3791. } MCI_OVLY_WINDOW_PARMSW, *PMCI_OVLY_WINDOW_PARMSW, * LPMCI_OVLY_WINDOW_PARMSW;
  3792. #endif //!ANSI_ONLY
  3793. #ifdef UNICODE
  3794. typedef MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS;
  3795. typedef PMCI_OVLY_WINDOW_PARMSW PMCI_OVLY_WINDOW_PARMS;
  3796. typedef LPMCI_OVLY_WINDOW_PARMSW LPMCI_OVLY_WINDOW_PARMS;
  3797. #else
  3798. typedef MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS;
  3799. typedef PMCI_OVLY_WINDOW_PARMSA PMCI_OVLY_WINDOW_PARMS;
  3800. typedef LPMCI_OVLY_WINDOW_PARMSA LPMCI_OVLY_WINDOW_PARMS;
  3801. #endif // UNICODE
  3802. #else
  3803. typedef struct tagMCI_OVLY_WINDOW_PARMS {
  3804.     DWORD   dwCallback;
  3805.     HWND    hWnd;
  3806.     WORD    wReserved1;
  3807.     UINT    nCmdShow;
  3808.     WORD    wReserved2;
  3809.     LPCSTR  lpstrText;
  3810. } MCI_OVLY_WINDOW_PARMS, FAR * LPMCI_OVLY_WINDOW_PARMS;
  3811. #endif
  3812.  
  3813. /* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */
  3814. typedef struct tagMCI_OVLY_RECT_PARMS {
  3815.     DWORD   dwCallback;
  3816. #ifdef MCI_USE_OFFEXT
  3817.     POINT   ptOffset;
  3818.     POINT   ptExtent;
  3819. #else   /* ifdef MCI_USE_OFFEXT */
  3820.     RECT    rc;
  3821. #endif  /* ifdef MCI_USE_OFFEXT */
  3822. } MCI_OVLY_RECT_PARMS, *PMCI_OVLY_RECT_PARMS, FAR * LPMCI_OVLY_RECT_PARMS;
  3823.  
  3824. /* parameter block for MCI_SAVE command message */
  3825. #ifdef _WIN32
  3826.  
  3827. #ifndef UNICODE_ONLY
  3828. typedef struct tagMCI_OVLY_SAVE_PARMSA {
  3829.     DWORD   dwCallback;
  3830.     LPCSTR      lpfilename;
  3831.     RECT    rc;
  3832. } MCI_OVLY_SAVE_PARMSA, *PMCI_OVLY_SAVE_PARMSA, * LPMCI_OVLY_SAVE_PARMSA;
  3833. #endif //!UNICODE_ONLY
  3834. #ifndef ANSI_ONLY
  3835. typedef struct tagMCI_OVLY_SAVE_PARMSW {
  3836.     DWORD   dwCallback;
  3837.     LPCWSTR     lpfilename;
  3838.     RECT    rc;
  3839. } MCI_OVLY_SAVE_PARMSW, *PMCI_OVLY_SAVE_PARMSW, * LPMCI_OVLY_SAVE_PARMSW;
  3840. #endif //!ANSI_ONLY
  3841. #ifdef UNICODE
  3842. typedef MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS;
  3843. typedef PMCI_OVLY_SAVE_PARMSW PMCI_OVLY_SAVE_PARMS;
  3844. typedef LPMCI_OVLY_SAVE_PARMSW LPMCI_OVLY_SAVE_PARMS;
  3845. #else
  3846. typedef MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS;
  3847. typedef PMCI_OVLY_SAVE_PARMSA PMCI_OVLY_SAVE_PARMS;
  3848. typedef LPMCI_OVLY_SAVE_PARMSA LPMCI_OVLY_SAVE_PARMS;
  3849. #endif // UNICODE
  3850. #else
  3851. typedef struct tagMCI_OVLY_SAVE_PARMS {
  3852.     DWORD   dwCallback;
  3853.     LPCSTR  lpfilename;
  3854.     RECT    rc;
  3855. } MCI_OVLY_SAVE_PARMS, FAR * LPMCI_OVLY_SAVE_PARMS;
  3856. #endif
  3857.  
  3858. /* parameter block for MCI_LOAD command message */
  3859. #ifdef _WIN32
  3860.  
  3861. #ifndef UNICODE_ONLY
  3862. typedef struct tagMCI_OVLY_LOAD_PARMSA {
  3863.     DWORD   dwCallback;
  3864.     LPCSTR      lpfilename;
  3865.     RECT    rc;
  3866. } MCI_OVLY_LOAD_PARMSA, *PMCI_OVLY_LOAD_PARMSA, * LPMCI_OVLY_LOAD_PARMSA;
  3867. #endif //!UNICODE_ONLY
  3868. #ifndef ANSI_ONLY
  3869. typedef struct tagMCI_OVLY_LOAD_PARMSW {
  3870.     DWORD   dwCallback;
  3871.     LPCWSTR     lpfilename;
  3872.     RECT    rc;
  3873. } MCI_OVLY_LOAD_PARMSW, *PMCI_OVLY_LOAD_PARMSW, * LPMCI_OVLY_LOAD_PARMSW;
  3874. #endif //!ANSI_ONLY
  3875. #ifdef UNICODE
  3876. typedef MCI_OVLY_LOAD_PARMSW MCI_OVLY_LOAD_PARMS;
  3877. typedef PMCI_OVLY_LOAD_PARMSW PMCI_OVLY_LOAD_PARMS;
  3878. typedef LPMCI_OVLY_LOAD_PARMSW LPMCI_OVLY_LOAD_PARMS;
  3879. #else
  3880. typedef MCI_OVLY_LOAD_PARMSA MCI_OVLY_LOAD_PARMS;
  3881. typedef PMCI_OVLY_LOAD_PARMSA PMCI_OVLY_LOAD_PARMS;
  3882. typedef LPMCI_OVLY_LOAD_PARMSA LPMCI_OVLY_LOAD_PARMS;
  3883. #endif // UNICODE
  3884. #else
  3885. typedef struct tagMCI_OVLY_LOAD_PARMS {
  3886.     DWORD   dwCallback;
  3887.     LPCSTR  lpfilename;
  3888.     RECT    rc;
  3889. } MCI_OVLY_LOAD_PARMS, FAR * LPMCI_OVLY_LOAD_PARMS;
  3890. #endif
  3891.  
  3892. #endif  /* ifndef _WIN32_VXD */
  3893. #endif  /* ifndef MMNOMCI */
  3894.  
  3895. /****************************************************************************
  3896.  
  3897.             DISPLAY Driver extensions
  3898.  
  3899. ****************************************************************************/
  3900.  
  3901. #ifndef NEWTRANSPARENT
  3902.     #define NEWTRANSPARENT  3           /* use with SetBkMode() */
  3903.  
  3904.     #define QUERYROPSUPPORT 40          /* use to determine ROP support */
  3905. #endif  /* ifndef NEWTRANSPARENT */
  3906.  
  3907. /****************************************************************************
  3908.  
  3909.             DIB Driver extensions
  3910.  
  3911. ****************************************************************************/
  3912.  
  3913. #define SELECTDIB       41                      /* DIB.DRV select dib escape */
  3914. #define DIBINDEX(n)     MAKELONG((n),0x10FF)
  3915.  
  3916. /****************************************************************************
  3917.  
  3918.             ScreenSaver support
  3919.  
  3920.     The current application will receive a syscommand of SC_SCREENSAVE just
  3921.     before the screen saver is invoked.  If the app wishes to prevent a
  3922.     screen save, return non-zero value, otherwise call DefWindowProc().
  3923.  
  3924. ****************************************************************************/
  3925.  
  3926. #ifndef SC_SCREENSAVE
  3927.  
  3928.     #define SC_SCREENSAVE   0xF140
  3929.  
  3930. #endif  /* ifndef SC_SCREENSAVE */
  3931.  
  3932. #ifdef __cplusplus
  3933. }                       /* End of extern "C" { */
  3934. #endif  /* __cplusplus */
  3935.  
  3936. #ifdef _WIN32
  3937. #include <poppack.h>
  3938. #else
  3939. #ifndef RC_INVOKED
  3940. #pragma pack()
  3941. #endif
  3942. #endif
  3943.  
  3944. #endif  /* _INC_MMSYSTEM */
  3945.  
  3946. #if defined(__TOPLEVEL_MMSYSTEM_H_)
  3947. #undef __TOPLEVEL_NEXT_COMMON_INCLUDE__
  3948. #undef __TOPLEVEL_MMSYSTEM_H_
  3949. #include <next_common_undefines.h>
  3950. #endif /* __TOPLEVEL_MMSYSTEM_H_ */
  3951.