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