Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1917 lines
78 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* MMSYSTEM.H - Include file for Multimedia APIs */
  4. /* */
  5. /* Note: You must include WINDOWS.H before including this file. */
  6. /* */
  7. /* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. */
  8. /* */
  9. /****************************************************************************/
  10. /* If defined, the following flags inhibit inclusion
  11. * of the indicated items:
  12. *
  13. * MMNODRV - Installable driver support
  14. * MMNOSOUND - Sound support
  15. * MMNOWAVE - Waveform support
  16. * MMNOMIDI - MIDI support
  17. * MMNOAUX - Auxiliary audio support
  18. * MMNOTIMER - Timer support
  19. * MMNOJOY - Joystick support
  20. * MMNOMCI - MCI support
  21. * MMNOMMIO - Multimedia file I/O support
  22. * MMNOMMSYSTEM - General MMSYSTEM functions
  23. */
  24. #ifndef _INC_MMSYSTEM
  25. #define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */
  26. #ifndef RC_INVOKED
  27. #pragma pack(1) /* Assume byte packing throughout */
  28. #endif
  29. #ifdef __cplusplus
  30. extern "C" { /* Assume C declarations for C++ */
  31. #endif /* __cplusplus */
  32. /****************************************************************************
  33. General constants and data types
  34. ****************************************************************************/
  35. /* general constants */
  36. #define MAXPNAMELEN 32 /* max product name length (including NULL) */
  37. #define MAXERRORLENGTH 128 /* max error text length (including NULL) */
  38. /* general data types */
  39. typedef WORD VERSION; /* major (high byte), minor (low byte) */
  40. /* MMTIME data structure */
  41. typedef struct mmtime_tag {
  42. UINT wType; /* indicates the contents of the union */
  43. union {
  44. DWORD ms; /* milliseconds */
  45. DWORD sample; /* samples */
  46. DWORD cb; /* byte count */
  47. struct { /* SMPTE */
  48. BYTE hour; /* hours */
  49. BYTE min; /* minutes */
  50. BYTE sec; /* seconds */
  51. BYTE frame; /* frames */
  52. BYTE fps; /* frames per second */
  53. BYTE dummy; /* pad */
  54. } smpte;
  55. struct { /* MIDI */
  56. DWORD songptrpos; /* song pointer position */
  57. } midi;
  58. } u;
  59. } MMTIME;
  60. typedef MMTIME *PMMTIME;
  61. typedef MMTIME NEAR *NPMMTIME;
  62. typedef MMTIME FAR *LPMMTIME;
  63. /* types for wType field in MMTIME struct */
  64. #define TIME_MS 0x0001 /* time in milliseconds */
  65. #define TIME_SAMPLES 0x0002 /* number of wave samples */
  66. #define TIME_BYTES 0x0004 /* current byte offset */
  67. #define TIME_SMPTE 0x0008 /* SMPTE time */
  68. #define TIME_MIDI 0x0010 /* MIDI time */
  69. /****************************************************************************
  70. Multimedia Extensions Window Messages
  71. ****************************************************************************/
  72. #define MM_JOY1MOVE 0x3A0 /* joystick */
  73. #define MM_JOY2MOVE 0x3A1
  74. #define MM_JOY1ZMOVE 0x3A2
  75. #define MM_JOY2ZMOVE 0x3A3
  76. #define MM_JOY1BUTTONDOWN 0x3B5
  77. #define MM_JOY2BUTTONDOWN 0x3B6
  78. #define MM_JOY1BUTTONUP 0x3B7
  79. #define MM_JOY2BUTTONUP 0x3B8
  80. #define MM_MCINOTIFY 0x3B9 /* MCI */
  81. #define MM_WOM_OPEN 0x3BB /* waveform output */
  82. #define MM_WOM_CLOSE 0x3BC
  83. #define MM_WOM_DONE 0x3BD
  84. #define MM_WIM_OPEN 0x3BE /* waveform input */
  85. #define MM_WIM_CLOSE 0x3BF
  86. #define MM_WIM_DATA 0x3C0
  87. #define MM_MIM_OPEN 0x3C1 /* MIDI input */
  88. #define MM_MIM_CLOSE 0x3C2
  89. #define MM_MIM_DATA 0x3C3
  90. #define MM_MIM_LONGDATA 0x3C4
  91. #define MM_MIM_ERROR 0x3C5
  92. #define MM_MIM_LONGERROR 0x3C6
  93. #define MM_MOM_OPEN 0x3C7 /* MIDI output */
  94. #define MM_MOM_CLOSE 0x3C8
  95. #define MM_MOM_DONE 0x3C9
  96. /****************************************************************************
  97. String resource number bases (internal use)
  98. ****************************************************************************/
  99. #define MMSYSERR_BASE 0
  100. #define WAVERR_BASE 32
  101. #define MIDIERR_BASE 64
  102. #define TIMERR_BASE 96
  103. #define JOYERR_BASE 160
  104. #define MCIERR_BASE 256
  105. #define MCI_STRING_OFFSET 512
  106. #define MCI_VD_OFFSET 1024
  107. #define MCI_CD_OFFSET 1088
  108. #define MCI_WAVE_OFFSET 1152
  109. #define MCI_SEQ_OFFSET 1216
  110. /****************************************************************************
  111. General error return values
  112. ****************************************************************************/
  113. /* general error return values */
  114. #define MMSYSERR_NOERROR 0 /* no error */
  115. #define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
  116. #define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
  117. #define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
  118. #define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
  119. #define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
  120. #define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
  121. #define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
  122. #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
  123. #define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
  124. #define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
  125. #define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
  126. #define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
  127. #if (WINVER < 0x030a)
  128. DECLARE_HANDLE(HDRVR);
  129. #endif /* ifdef WINVER < 0x030a */
  130. #ifndef MMNODRV
  131. /****************************************************************************
  132. Installable driver support
  133. ****************************************************************************/
  134. #if (WINVER < 0x030a)
  135. /* return values from DriverProc() function */
  136. #define DRV_CANCEL 0x0000
  137. #define DRV_OK 0x0001
  138. #define DRV_RESTART 0x0002
  139. /* Driver messages */
  140. #define DRV_LOAD 0x0001
  141. #define DRV_ENABLE 0x0002
  142. #define DRV_OPEN 0x0003
  143. #define DRV_CLOSE 0x0004
  144. #define DRV_DISABLE 0x0005
  145. #define DRV_FREE 0x0006
  146. #define DRV_CONFIGURE 0x0007
  147. #define DRV_QUERYCONFIGURE 0x0008
  148. #define DRV_INSTALL 0x0009
  149. #define DRV_REMOVE 0x000A
  150. #define DRV_RESERVED 0x0800
  151. #define DRV_USER 0x4000
  152. /* LPARAM of DRV_CONFIGURE message */
  153. typedef struct tagDRVCONFIGINFO {
  154. DWORD dwDCISize;
  155. LPCSTR lpszDCISectionName;
  156. LPCSTR lpszDCIAliasName;
  157. } DRVCONFIGINFO;
  158. typedef DRVCONFIGINFO *PDRVCONFIGINFO;
  159. typedef DRVCONFIGINFO NEAR *NPDRVCONFIGINFO;
  160. typedef DRVCONFIGINFO FAR *LPDRVCONFIGINFO;
  161. /* installable driver function prototypes */
  162. LRESULT WINAPI DrvClose(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
  163. HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName,
  164. LPARAM lParam2);
  165. LRESULT WINAPI DrvSendMessage(HDRVR hDriver, UINT uMessage,
  166. LPARAM lParam1, LPARAM lParam2);
  167. HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hDriver);
  168. LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID,
  169. UINT uMessage, LPARAM lParam1, LPARAM lParam2);
  170. #define DefDriverProc DrvDefDriverProc
  171. #endif /* ifdef WINVER < 0x030a */
  172. #if (WINVER >= 0x030a)
  173. /* return values from DriverProc() function */
  174. #define DRV_CANCEL DRVCNF_CANCEL
  175. #define DRV_OK DRVCNF_OK
  176. #define DRV_RESTART DRVCNF_RESTART
  177. #endif /* ifdef WINVER >= 0x030a */
  178. #define DRV_MCI_FIRST DRV_RESERVED
  179. #define DRV_MCI_LAST (DRV_RESERVED + 0xFFF)
  180. #endif /* ifndef MMNODRV */
  181. /****************************************************************************
  182. Driver callback support
  183. ****************************************************************************/
  184. /* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */
  185. /* midiOutOpen() to specify the type of the dwCallback parameter. */
  186. #define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
  187. #define CALLBACK_NULL 0x00000000l /* no callback */
  188. #define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
  189. #define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
  190. #define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
  191. /* driver callback prototypes */
  192. typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
  193. typedef DRVCALLBACK FAR *LPDRVCALLBACK;
  194. /****************************************************************************
  195. Manufacturer and product IDs
  196. Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
  197. MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
  198. ****************************************************************************/
  199. /* manufacturer IDs */
  200. #define MM_MICROSOFT 1 /* Microsoft Corp. */
  201. /* product IDs */
  202. #define MM_MIDI_MAPPER 1 /* MIDI Mapper */
  203. #define MM_WAVE_MAPPER 2 /* Wave Mapper */
  204. #define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
  205. #define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
  206. #define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
  207. #define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
  208. #define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
  209. #define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
  210. #define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
  211. #define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
  212. #define MM_PC_JOYSTICK 12 /* Joystick adapter */
  213. #ifndef MMNOMMSYSTEM
  214. /****************************************************************************
  215. General MMSYSTEM support
  216. ****************************************************************************/
  217. WORD WINAPI mmsystemGetVersion(void);
  218. void WINAPI OutputDebugStr(LPCSTR);
  219. #endif /* ifndef MMNOMMSYSTEM */
  220. #ifndef MMNOSOUND
  221. /****************************************************************************
  222. Sound support
  223. ****************************************************************************/
  224. BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
  225. /* flag values for wFlags parameter */
  226. #define SND_SYNC 0x0000 /* play synchronously (default) */
  227. #define SND_ASYNC 0x0001 /* play asynchronously */
  228. #define SND_NODEFAULT 0x0002 /* don't use default sound */
  229. #define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */
  230. #define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
  231. #define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
  232. #endif /* ifndef MMNOSOUND */
  233. #ifndef MMNOWAVE
  234. /****************************************************************************
  235. Waveform audio support
  236. ****************************************************************************/
  237. /* waveform audio error return values */
  238. #define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
  239. #define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
  240. #define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
  241. #define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
  242. #define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
  243. /* waveform audio data types */
  244. DECLARE_HANDLE(HWAVE);
  245. DECLARE_HANDLE(HWAVEIN);
  246. DECLARE_HANDLE(HWAVEOUT);
  247. typedef HWAVEIN FAR *LPHWAVEIN;
  248. typedef HWAVEOUT FAR *LPHWAVEOUT;
  249. typedef DRVCALLBACK WAVECALLBACK;
  250. typedef WAVECALLBACK FAR *LPWAVECALLBACK;
  251. /* wave callback messages */
  252. #define WOM_OPEN MM_WOM_OPEN
  253. #define WOM_CLOSE MM_WOM_CLOSE
  254. #define WOM_DONE MM_WOM_DONE
  255. #define WIM_OPEN MM_WIM_OPEN
  256. #define WIM_CLOSE MM_WIM_CLOSE
  257. #define WIM_DATA MM_WIM_DATA
  258. /* device ID for wave device mapper */
  259. #define WAVE_MAPPER (-1)
  260. /* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
  261. #define WAVE_FORMAT_QUERY 0x0001
  262. #define WAVE_ALLOWSYNC 0x0002
  263. /* wave data block header */
  264. typedef struct wavehdr_tag {
  265. LPSTR lpData; /* pointer to locked data buffer */
  266. DWORD dwBufferLength; /* length of data buffer */
  267. DWORD dwBytesRecorded; /* used for input only */
  268. DWORD dwUser; /* for client's use */
  269. DWORD dwFlags; /* assorted flags (see defines) */
  270. DWORD dwLoops; /* loop control counter */
  271. struct wavehdr_tag far *lpNext; /* reserved for driver */
  272. DWORD reserved; /* reserved for driver */
  273. } WAVEHDR;
  274. typedef WAVEHDR *PWAVEHDR;
  275. typedef WAVEHDR NEAR *NPWAVEHDR;
  276. typedef WAVEHDR FAR *LPWAVEHDR;
  277. /* flags for dwFlags field of WAVEHDR */
  278. #define WHDR_DONE 0x00000001 /* done bit */
  279. #define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
  280. #define WHDR_BEGINLOOP 0x00000004 /* loop start block */
  281. #define WHDR_ENDLOOP 0x00000008 /* loop end block */
  282. #define WHDR_INQUEUE 0x00000010 /* reserved for driver */
  283. /* waveform output device capabilities structure */
  284. typedef struct waveoutcaps_tag {
  285. UINT wMid; /* manufacturer ID */
  286. UINT wPid; /* product ID */
  287. VERSION vDriverVersion; /* version of the driver */
  288. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  289. DWORD dwFormats; /* formats supported */
  290. UINT wChannels; /* number of sources supported */
  291. DWORD dwSupport; /* functionality supported by driver */
  292. } WAVEOUTCAPS;
  293. typedef WAVEOUTCAPS *PWAVEOUTCAPS;
  294. typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS;
  295. typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS;
  296. /* flags for dwSupport field of WAVEOUTCAPS */
  297. #define WAVECAPS_PITCH 0x0001 /* supports pitch control */
  298. #define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
  299. #define WAVECAPS_VOLUME 0x0004 /* supports volume control */
  300. #define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
  301. #define WAVECAPS_SYNC 0x0010
  302. /* waveform input device capabilities structure */
  303. typedef struct waveincaps_tag {
  304. UINT wMid; /* manufacturer ID */
  305. UINT wPid; /* product ID */
  306. VERSION vDriverVersion; /* version of the driver */
  307. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  308. DWORD dwFormats; /* formats supported */
  309. UINT wChannels; /* number of channels supported */
  310. } WAVEINCAPS;
  311. typedef WAVEINCAPS *PWAVEINCAPS;
  312. typedef WAVEINCAPS NEAR *NPWAVEINCAPS;
  313. typedef WAVEINCAPS FAR *LPWAVEINCAPS;
  314. /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */
  315. #define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
  316. #define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
  317. #define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
  318. #define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
  319. #define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
  320. #define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
  321. #define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
  322. #define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
  323. #define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
  324. #define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
  325. #define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
  326. #define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
  327. #define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
  328. /* general waveform format structure (information common to all formats) */
  329. typedef struct waveformat_tag {
  330. WORD wFormatTag; /* format type */
  331. WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */
  332. DWORD nSamplesPerSec; /* sample rate */
  333. DWORD nAvgBytesPerSec; /* for buffer estimation */
  334. WORD nBlockAlign; /* block size of data */
  335. } WAVEFORMAT;
  336. typedef WAVEFORMAT *PWAVEFORMAT;
  337. typedef WAVEFORMAT NEAR *NPWAVEFORMAT;
  338. typedef WAVEFORMAT FAR *LPWAVEFORMAT;
  339. /* flags for wFormatTag field of WAVEFORMAT */
  340. #define WAVE_FORMAT_PCM 1
  341. /* specific waveform format structure for PCM data */
  342. typedef struct pcmwaveformat_tag {
  343. WAVEFORMAT wf;
  344. WORD wBitsPerSample;
  345. } PCMWAVEFORMAT;
  346. typedef PCMWAVEFORMAT *PPCMWAVEFORMAT;
  347. typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT;
  348. typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT;
  349. /* waveform audio function prototypes */
  350. UINT WINAPI waveOutGetNumDevs(void);
  351. UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
  352. UINT uSize);
  353. UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  354. UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  355. UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  356. UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
  357. const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  358. UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
  359. UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
  360. WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  361. UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
  362. WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  363. UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
  364. UINT uSize);
  365. UINT WINAPI waveOutPause(HWAVEOUT hWaveOut);
  366. UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut);
  367. UINT WINAPI waveOutReset(HWAVEOUT hWaveOut);
  368. UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut);
  369. UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
  370. UINT uSize);
  371. UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
  372. UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
  373. UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
  374. UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
  375. UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
  376. #if (WINVER >= 0x030a)
  377. DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
  378. #endif /* ifdef WINVER >= 0x030a */
  379. UINT WINAPI waveInGetNumDevs(void);
  380. UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
  381. UINT uSize);
  382. UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  383. UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
  384. const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  385. UINT WINAPI waveInClose(HWAVEIN hWaveIn);
  386. UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
  387. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  388. UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
  389. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  390. UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
  391. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  392. UINT WINAPI waveInStart(HWAVEIN hWaveIn);
  393. UINT WINAPI waveInStop(HWAVEIN hWaveIn);
  394. UINT WINAPI waveInReset(HWAVEIN hWaveIn);
  395. UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
  396. UINT uSize);
  397. UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
  398. #if (WINVER >= 0x030a)
  399. DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
  400. #endif /* ifdef WINVER >= 0x030a */
  401. #endif /* ifndef MMNOWAVE */
  402. #ifndef MMNOMIDI
  403. /****************************************************************************
  404. MIDI audio support
  405. ****************************************************************************/
  406. /* MIDI error return values */
  407. #define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
  408. #define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
  409. #define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */
  410. #define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
  411. #define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
  412. #define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */
  413. #define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */
  414. /* MIDI audio data types */
  415. DECLARE_HANDLE(HMIDI);
  416. DECLARE_HANDLE(HMIDIIN);
  417. DECLARE_HANDLE(HMIDIOUT);
  418. typedef HMIDIIN FAR *LPHMIDIIN;
  419. typedef HMIDIOUT FAR *LPHMIDIOUT;
  420. typedef DRVCALLBACK MIDICALLBACK;
  421. typedef MIDICALLBACK FAR *LPMIDICALLBACK;
  422. #define MIDIPATCHSIZE 128
  423. typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  424. typedef WORD FAR *LPPATCHARRAY;
  425. typedef WORD KEYARRAY[MIDIPATCHSIZE];
  426. typedef WORD FAR *LPKEYARRAY;
  427. /* MIDI callback messages */
  428. #define MIM_OPEN MM_MIM_OPEN
  429. #define MIM_CLOSE MM_MIM_CLOSE
  430. #define MIM_DATA MM_MIM_DATA
  431. #define MIM_LONGDATA MM_MIM_LONGDATA
  432. #define MIM_ERROR MM_MIM_ERROR
  433. #define MIM_LONGERROR MM_MIM_LONGERROR
  434. #define MOM_OPEN MM_MOM_OPEN
  435. #define MOM_CLOSE MM_MOM_CLOSE
  436. #define MOM_DONE MM_MOM_DONE
  437. /* device ID for MIDI mapper */
  438. #define MIDIMAPPER (-1)
  439. #define MIDI_MAPPER (-1)
  440. /* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */
  441. #define MIDI_CACHE_ALL 1
  442. #define MIDI_CACHE_BESTFIT 2
  443. #define MIDI_CACHE_QUERY 3
  444. #define MIDI_UNCACHE 4
  445. /* MIDI output device capabilities structure */
  446. typedef struct midioutcaps_tag {
  447. UINT wMid; /* manufacturer ID */
  448. UINT wPid; /* product ID */
  449. VERSION vDriverVersion; /* version of the driver */
  450. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  451. UINT wTechnology; /* type of device */
  452. UINT wVoices; /* # of voices (internal synth only) */
  453. UINT wNotes; /* max # of notes (internal synth only) */
  454. UINT wChannelMask; /* channels used (internal synth only) */
  455. DWORD dwSupport; /* functionality supported by driver */
  456. } MIDIOUTCAPS;
  457. typedef MIDIOUTCAPS *PMIDIOUTCAPS;
  458. typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS;
  459. typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS;
  460. /* flags for wTechnology field of MIDIOUTCAPS structure */
  461. #define MOD_MIDIPORT 1 /* output port */
  462. #define MOD_SYNTH 2 /* generic internal synth */
  463. #define MOD_SQSYNTH 3 /* square wave internal synth */
  464. #define MOD_FMSYNTH 4 /* FM internal synth */
  465. #define MOD_MAPPER 5 /* MIDI mapper */
  466. /* flags for dwSupport field of MIDIOUTCAPS structure */
  467. #define MIDICAPS_VOLUME 0x0001 /* supports volume control */
  468. #define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  469. #define MIDICAPS_CACHE 0x0004
  470. /* MIDI output device capabilities structure */
  471. typedef struct midiincaps_tag {
  472. UINT wMid; /* manufacturer ID */
  473. UINT wPid; /* product ID */
  474. VERSION vDriverVersion; /* version of the driver */
  475. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  476. } MIDIINCAPS;
  477. typedef MIDIINCAPS *PMIDIINCAPS;
  478. typedef MIDIINCAPS NEAR *NPMIDIINCAPS;
  479. typedef MIDIINCAPS FAR *LPMIDIINCAPS;
  480. /* MIDI data block header */
  481. typedef struct midihdr_tag {
  482. LPSTR lpData; /* pointer to locked data block */
  483. DWORD dwBufferLength; /* length of data in data block */
  484. DWORD dwBytesRecorded; /* used for input only */
  485. DWORD dwUser; /* for client's use */
  486. DWORD dwFlags; /* assorted flags (see defines) */
  487. struct midihdr_tag far *lpNext; /* reserved for driver */
  488. DWORD reserved; /* reserved for driver */
  489. } MIDIHDR;
  490. typedef MIDIHDR *PMIDIHDR;
  491. typedef MIDIHDR NEAR *NPMIDIHDR;
  492. typedef MIDIHDR FAR *LPMIDIHDR;
  493. /* flags for dwFlags field of MIDIHDR structure */
  494. #define MHDR_DONE 0x00000001 /* done bit */
  495. #define MHDR_PREPARED 0x00000002 /* set if header prepared */
  496. #define MHDR_INQUEUE 0x00000004 /* reserved for driver */
  497. /* MIDI function prototypes */
  498. UINT WINAPI midiOutGetNumDevs(void);
  499. UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
  500. MIDIOUTCAPS FAR* lpCaps, UINT uSize);
  501. UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  502. UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  503. UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  504. UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
  505. DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  506. UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
  507. UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
  508. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  509. UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
  510. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  511. UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
  512. UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
  513. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  514. UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
  515. UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
  516. UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
  517. UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
  518. UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
  519. UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
  520. #if (WINVER >= 0x030a)
  521. DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
  522. #endif /* ifdef WINVER >= 0x030a */
  523. UINT WINAPI midiInGetNumDevs(void);
  524. UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
  525. LPMIDIINCAPS lpCaps, UINT uSize);
  526. UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  527. UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
  528. DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  529. UINT WINAPI midiInClose(HMIDIIN hMidiIn);
  530. UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
  531. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  532. UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
  533. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  534. UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
  535. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  536. UINT WINAPI midiInStart(HMIDIIN hMidiIn);
  537. UINT WINAPI midiInStop(HMIDIIN hMidiIn);
  538. UINT WINAPI midiInReset(HMIDIIN hMidiIn);
  539. UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
  540. #if (WINVER >= 0x030a)
  541. DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
  542. #endif /* ifdef WINVER >= 0x030a */
  543. #endif /* ifndef MMNOMIDI */
  544. #ifndef MMNOAUX
  545. /****************************************************************************
  546. Auxiliary audio support
  547. ****************************************************************************/
  548. /* device ID for aux device mapper */
  549. #define AUX_MAPPER (-1)
  550. /* Auxiliary audio device capabilities structure */
  551. typedef struct auxcaps_tag {
  552. UINT wMid; /* manufacturer ID */
  553. UINT wPid; /* product ID */
  554. VERSION vDriverVersion; /* version of the driver */
  555. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  556. UINT wTechnology; /* type of device */
  557. DWORD dwSupport; /* functionality supported by driver */
  558. } AUXCAPS;
  559. typedef AUXCAPS *PAUXCAPS;
  560. typedef AUXCAPS NEAR *NPAUXCAPS;
  561. typedef AUXCAPS FAR *LPAUXCAPS;
  562. /* flags for wTechnology field in AUXCAPS structure */
  563. #define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
  564. #define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
  565. /* flags for dwSupport field in AUXCAPS structure */
  566. #define AUXCAPS_VOLUME 0x0001 /* supports volume control */
  567. #define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  568. /* auxiliary audio function prototypes */
  569. UINT WINAPI auxGetNumDevs(void);
  570. UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
  571. UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  572. UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  573. #if (WINVER >= 0x030a)
  574. DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
  575. #endif /* ifdef WINVER >= 0x030a */
  576. #endif /* ifndef MMNOAUX */
  577. #ifndef MMNOTIMER
  578. /****************************************************************************
  579. Timer support
  580. ****************************************************************************/
  581. /* timer error return values */
  582. #define TIMERR_NOERROR (0) /* no error */
  583. #define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
  584. #define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
  585. /* timer data types */
  586. typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
  587. typedef TIMECALLBACK FAR *LPTIMECALLBACK;
  588. /* flags for wFlags parameter of timeSetEvent() function */
  589. #define TIME_ONESHOT 0 /* program timer for single event */
  590. #define TIME_PERIODIC 1 /* program for continuous periodic event */
  591. /* timer device capabilities data structure */
  592. typedef struct timecaps_tag {
  593. UINT wPeriodMin; /* minimum period supported */
  594. UINT wPeriodMax; /* maximum period supported */
  595. } TIMECAPS;
  596. typedef TIMECAPS *PTIMECAPS;
  597. typedef TIMECAPS NEAR *NPTIMECAPS;
  598. typedef TIMECAPS FAR *LPTIMECAPS;
  599. /* timer function prototypes */
  600. UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
  601. DWORD WINAPI timeGetTime(void);
  602. UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
  603. LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
  604. UINT WINAPI timeKillEvent(UINT uTimerID);
  605. UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
  606. UINT WINAPI timeBeginPeriod(UINT uPeriod);
  607. UINT WINAPI timeEndPeriod(UINT uPeriod);
  608. #endif /* ifndef MMNOTIMER */
  609. #ifndef MMNOJOY
  610. /****************************************************************************
  611. Joystick support
  612. ****************************************************************************/
  613. /* joystick error return values */
  614. #define JOYERR_NOERROR (0) /* no error */
  615. #define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
  616. #define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
  617. #define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
  618. /* constants used with JOYINFO structure and MM_JOY* messages */
  619. #define JOY_BUTTON1 0x0001
  620. #define JOY_BUTTON2 0x0002
  621. #define JOY_BUTTON3 0x0004
  622. #define JOY_BUTTON4 0x0008
  623. #define JOY_BUTTON1CHG 0x0100
  624. #define JOY_BUTTON2CHG 0x0200
  625. #define JOY_BUTTON3CHG 0x0400
  626. #define JOY_BUTTON4CHG 0x0800
  627. /* joystick ID constants */
  628. #define JOYSTICKID1 0
  629. #define JOYSTICKID2 1
  630. /* joystick device capabilities data structure */
  631. typedef struct joycaps_tag {
  632. UINT wMid; /* manufacturer ID */
  633. UINT wPid; /* product ID */
  634. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  635. UINT wXmin; /* minimum x position value */
  636. UINT wXmax; /* maximum x position value */
  637. UINT wYmin; /* minimum y position value */
  638. UINT wYmax; /* maximum y position value */
  639. UINT wZmin; /* minimum z position value */
  640. UINT wZmax; /* maximum z position value */
  641. UINT wNumButtons; /* number of buttons */
  642. UINT wPeriodMin; /* minimum message period when captured */
  643. UINT wPeriodMax; /* maximum message period when captured */
  644. } JOYCAPS;
  645. typedef JOYCAPS *PJOYCAPS;
  646. typedef JOYCAPS NEAR *NPJOYCAPS;
  647. typedef JOYCAPS FAR *LPJOYCAPS;
  648. /* joystick information data structure */
  649. typedef struct joyinfo_tag {
  650. UINT wXpos; /* x position */
  651. UINT wYpos; /* y position */
  652. UINT wZpos; /* z position */
  653. UINT wButtons; /* button states */
  654. } JOYINFO;
  655. typedef JOYINFO *PJOYINFO;
  656. typedef JOYINFO NEAR *NPJOYINFO;
  657. typedef JOYINFO FAR *LPJOYINFO;
  658. /* joystick function prototypes */
  659. UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
  660. UINT WINAPI joyGetNumDevs(void);
  661. UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
  662. UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
  663. UINT WINAPI joyReleaseCapture(UINT uJoyID);
  664. UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
  665. BOOL bChanged);
  666. UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
  667. #endif /* ifndef MMNOJOY */
  668. #ifndef MMNOMMIO
  669. /****************************************************************************
  670. Multimedia File I/O support
  671. ****************************************************************************/
  672. /* MMIO error return values */
  673. #define MMIOERR_BASE 256
  674. #define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
  675. #define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
  676. #define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
  677. #define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
  678. #define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
  679. #define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
  680. #define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
  681. #define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
  682. #define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
  683. #define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
  684. /* MMIO constants */
  685. #define CFSEPCHAR '+' /* compound file name separator char. */
  686. /* MMIO data types */
  687. typedef DWORD FOURCC; /* a four character code */
  688. typedef char _huge * HPSTR; /* a huge version of LPSTR */
  689. DECLARE_HANDLE(HMMIO); /* a handle to an open file */
  690. typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
  691. LPARAM lParam1, LPARAM lParam2);
  692. typedef MMIOPROC FAR *LPMMIOPROC;
  693. /* general MMIO information data structure */
  694. typedef struct _MMIOINFO
  695. {
  696. /* general fields */
  697. DWORD dwFlags; /* general status flags */
  698. FOURCC fccIOProc; /* pointer to I/O procedure */
  699. LPMMIOPROC pIOProc; /* pointer to I/O procedure */
  700. UINT wErrorRet; /* place for error to be returned */
  701. HTASK htask; /* alternate local task */
  702. /* fields maintained by MMIO functions during buffered I/O */
  703. LONG cchBuffer; /* size of I/O buffer (or 0L) */
  704. HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
  705. HPSTR pchNext; /* pointer to next byte to read/write */
  706. HPSTR pchEndRead; /* pointer to last valid byte to read */
  707. HPSTR pchEndWrite; /* pointer to last byte to write */
  708. LONG lBufOffset; /* disk offset of start of buffer */
  709. /* fields maintained by I/O procedure */
  710. LONG lDiskOffset; /* disk offset of next read or write */
  711. DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
  712. /* other fields maintained by MMIO */
  713. DWORD dwReserved1; /* reserved for MMIO use */
  714. DWORD dwReserved2; /* reserved for MMIO use */
  715. HMMIO hmmio; /* handle to open file */
  716. } MMIOINFO;
  717. typedef MMIOINFO *PMMIOINFO;
  718. typedef MMIOINFO NEAR *NPMMIOINFO;
  719. typedef MMIOINFO FAR *LPMMIOINFO;
  720. /* RIFF chunk information data structure */
  721. typedef struct _MMCKINFO
  722. {
  723. FOURCC ckid; /* chunk ID */
  724. DWORD cksize; /* chunk size */
  725. FOURCC fccType; /* form type or list type */
  726. DWORD dwDataOffset; /* offset of data portion of chunk */
  727. DWORD dwFlags; /* flags used by MMIO functions */
  728. } MMCKINFO;
  729. typedef MMCKINFO *PMMCKINFO;
  730. typedef MMCKINFO NEAR *NPMMCKINFO;
  731. typedef MMCKINFO FAR *LPMMCKINFO;
  732. /* bit field masks */
  733. #define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
  734. #define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
  735. /* constants for dwFlags field of MMIOINFO */
  736. #define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
  737. #define MMIO_PARSE 0x00000100 /* parse new file returning path */
  738. #define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
  739. #define MMIO_EXIST 0x00004000 /* checks for existence of file */
  740. #define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
  741. #define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
  742. #define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
  743. /* read/write mode numbers (bit field MMIO_RWMODE) */
  744. #define MMIO_READ 0x00000000 /* open file for reading only */
  745. #define MMIO_WRITE 0x00000001 /* open file for writing only */
  746. #define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
  747. /* share mode numbers (bit field MMIO_SHAREMODE) */
  748. #define MMIO_COMPAT 0x00000000 /* compatibility mode */
  749. #define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
  750. #define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
  751. #define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
  752. #define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
  753. /* various MMIO flags */
  754. #define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
  755. #define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
  756. #define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
  757. #define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
  758. #define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
  759. #define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
  760. #define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
  761. #define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
  762. #define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
  763. #define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
  764. #define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
  765. #define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
  766. /* message numbers for MMIOPROC I/O procedure functions */
  767. #define MMIOM_READ MMIO_READ /* read */
  768. #define MMIOM_WRITE MMIO_WRITE /* write */
  769. #define MMIOM_SEEK 2 /* seek to a new position in file */
  770. #define MMIOM_OPEN 3 /* open file */
  771. #define MMIOM_CLOSE 4 /* close file */
  772. #define MMIOM_WRITEFLUSH 5 /* write and flush */
  773. #if (WINVER >= 0x030a)
  774. #define MMIOM_RENAME 6 /* rename specified file */
  775. #endif /* ifdef WINVER >= 0x030a */
  776. #define MMIOM_USER 0x8000 /* beginning of user-defined messages */
  777. /* standard four character codes */
  778. #define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
  779. #define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
  780. /* four character codes used to identify standard built-in I/O procedures */
  781. #define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
  782. #define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
  783. /* flags for mmioSeek() */
  784. #ifndef SEEK_SET
  785. #define SEEK_SET 0 /* seek to an absolute position */
  786. #define SEEK_CUR 1 /* seek relative to current position */
  787. #define SEEK_END 2 /* seek relative to end of file */
  788. #endif /* ifndef SEEK_SET */
  789. /* other constants */
  790. #define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
  791. /* MMIO macros */
  792. #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
  793. ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
  794. ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  795. /* MMIO function prototypes */
  796. FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
  797. LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
  798. DWORD dwFlags);
  799. HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
  800. DWORD dwOpenFlags);
  801. #if (WINVER >= 0x030a)
  802. UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
  803. MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags);
  804. #endif /* ifdef WINVER >= 0x030a */
  805. UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags);
  806. LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  807. LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch);
  808. LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  809. UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  810. UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  811. UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  812. UINT uFlags);
  813. UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags);
  814. UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  815. LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage,
  816. LPARAM lParam1, LPARAM lParam2);
  817. UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
  818. const MMCKINFO FAR* lpckParent, UINT uFlags);
  819. UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  820. UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  821. #endif /* ifndef MMNOMMIO */
  822. #ifndef MMNOMCI
  823. /****************************************************************************
  824. MCI support
  825. ****************************************************************************/
  826. typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData);
  827. /* MCI function prototypes */
  828. DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage,
  829. DWORD dwParam1, DWORD dwParam2);
  830. DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
  831. LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  832. UINT WINAPI mciGetDeviceID (LPCSTR lpstrName);
  833. UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID,
  834. LPCSTR lpstrType);
  835. BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
  836. UINT uLength);
  837. BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
  838. DWORD dwYieldData);
  839. #if (WINVER >= 0x030a)
  840. HTASK WINAPI mciGetCreatorTask(UINT uDeviceID);
  841. YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData);
  842. #endif /* ifdef WINVER >= 0x030a */
  843. #if (WINVER < 0x030a)
  844. BOOL WINAPI mciExecute (LPCSTR lpstrCommand);
  845. #endif /* ifdef WINVER < 0x030a */
  846. /* MCI error return values */
  847. #define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
  848. #define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
  849. #define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
  850. #define MCIERR_HARDWARE (MCIERR_BASE + 6)
  851. #define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
  852. #define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
  853. #define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
  854. #define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
  855. #define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
  856. #define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
  857. #define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
  858. #define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
  859. #define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
  860. #define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
  861. #define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
  862. #define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
  863. #define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
  864. #define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
  865. #define MCIERR_INTERNAL (MCIERR_BASE + 21)
  866. #define MCIERR_DRIVER (MCIERR_BASE + 22)
  867. #define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
  868. #define MCIERR_MULTIPLE (MCIERR_BASE + 24)
  869. #define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
  870. #define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
  871. #define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
  872. #define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
  873. #define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
  874. #define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
  875. #define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
  876. #define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
  877. #define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
  878. #define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
  879. #define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
  880. #define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
  881. #define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
  882. #define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
  883. #define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
  884. #define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
  885. #define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
  886. #define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
  887. #define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
  888. #define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
  889. #define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
  890. #define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
  891. #define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
  892. #define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
  893. #define MCIERR_GET_CD (MCIERR_BASE + 51)
  894. #define MCIERR_SET_CD (MCIERR_BASE + 52)
  895. #define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
  896. #define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
  897. #define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
  898. #define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
  899. #define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
  900. #define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
  901. #define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
  902. #define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
  903. #define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
  904. #define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
  905. #define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
  906. #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
  907. #define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
  908. #define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
  909. #define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
  910. #define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
  911. #define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
  912. #define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
  913. #define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
  914. #define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
  915. #define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
  916. #define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
  917. #define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
  918. #define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
  919. #define MCIERR_FILE_READ (MCIERR_BASE + 92)
  920. #define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
  921. /* all custom device driver errors must be >= than this value */
  922. #define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
  923. /* MCI command message identifiers */
  924. #define MCI_OPEN 0x0803
  925. #define MCI_CLOSE 0x0804
  926. #define MCI_ESCAPE 0x0805
  927. #define MCI_PLAY 0x0806
  928. #define MCI_SEEK 0x0807
  929. #define MCI_STOP 0x0808
  930. #define MCI_PAUSE 0x0809
  931. #define MCI_INFO 0x080A
  932. #define MCI_GETDEVCAPS 0x080B
  933. #define MCI_SPIN 0x080C
  934. #define MCI_SET 0x080D
  935. #define MCI_STEP 0x080E
  936. #define MCI_RECORD 0x080F
  937. #define MCI_SYSINFO 0x0810
  938. #define MCI_BREAK 0x0811
  939. #define MCI_SOUND 0x0812
  940. #define MCI_SAVE 0x0813
  941. #define MCI_STATUS 0x0814
  942. #define MCI_CUE 0x0830
  943. #define MCI_REALIZE 0x0840
  944. #define MCI_WINDOW 0x0841
  945. #define MCI_PUT 0x0842
  946. #define MCI_WHERE 0x0843
  947. #define MCI_FREEZE 0x0844
  948. #define MCI_UNFREEZE 0x0845
  949. #define MCI_LOAD 0x0850
  950. #define MCI_CUT 0x0851
  951. #define MCI_COPY 0x0852
  952. #define MCI_PASTE 0x0853
  953. #define MCI_UPDATE 0x0854
  954. #define MCI_RESUME 0x0855
  955. #define MCI_DELETE 0x0856
  956. /* all custom MCI command messages must be >= than this value */
  957. #define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST)
  958. /* device ID for "all devices" */
  959. #define MCI_ALL_DEVICE_ID 0xFFFF
  960. /* constants for predefined MCI device types */
  961. #define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1)
  962. #define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2)
  963. #define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3)
  964. #define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4)
  965. #define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5)
  966. #define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6)
  967. #define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7)
  968. #define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8)
  969. #define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9)
  970. #define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10)
  971. #define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11)
  972. #define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
  973. #define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
  974. /* return values for 'status mode' command */
  975. #define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
  976. #define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
  977. #define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
  978. #define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
  979. #define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
  980. #define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
  981. #define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
  982. /* constants used in 'set time format' and 'status time format' commands */
  983. #define MCI_FORMAT_MILLISECONDS 0
  984. #define MCI_FORMAT_HMS 1
  985. #define MCI_FORMAT_MSF 2
  986. #define MCI_FORMAT_FRAMES 3
  987. #define MCI_FORMAT_SMPTE_24 4
  988. #define MCI_FORMAT_SMPTE_25 5
  989. #define MCI_FORMAT_SMPTE_30 6
  990. #define MCI_FORMAT_SMPTE_30DROP 7
  991. #define MCI_FORMAT_BYTES 8
  992. #define MCI_FORMAT_SAMPLES 9
  993. #define MCI_FORMAT_TMSF 10
  994. /* MCI time format conversion macros */
  995. #define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
  996. #define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
  997. #define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
  998. #define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
  999. ((WORD)(s)<<8)) | \
  1000. (((DWORD)(BYTE)(f))<<16)))
  1001. #define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
  1002. #define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
  1003. #define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
  1004. #define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
  1005. #define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
  1006. ((WORD)(m)<<8)) | \
  1007. (((DWORD)(BYTE)(s) | \
  1008. ((WORD)(f)<<8))<<16)))
  1009. #define MCI_HMS_HOUR(hms) ((BYTE)(hms))
  1010. #define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
  1011. #define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
  1012. #define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
  1013. ((WORD)(m)<<8)) | \
  1014. (((DWORD)(BYTE)(s))<<16)))
  1015. /* flags for wParam of MM_MCINOTIFY message */
  1016. #define MCI_NOTIFY_SUCCESSFUL 0x0001
  1017. #define MCI_NOTIFY_SUPERSEDED 0x0002
  1018. #define MCI_NOTIFY_ABORTED 0x0004
  1019. #define MCI_NOTIFY_FAILURE 0x0008
  1020. /* common flags for dwFlags parameter of MCI command messages */
  1021. #define MCI_NOTIFY 0x00000001L
  1022. #define MCI_WAIT 0x00000002L
  1023. #define MCI_FROM 0x00000004L
  1024. #define MCI_TO 0x00000008L
  1025. #define MCI_TRACK 0x00000010L
  1026. /* flags for dwFlags parameter of MCI_OPEN command message */
  1027. #define MCI_OPEN_SHAREABLE 0x00000100L
  1028. #define MCI_OPEN_ELEMENT 0x00000200L
  1029. #define MCI_OPEN_ALIAS 0x00000400L
  1030. #define MCI_OPEN_ELEMENT_ID 0x00000800L
  1031. #define MCI_OPEN_TYPE_ID 0x00001000L
  1032. #define MCI_OPEN_TYPE 0x00002000L
  1033. /* flags for dwFlags parameter of MCI_SEEK command message */
  1034. #define MCI_SEEK_TO_START 0x00000100L
  1035. #define MCI_SEEK_TO_END 0x00000200L
  1036. /* flags for dwFlags parameter of MCI_STATUS command message */
  1037. #define MCI_STATUS_ITEM 0x00000100L
  1038. #define MCI_STATUS_START 0x00000200L
  1039. /* flags for dwItem field of the MCI_STATUS_PARMS parameter block */
  1040. #define MCI_STATUS_LENGTH 0x00000001L
  1041. #define MCI_STATUS_POSITION 0x00000002L
  1042. #define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
  1043. #define MCI_STATUS_MODE 0x00000004L
  1044. #define MCI_STATUS_MEDIA_PRESENT 0x00000005L
  1045. #define MCI_STATUS_TIME_FORMAT 0x00000006L
  1046. #define MCI_STATUS_READY 0x00000007L
  1047. #define MCI_STATUS_CURRENT_TRACK 0x00000008L
  1048. /* flags for dwFlags parameter of MCI_INFO command message */
  1049. #define MCI_INFO_PRODUCT 0x00000100L
  1050. #define MCI_INFO_FILE 0x00000200L
  1051. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  1052. #define MCI_GETDEVCAPS_ITEM 0x00000100L
  1053. /* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */
  1054. #define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
  1055. #define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
  1056. #define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
  1057. #define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
  1058. #define MCI_GETDEVCAPS_USES_FILES 0x00000005L
  1059. #define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
  1060. #define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
  1061. #define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
  1062. #define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
  1063. /* flags for dwFlags parameter of MCI_SYSINFO command message */
  1064. #define MCI_SYSINFO_QUANTITY 0x00000100L
  1065. #define MCI_SYSINFO_OPEN 0x00000200L
  1066. #define MCI_SYSINFO_NAME 0x00000400L
  1067. #define MCI_SYSINFO_INSTALLNAME 0x00000800L
  1068. /* flags for dwFlags parameter of MCI_SET command message */
  1069. #define MCI_SET_DOOR_OPEN 0x00000100L
  1070. #define MCI_SET_DOOR_CLOSED 0x00000200L
  1071. #define MCI_SET_TIME_FORMAT 0x00000400L
  1072. #define MCI_SET_AUDIO 0x00000800L
  1073. #define MCI_SET_VIDEO 0x00001000L
  1074. #define MCI_SET_ON 0x00002000L
  1075. #define MCI_SET_OFF 0x00004000L
  1076. /* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */
  1077. #define MCI_SET_AUDIO_ALL 0x00000000L
  1078. #define MCI_SET_AUDIO_LEFT 0x00000001L
  1079. #define MCI_SET_AUDIO_RIGHT 0x00000002L
  1080. /* flags for dwFlags parameter of MCI_BREAK command message */
  1081. #define MCI_BREAK_KEY 0x00000100L
  1082. #define MCI_BREAK_HWND 0x00000200L
  1083. #define MCI_BREAK_OFF 0x00000400L
  1084. /* flags for dwFlags parameter of MCI_RECORD command message */
  1085. #define MCI_RECORD_INSERT 0x00000100L
  1086. #define MCI_RECORD_OVERWRITE 0x00000200L
  1087. /* flags for dwFlags parameter of MCI_SOUND command message */
  1088. #define MCI_SOUND_NAME 0x00000100L
  1089. /* flags for dwFlags parameter of MCI_SAVE command message */
  1090. #define MCI_SAVE_FILE 0x00000100L
  1091. /* flags for dwFlags parameter of MCI_LOAD command message */
  1092. #define MCI_LOAD_FILE 0x00000100L
  1093. /* generic parameter block for MCI command messages with no special parameters */
  1094. typedef struct tagMCI_GENERIC_PARMS {
  1095. DWORD dwCallback;
  1096. } MCI_GENERIC_PARMS;
  1097. typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS;
  1098. /* parameter block for MCI_OPEN command message */
  1099. typedef struct tagMCI_OPEN_PARMS {
  1100. DWORD dwCallback;
  1101. UINT wDeviceID;
  1102. UINT wReserved0;
  1103. LPCSTR lpstrDeviceType;
  1104. LPCSTR lpstrElementName;
  1105. LPCSTR lpstrAlias;
  1106. } MCI_OPEN_PARMS;
  1107. typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS;
  1108. /* parameter block for MCI_PLAY command message */
  1109. typedef struct tagMCI_PLAY_PARMS {
  1110. DWORD dwCallback;
  1111. DWORD dwFrom;
  1112. DWORD dwTo;
  1113. } MCI_PLAY_PARMS;
  1114. typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS;
  1115. /* parameter block for MCI_SEEK command message */
  1116. typedef struct tagMCI_SEEK_PARMS {
  1117. DWORD dwCallback;
  1118. DWORD dwTo;
  1119. } MCI_SEEK_PARMS;
  1120. typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS;
  1121. /* parameter block for MCI_STATUS command message */
  1122. typedef struct tagMCI_STATUS_PARMS {
  1123. DWORD dwCallback;
  1124. DWORD dwReturn;
  1125. DWORD dwItem;
  1126. DWORD dwTrack;
  1127. } MCI_STATUS_PARMS;
  1128. typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS;
  1129. /* parameter block for MCI_INFO command message */
  1130. typedef struct tagMCI_INFO_PARMS {
  1131. DWORD dwCallback;
  1132. LPSTR lpstrReturn;
  1133. DWORD dwRetSize;
  1134. } MCI_INFO_PARMS;
  1135. typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS;
  1136. /* parameter block for MCI_GETDEVCAPS command message */
  1137. typedef struct tagMCI_GETDEVCAPS_PARMS {
  1138. DWORD dwCallback;
  1139. DWORD dwReturn;
  1140. DWORD dwItem;
  1141. } MCI_GETDEVCAPS_PARMS;
  1142. typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS;
  1143. /* parameter block for MCI_SYSINFO command message */
  1144. typedef struct tagMCI_SYSINFO_PARMS {
  1145. DWORD dwCallback;
  1146. LPSTR lpstrReturn;
  1147. DWORD dwRetSize;
  1148. DWORD dwNumber;
  1149. UINT wDeviceType;
  1150. UINT wReserved0;
  1151. } MCI_SYSINFO_PARMS;
  1152. typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS;
  1153. /* parameter block for MCI_SET command message */
  1154. typedef struct tagMCI_SET_PARMS {
  1155. DWORD dwCallback;
  1156. DWORD dwTimeFormat;
  1157. DWORD dwAudio;
  1158. } MCI_SET_PARMS;
  1159. typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS;
  1160. /* parameter block for MCI_BREAK command message */
  1161. typedef struct tagMCI_BREAK_PARMS {
  1162. DWORD dwCallback;
  1163. int nVirtKey;
  1164. UINT wReserved0;
  1165. HWND hwndBreak;
  1166. UINT wReserved1;
  1167. } MCI_BREAK_PARMS;
  1168. typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS;
  1169. /* parameter block for MCI_SOUND command message */
  1170. typedef struct tagMCI_SOUND_PARMS {
  1171. DWORD dwCallback;
  1172. LPCSTR lpstrSoundName;
  1173. } MCI_SOUND_PARMS;
  1174. typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS;
  1175. /* parameter block for MCI_SAVE command message */
  1176. typedef struct tagMCI_SAVE_PARMS {
  1177. DWORD dwCallback;
  1178. LPCSTR lpfilename;
  1179. } MCI_SAVE_PARMS;
  1180. typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS;
  1181. /* parameter block for MCI_LOAD command message */
  1182. typedef struct tagMCI_LOAD_PARMS {
  1183. DWORD dwCallback;
  1184. LPCSTR lpfilename;
  1185. } MCI_LOAD_PARMS;
  1186. typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS;
  1187. /* parameter block for MCI_RECORD command message */
  1188. typedef struct tagMCI_RECORD_PARMS {
  1189. DWORD dwCallback;
  1190. DWORD dwFrom;
  1191. DWORD dwTo;
  1192. } MCI_RECORD_PARMS;
  1193. typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS;
  1194. /* MCI extensions for videodisc devices */
  1195. /* flag for dwReturn field of MCI_STATUS_PARMS */
  1196. /* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */
  1197. #define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
  1198. /* flag for dwReturn field of MCI_STATUS_PARMS */
  1199. /* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */
  1200. #define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
  1201. #define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
  1202. #define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
  1203. #define MCI_VD_FORMAT_TRACK 0x4001
  1204. /* flags for dwFlags parameter of MCI_PLAY command message */
  1205. #define MCI_VD_PLAY_REVERSE 0x00010000L
  1206. #define MCI_VD_PLAY_FAST 0x00020000L
  1207. #define MCI_VD_PLAY_SPEED 0x00040000L
  1208. #define MCI_VD_PLAY_SCAN 0x00080000L
  1209. #define MCI_VD_PLAY_SLOW 0x00100000L
  1210. /* flag for dwFlags parameter of MCI_SEEK command message */
  1211. #define MCI_VD_SEEK_REVERSE 0x00010000L
  1212. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  1213. #define MCI_VD_STATUS_SPEED 0x00004002L
  1214. #define MCI_VD_STATUS_FORWARD 0x00004003L
  1215. #define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
  1216. #define MCI_VD_STATUS_SIDE 0x00004005L
  1217. #define MCI_VD_STATUS_DISC_SIZE 0x00004006L
  1218. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  1219. #define MCI_VD_GETDEVCAPS_CLV 0x00010000L
  1220. #define MCI_VD_GETDEVCAPS_CAV 0x00020000L
  1221. #define MCI_VD_SPIN_UP 0x00010000L
  1222. #define MCI_VD_SPIN_DOWN 0x00020000L
  1223. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1224. #define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
  1225. #define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
  1226. #define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
  1227. #define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
  1228. /* flags for the dwFlags parameter of MCI_STEP command message */
  1229. #define MCI_VD_STEP_FRAMES 0x00010000L
  1230. #define MCI_VD_STEP_REVERSE 0x00020000L
  1231. /* flag for the MCI_ESCAPE command message */
  1232. #define MCI_VD_ESCAPE_STRING 0x00000100L
  1233. /* parameter block for MCI_PLAY command message */
  1234. typedef struct tagMCI_VD_PLAY_PARMS {
  1235. DWORD dwCallback;
  1236. DWORD dwFrom;
  1237. DWORD dwTo;
  1238. DWORD dwSpeed;
  1239. } MCI_VD_PLAY_PARMS;
  1240. typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS;
  1241. /* parameter block for MCI_STEP command message */
  1242. typedef struct tagMCI_VD_STEP_PARMS {
  1243. DWORD dwCallback;
  1244. DWORD dwFrames;
  1245. } MCI_VD_STEP_PARMS;
  1246. typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS;
  1247. /* parameter block for MCI_ESCAPE command message */
  1248. typedef struct tagMCI_VD_ESCAPE_PARMS {
  1249. DWORD dwCallback;
  1250. LPCSTR lpstrCommand;
  1251. } MCI_VD_ESCAPE_PARMS;
  1252. typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS;
  1253. /* MCI extensions for waveform audio devices */
  1254. /* flags for the dwFlags parameter of MCI_OPEN command message */
  1255. #define MCI_WAVE_OPEN_BUFFER 0x00010000L
  1256. /* flags for the dwFlags parameter of MCI_SET command message */
  1257. #define MCI_WAVE_SET_FORMATTAG 0x00010000L
  1258. #define MCI_WAVE_SET_CHANNELS 0x00020000L
  1259. #define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
  1260. #define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
  1261. #define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
  1262. #define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
  1263. /* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */
  1264. #define MCI_WAVE_INPUT 0x00400000L
  1265. #define MCI_WAVE_OUTPUT 0x00800000L
  1266. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  1267. #define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
  1268. #define MCI_WAVE_STATUS_CHANNELS 0x00004002L
  1269. #define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
  1270. #define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
  1271. #define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
  1272. #define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
  1273. #define MCI_WAVE_STATUS_LEVEL 0x00004007L
  1274. /* flags for the dwFlags parameter of MCI_SET command message */
  1275. #define MCI_WAVE_SET_ANYINPUT 0x04000000L
  1276. #define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
  1277. /* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */
  1278. #define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
  1279. #define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
  1280. /* parameter block for MCI_OPEN command message */
  1281. typedef struct tagMCI_WAVE_OPEN_PARMS {
  1282. DWORD dwCallback;
  1283. UINT wDeviceID;
  1284. UINT wReserved0;
  1285. LPCSTR lpstrDeviceType;
  1286. LPCSTR lpstrElementName;
  1287. LPCSTR lpstrAlias;
  1288. DWORD dwBufferSeconds;
  1289. } MCI_WAVE_OPEN_PARMS;
  1290. typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS;
  1291. /* parameter block for MCI_DELETE command message */
  1292. typedef struct tagMCI_WAVE_DELETE_PARMS {
  1293. DWORD dwCallback;
  1294. DWORD dwFrom;
  1295. DWORD dwTo;
  1296. } MCI_WAVE_DELETE_PARMS;
  1297. typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS;
  1298. /* parameter block for MCI_SET command message */
  1299. typedef struct tagMCI_WAVE_SET_PARMS {
  1300. DWORD dwCallback;
  1301. DWORD dwTimeFormat;
  1302. DWORD dwAudio;
  1303. UINT wInput;
  1304. UINT wReserved0;
  1305. UINT wOutput;
  1306. UINT wReserved1;
  1307. UINT wFormatTag;
  1308. UINT wReserved2;
  1309. UINT nChannels;
  1310. UINT wReserved3;
  1311. DWORD nSamplesPerSec;
  1312. DWORD nAvgBytesPerSec;
  1313. UINT nBlockAlign;
  1314. UINT wReserved4;
  1315. UINT wBitsPerSample;
  1316. UINT wReserved5;
  1317. } MCI_WAVE_SET_PARMS;
  1318. typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS;
  1319. /* MCI extensions for MIDI sequencer devices */
  1320. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  1321. /* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */
  1322. #define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
  1323. #define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
  1324. #define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
  1325. #define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
  1326. #define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
  1327. /* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */
  1328. /* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */
  1329. #define MCI_SEQ_FORMAT_SONGPTR 0x4001
  1330. #define MCI_SEQ_FILE 0x4002
  1331. #define MCI_SEQ_MIDI 0x4003
  1332. #define MCI_SEQ_SMPTE 0x4004
  1333. #define MCI_SEQ_NONE 65533
  1334. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  1335. #define MCI_SEQ_STATUS_TEMPO 0x00004002L
  1336. #define MCI_SEQ_STATUS_PORT 0x00004003L
  1337. #define MCI_SEQ_STATUS_SLAVE 0x00004007L
  1338. #define MCI_SEQ_STATUS_MASTER 0x00004008L
  1339. #define MCI_SEQ_STATUS_OFFSET 0x00004009L
  1340. #define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
  1341. /* flags for the dwFlags parameter of MCI_SET command message */
  1342. #define MCI_SEQ_SET_TEMPO 0x00010000L
  1343. #define MCI_SEQ_SET_PORT 0x00020000L
  1344. #define MCI_SEQ_SET_SLAVE 0x00040000L
  1345. #define MCI_SEQ_SET_MASTER 0x00080000L
  1346. #define MCI_SEQ_SET_OFFSET 0x01000000L
  1347. /* parameter block for MCI_SET command message */
  1348. typedef struct tagMCI_SEQ_SET_PARMS {
  1349. DWORD dwCallback;
  1350. DWORD dwTimeFormat;
  1351. DWORD dwAudio;
  1352. DWORD dwTempo;
  1353. DWORD dwPort;
  1354. DWORD dwSlave;
  1355. DWORD dwMaster;
  1356. DWORD dwOffset;
  1357. } MCI_SEQ_SET_PARMS;
  1358. typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS;
  1359. /* MCI extensions for animation devices */
  1360. /* flags for dwFlags parameter of MCI_OPEN command message */
  1361. #define MCI_ANIM_OPEN_WS 0x00010000L
  1362. #define MCI_ANIM_OPEN_PARENT 0x00020000L
  1363. #define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
  1364. /* flags for dwFlags parameter of MCI_PLAY command message */
  1365. #define MCI_ANIM_PLAY_SPEED 0x00010000L
  1366. #define MCI_ANIM_PLAY_REVERSE 0x00020000L
  1367. #define MCI_ANIM_PLAY_FAST 0x00040000L
  1368. #define MCI_ANIM_PLAY_SLOW 0x00080000L
  1369. #define MCI_ANIM_PLAY_SCAN 0x00100000L
  1370. /* flags for dwFlags parameter of MCI_STEP command message */
  1371. #define MCI_ANIM_STEP_REVERSE 0x00010000L
  1372. #define MCI_ANIM_STEP_FRAMES 0x00020000L
  1373. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  1374. #define MCI_ANIM_STATUS_SPEED 0x00004001L
  1375. #define MCI_ANIM_STATUS_FORWARD 0x00004002L
  1376. #define MCI_ANIM_STATUS_HWND 0x00004003L
  1377. #define MCI_ANIM_STATUS_HPAL 0x00004004L
  1378. #define MCI_ANIM_STATUS_STRETCH 0x00004005L
  1379. /* flags for the dwFlags parameter of MCI_INFO command message */
  1380. #define MCI_ANIM_INFO_TEXT 0x00010000L
  1381. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1382. #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
  1383. #define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
  1384. #define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
  1385. #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
  1386. #define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
  1387. #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
  1388. #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
  1389. /* flags for the MCI_REALIZE command message */
  1390. #define MCI_ANIM_REALIZE_NORM 0x00010000L
  1391. #define MCI_ANIM_REALIZE_BKGD 0x00020000L
  1392. /* flags for dwFlags parameter of MCI_WINDOW command message */
  1393. #define MCI_ANIM_WINDOW_HWND 0x00010000L
  1394. #define MCI_ANIM_WINDOW_STATE 0x00040000L
  1395. #define MCI_ANIM_WINDOW_TEXT 0x00080000L
  1396. #define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
  1397. #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
  1398. /* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */
  1399. /* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */
  1400. #define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
  1401. /* flags for dwFlags parameter of MCI_PUT command message */
  1402. #define MCI_ANIM_RECT 0x00010000L
  1403. #define MCI_ANIM_PUT_SOURCE 0x00020000L
  1404. #define MCI_ANIM_PUT_DESTINATION 0x00040000L
  1405. /* flags for dwFlags parameter of MCI_WHERE command message */
  1406. #define MCI_ANIM_WHERE_SOURCE 0x00020000L
  1407. #define MCI_ANIM_WHERE_DESTINATION 0x00040000L
  1408. /* flags for dwFlags parameter of MCI_UPDATE command message */
  1409. #define MCI_ANIM_UPDATE_HDC 0x00020000L
  1410. /* parameter block for MCI_OPEN command message */
  1411. typedef struct tagMCI_ANIM_OPEN_PARMS {
  1412. DWORD dwCallback;
  1413. UINT wDeviceID;
  1414. UINT wReserved0;
  1415. LPCSTR lpstrDeviceType;
  1416. LPCSTR lpstrElementName;
  1417. LPCSTR lpstrAlias;
  1418. DWORD dwStyle;
  1419. HWND hWndParent;
  1420. UINT wReserved1;
  1421. } MCI_ANIM_OPEN_PARMS;
  1422. typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS;
  1423. /* parameter block for MCI_PLAY command message */
  1424. typedef struct tagMCI_ANIM_PLAY_PARMS {
  1425. DWORD dwCallback;
  1426. DWORD dwFrom;
  1427. DWORD dwTo;
  1428. DWORD dwSpeed;
  1429. } MCI_ANIM_PLAY_PARMS;
  1430. typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS;
  1431. /* parameter block for MCI_STEP command message */
  1432. typedef struct tagMCI_ANIM_STEP_PARMS {
  1433. DWORD dwCallback;
  1434. DWORD dwFrames;
  1435. } MCI_ANIM_STEP_PARMS;
  1436. typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS;
  1437. /* parameter block for MCI_WINDOW command message */
  1438. typedef struct tagMCI_ANIM_WINDOW_PARMS {
  1439. DWORD dwCallback;
  1440. HWND hWnd;
  1441. UINT wReserved1;
  1442. UINT nCmdShow;
  1443. UINT wReserved2;
  1444. LPCSTR lpstrText;
  1445. } MCI_ANIM_WINDOW_PARMS;
  1446. typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS;
  1447. /* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */
  1448. typedef struct tagMCI_ANIM_RECT_PARMS {
  1449. DWORD dwCallback;
  1450. #ifdef MCI_USE_OFFEXT
  1451. POINT ptOffset;
  1452. POINT ptExtent;
  1453. #else /* ifdef MCI_USE_OFFEXT */
  1454. RECT rc;
  1455. #endif /* ifdef MCI_USE_OFFEXT */
  1456. } MCI_ANIM_RECT_PARMS;
  1457. typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS;
  1458. /* parameter block for MCI_UPDATE PARMS */
  1459. typedef struct tagMCI_ANIM_UPDATE_PARMS {
  1460. DWORD dwCallback;
  1461. RECT rc;
  1462. HDC hDC;
  1463. } MCI_ANIM_UPDATE_PARMS;
  1464. typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS;
  1465. /* MCI extensions for video overlay devices */
  1466. /* flags for dwFlags parameter of MCI_OPEN command message */
  1467. #define MCI_OVLY_OPEN_WS 0x00010000L
  1468. #define MCI_OVLY_OPEN_PARENT 0x00020000L
  1469. /* flags for dwFlags parameter of MCI_STATUS command message */
  1470. #define MCI_OVLY_STATUS_HWND 0x00004001L
  1471. #define MCI_OVLY_STATUS_STRETCH 0x00004002L
  1472. /* flags for dwFlags parameter of MCI_INFO command message */
  1473. #define MCI_OVLY_INFO_TEXT 0x00010000L
  1474. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1475. #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
  1476. #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
  1477. #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
  1478. /* flags for dwFlags parameter of MCI_WINDOW command message */
  1479. #define MCI_OVLY_WINDOW_HWND 0x00010000L
  1480. #define MCI_OVLY_WINDOW_STATE 0x00040000L
  1481. #define MCI_OVLY_WINDOW_TEXT 0x00080000L
  1482. #define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
  1483. #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
  1484. /* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */
  1485. #define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
  1486. /* flags for dwFlags parameter of MCI_PUT command message */
  1487. #define MCI_OVLY_RECT 0x00010000L
  1488. #define MCI_OVLY_PUT_SOURCE 0x00020000L
  1489. #define MCI_OVLY_PUT_DESTINATION 0x00040000L
  1490. #define MCI_OVLY_PUT_FRAME 0x00080000L
  1491. #define MCI_OVLY_PUT_VIDEO 0x00100000L
  1492. /* flags for dwFlags parameter of MCI_WHERE command message */
  1493. #define MCI_OVLY_WHERE_SOURCE 0x00020000L
  1494. #define MCI_OVLY_WHERE_DESTINATION 0x00040000L
  1495. #define MCI_OVLY_WHERE_FRAME 0x00080000L
  1496. #define MCI_OVLY_WHERE_VIDEO 0x00100000L
  1497. /* parameter block for MCI_OPEN command message */
  1498. typedef struct tagMCI_OVLY_OPEN_PARMS {
  1499. DWORD dwCallback;
  1500. UINT wDeviceID;
  1501. UINT wReserved0;
  1502. LPCSTR lpstrDeviceType;
  1503. LPCSTR lpstrElementName;
  1504. LPCSTR lpstrAlias;
  1505. DWORD dwStyle;
  1506. HWND hWndParent;
  1507. UINT wReserved1;
  1508. } MCI_OVLY_OPEN_PARMS;
  1509. typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS;
  1510. /* parameter block for MCI_WINDOW command message */
  1511. typedef struct tagMCI_OVLY_WINDOW_PARMS {
  1512. DWORD dwCallback;
  1513. HWND hWnd;
  1514. UINT wReserved1;
  1515. UINT nCmdShow;
  1516. UINT wReserved2;
  1517. LPCSTR lpstrText;
  1518. } MCI_OVLY_WINDOW_PARMS;
  1519. typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS;
  1520. /* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */
  1521. typedef struct tagMCI_OVLY_RECT_PARMS {
  1522. DWORD dwCallback;
  1523. #ifdef MCI_USE_OFFEXT
  1524. POINT ptOffset;
  1525. POINT ptExtent;
  1526. #else /* ifdef MCI_USE_OFFEXT */
  1527. RECT rc;
  1528. #endif /* ifdef MCI_USE_OFFEXT */
  1529. } MCI_OVLY_RECT_PARMS;
  1530. typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS;
  1531. /* parameter block for MCI_SAVE command message */
  1532. typedef struct tagMCI_OVLY_SAVE_PARMS {
  1533. DWORD dwCallback;
  1534. LPCSTR lpfilename;
  1535. RECT rc;
  1536. } MCI_OVLY_SAVE_PARMS;
  1537. typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS;
  1538. /* parameter block for MCI_LOAD command message */
  1539. typedef struct tagMCI_OVLY_LOAD_PARMS {
  1540. DWORD dwCallback;
  1541. LPCSTR lpfilename;
  1542. RECT rc;
  1543. } MCI_OVLY_LOAD_PARMS;
  1544. typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS;
  1545. #endif /* ifndef MMNOMCI */
  1546. /****************************************************************************
  1547. DISPLAY Driver extensions
  1548. ****************************************************************************/
  1549. #ifndef C1_TRANSPARENT
  1550. #define CAPS1 94 /* other caps */
  1551. #define C1_TRANSPARENT 0x0001 /* new raster cap */
  1552. #define NEWTRANSPARENT 3 /* use with SetBkMode() */
  1553. #define QUERYROPSUPPORT 40 /* use to determine ROP support */
  1554. #endif /* ifndef C1_TRANSPARENT */
  1555. /****************************************************************************
  1556. DIB Driver extensions
  1557. ****************************************************************************/
  1558. #define SELECTDIB 41 /* DIB.DRV select dib escape */
  1559. #define DIBINDEX(n) MAKELONG((n),0x10FF)
  1560. /****************************************************************************
  1561. ScreenSaver support
  1562. The current application will receive a syscommand of SC_SCREENSAVE just
  1563. before the screen saver is invoked. If the app wishes to prevent a
  1564. screen save, return non-zero value, otherwise call DefWindowProc().
  1565. ****************************************************************************/
  1566. #ifndef SC_SCREENSAVE
  1567. #define SC_SCREENSAVE 0xF140
  1568. #endif /* ifndef SC_SCREENSAVE */
  1569. #ifdef __cplusplus
  1570. } /* End of extern "C" { */
  1571. #endif /* __cplusplus */
  1572. #ifndef RC_INVOKED
  1573. #pragma pack() /* Revert to default packing */
  1574. #endif
  1575. #endif /* _INC_MMSYSTEM */