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