source: Include/api_mmsys.sbp@ 83

Last change on this file since 83 was 76, checked in by NoWest, 18 years ago
File size: 68.4 KB
Line 
1' api_mmsys.sbp
2' Include file for Multimedia API's
3
4
5#ifndef _INC_MMSYS
6#define _INC_MMSYS
7
8
9' general constants
10Const MAXPNAMELEN = 32
11Const MAXERRORLENGTH = 256
12Const MAX_JOYSTICKOEMVXDNAME = 260
13
14Const MM_MIDI_MAPPER = 1
15Const MM_WAVE_MAPPER = 2
16Const MM_SNDBLST_MIDIOUT = 3
17Const MM_SNDBLST_MIDIIN = 4
18Const MM_SNDBLST_SYNTH = 5
19Const MM_SNDBLST_WAVEOUT = 6
20Const MM_SNDBLST_WAVEIN = 7
21Const MM_ADLIB = 9
22Const MM_MPU401_MIDIOUT = 10
23Const MM_MPU401_MIDIIN = 11
24Const MM_PC_JOYSTICK = 12
25
26' general data types
27TypeDef MMVERSION = DWord
28TypeDef VERSION = DWord
29TypeDef MMRESULT = DWord
30
31' MMTIME data structure
32
33Type Smpte
34 hour As Byte
35 min As Byte
36 sec As Byte
37 frame As Byte
38 fps As Byte
39 dummy As Byte
40 pad[ELM(2)] As Byte
41End Type
42
43Type Midi
44 songptrpos As DWord
45End Type
46
47Type MMTIME
48Public
49 wType As DWord
50 u As DWord
51/* union
52 ms As DWord
53 sample As DWord
54 cb As DWord
55 ticks As DWord
56 smpte As Smpte
57 midi As Midi
58*/
59End Type
60TypeDef PMMTIME = *MMTIME
61TypeDef LPMMTIME = *MMTIME
62
63Const MAKEFOURCC(ch0, ch1, ch2, ch3) = (((ch0 As Byte) or ((ch1 As Byte)<<8) or ((ch2 As Byte)<<16) or ((ch3 As Byte)<<24)) As DWord)
64
65' types for wType field in MMTIME struct
66Const TIME_MS = &H0001
67Const TIME_SAMPLES = &H0002
68Const TIME_BYTES = &H0004
69Const TIME_SMPTE = &H0008
70Const TIME_MIDI = &H0010
71Const TIME_TICKS = &H0020
72
73'----------------------------------------
74' Multimedia Extensions Window Messages
75
76Const MM_JOY1MOVE = &H3A0 'joystick
77Const MM_JOY2MOVE = &H3A1
78Const MM_JOY1ZMOVE = &H3A2
79Const MM_JOY2ZMOVE = &H3A3
80Const MM_JOY1BUTTONDOWN = &H3B5
81Const MM_JOY2BUTTONDOWN = &H3B6
82Const MM_JOY1BUTTONUP = &H3B7
83Const MM_JOY2BUTTONUP = &H3B8
84
85Const MM_MCINOTIFY = &H3B9 'MCI
86Const MCI_NOTIFY_SUCCESSFUL = &H0001
87Const MCI_NOTIFY_SUPERSEDED = &H0002
88Const MCI_NOTIFY_ABORTED = &H0004
89Const MCI_NOTIFY_FAILURE = &H0008
90
91Const MM_WOM_OPEN = &H3BB 'waveform output
92Const MM_WOM_CLOSE = &H3BC
93Const MM_WOM_DONE = &H3BD
94
95Const MM_WIM_OPEN = &H3BE 'waveform input
96Const MM_WIM_CLOSE = &H3BF
97Const MM_WIM_DATA = &H3C0
98
99Const MM_MIM_OPEN = &H3C1 'MIDI input
100Const MM_MIM_CLOSE = &H3C2
101Const MM_MIM_DATA = &H3C3
102Const MM_MIM_LONGDATA = &H3C4
103Const MM_MIM_ERROR = &H3C5
104Const MM_MIM_LONGERROR = &H3C6
105
106Const MM_MOM_OPEN = &H3C7 'MIDI output
107Const MM_MOM_CLOSE = &H3C8
108Const MM_MOM_DONE = &H3C9
109
110Const MM_DRVM_OPEN = &H3D0 'installable drivers
111Const MM_DRVM_CLOSE = &H3D1
112Const MM_DRVM_DATA = &H3D2
113Const MM_DRVM_ERROR = &H3D3
114
115Const MM_STREAM_OPEN = &H3D4
116Const MM_STREAM_CLOSE = &H3D5
117Const MM_STREAM_DONE = &H3D6
118Const MM_STREAM_ERROR = &H3D7
119
120Const MM_MOM_POSITIONCB = &H3CA
121
122Const MM_MCISIGNAL = &H3CB
123
124Const MM_MIM_MOREDATA = &H3CC 'MIM_DONE w/ pending events
125
126Const MM_MIXM_LINE_CHANGE = &H3D0 'mixer line change notify
127Const MM_MIXM_CONTROL_CHANGE =&H3D1 'mixer control change notify
128
129
130'----------------------------------------------
131' String resource number bases (internal use)
132
133Const MMSYSERR_BASE = 0
134Const WAVERR_BASE = 32
135Const MIDIERR_BASE = 64
136Const TIMERR_BASE = 96
137Const JOYERR_BASE = 160
138Const MCIERR_BASE = 256
139Const MIXERR_BASE = 1024
140
141Const MCI_STRING_OFFSET = 512
142Const MCI_VD_OFFSET = 1024
143Const MCI_CD_OFFSET = 1088
144Const MCI_WAVE_OFFSET = 1152
145Const MCI_SEQ_OFFSET = 1216
146
147
148'----------------------------------------------
149' General error return values
150
151Const MMSYSERR_NOERROR = 0 'no error
152Const MMSYSERR_ERROR = (MMSYSERR_BASE + 1) 'unspecified error
153Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2) 'device ID out of range
154Const MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3) 'driver failed enable
155Const MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4) 'device already allocated
156Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5) 'device handle is invalid
157Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6) 'no device driver present
158Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7) 'memory allocation error
159Const MMSYSERR_NOTSUPPORTED= (MMSYSERR_BASE + 8) 'function isn't supported
160Const MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9) 'error value out of range
161Const MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10) 'invalid flag passed
162Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) 'invalid parameter passed
163Const MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12) 'handle being used
164Const MMSYSERR_INVALIDALIAS= (MMSYSERR_BASE + 13) 'specified alias not found
165Const MMSYSERR_BADDB = (MMSYSERR_BASE + 14) 'bad registry database
166Const MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15) 'registry key not found
167Const MMSYSERR_READERROR = (MMSYSERR_BASE + 16) 'registry read error
168Const MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17) 'registry write error
169Const MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18) 'registry delete error
170Const MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19) 'registry value not found
171Const MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20) 'driver does not call DriverCallback
172Const MMSYSERR_LASTERROR = (MMSYSERR_BASE + 20) 'last error in range
173
174
175'--------------------------------------------------------
176' Installable driver support
177
178Type _System_DeclareHandle_HDRVR:unused As DWord:End Type
179TypeDef HDRVR = *_System_DeclareHandle_HDRVR
180
181Type DRVCONFIGINFOEX
182 dwDCISize As DWord
183 lpszDCISectionName As LPCWSTR
184 lpszDCIAliasName As LPCWSTR
185 dnDevNode As DWORD
186End Type
187TypeDef PDRVCONFIGINFOEX = *DRVCONFIGINFOEX
188TypeDef LPDRVCONFIGINFOEX = *DRVCONFIGINFOEX
189
190' Driver messages
191Const DRV_LOAD = &H0001
192Const DRV_ENABLE = &H0002
193Const DRV_OPEN = &H0003
194Const DRV_CLOSE = &H0004
195Const DRV_DISABLE = &H0005
196Const DRV_FREE = &H0006
197Const DRV_CONFIGURE = &H0007
198Const DRV_QUERYCONFIGURE = &H0008
199Const DRV_INSTALL = &H0009
200Const DRV_REMOVE = &H000A
201Const DRV_EXITSESSION = &H000B
202Const DRV_POWER = &H000F
203Const DRV_RESERVED = &H0800
204Const DRV_USER = &H4000
205
206Type DRVCONFIGINFO
207 dwDCISize As DWord
208 lpszDCISectionName As LPCWSTR
209 lpszDCIAliasName As LPCWSTR
210End Type
211TypeDef PDRVCONFIGINFO = *DRVCONFIGINFO
212TypeDef LPDRVCONFIGINFO = *DRVCONFIGINFO
213
214' Supported return values for DRV_CONFIGURE message
215Const DRVCNF_CANCEL = &H0000
216Const DRVCNF_OK = &H0001
217Const DRVCNF_RESTART = &H0002
218
219TypeDef DRIVERPROC = *Function(dwDriverId As DWord, hdrvr As HDRVR, msg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
220
221Declare Function CloseDriver Lib "winmm" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
222Declare Function OpenDriver Lib "winmm" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
223Declare Function SendDriverMessage Lib "winmm" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
224Declare Function GetDriverModuleHandle Lib "winmm" (hDriver As HDRVR) As HMODULE
225Declare Function DefDriverProc Lib "winmm" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
226
227Declare Function DrvClose Lib "winmm" Alias "CloseDriver" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
228Declare Function DrvOpen Lib "winmm" Alias "OpenDriver" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
229Declare Function DrvSendMessage Lib "winmm" Alias "SendDriverMessage" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
230Declare Function DrvGetModuleHandle Lib "winmm" Alias "GetDriverModuleHandle" (hDriver As HDRVR) As HMODULE
231Declare Function DrvDefDriverProc Lib "winmm" Alias "DefDriverProc" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
232
233' return values from DriverProc() function
234Const DRV_CANCEL = DRVCNF_CANCEL
235Const DRV_OK = DRVCNF_OK
236Const DRV_RESTART = DRVCNF_RESTART
237
238Const DRV_MCI_FIRST = DRV_RESERVED
239Const DRV_MCI_LAST = (DRV_RESERVED + &HFFF)
240
241
242'--------------------------------------------------------
243' Driver callback support
244Const CALLBACK_TYPEMASK = &H00070000 'callback type mask
245Const CALLBACK_NULL = &H00000000 'no callback
246Const CALLBACK_WINDOW = &H00010000 'dwCallback is a HWND
247Const CALLBACK_TASK = &H00020000 'dwCallback is a HTASK
248Const CALLBACK_FUNCTION = &H00030000 'dwCallback is a FARPROC
249Const CALLBACK_THREAD = (CALLBACK_TASK)'thread ID replaces 16 bit task
250Const CALLBACK_EVENT = &H00050000 'dwCallback is an EVENT Handle
251
252TypeDef DRVCALLBACK = *Sub(hdrvr As HDRVR, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
253TypeDef PDRVCALLBACK = *DRVCALLBACK
254TypeDef LPDRVCALLBACK = *DRVCALLBACK
255
256
257'--------------------------------------------------------
258' General MMSYSTEM support
259
260Declare Function mmsystemGetVersion Lib "winmm" () As DWord
261
262
263
264'--------------------------------------------------------
265' Sound support
266
267Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
268
269Const SND_SYNC = &H0000
270Const SND_ASYNC = &H0001
271Const SND_NODEFAULT = &H0002
272Const SND_MEMORY = &H0004
273Const SND_LOOP = &H0008
274Const SND_NOSTOP = &H0010
275Const SND_NOWAIT = &H00002000
276Const SND_ALIAS = &H00010000
277Const SND_ALIAS_ID = &H00110000
278Const SND_FILENAME = &H00020000
279Const SND_RESOURCE = &H00040004
280Const SND_PURGE = &H0040
281Const SND_APPLICATION = &H0080
282Const SND_ALIAS_START = 0
283
284Const sndAlias(ch0, ch1) = (SND_ALIAS_START + ((&HFF AND ch0) OR (&HFF AND ch1)<<8))
285
286Const SND_ALIAS_SYSTEMASTERISK = sndAlias(&H53, &H2A)
287Const SND_ALIAS_SYSTEMQUESTION = sndAlias(&H53, &H3F)
288Const SND_ALIAS_SYSTEMHAND = sndAlias(&H53, &H48)
289Const SND_ALIAS_SYSTEMEXIT = sndAlias(&H53, &H45)
290Const SND_ALIAS_SYSTEMSTART = sndAlias(&H53, &H53)
291Const SND_ALIAS_SYSTEMWELCOME = sndAlias(&H53, &H57)
292Const SND_ALIAS_SYSTEMEXCLAMATION = sndAlias(&H53, &H21)
293Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
294
295Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
296
297
298'--------------------------------------------------------
299' Waveform audio support
300
301' waveform audio error return values
302Const WAVERR_BADFORMAT = (WAVERR_BASE + 0)
303Const WAVERR_STILLPLAYING = (WAVERR_BASE + 1)
304Const WAVERR_UNPREPARED = (WAVERR_BASE + 2)
305Const WAVERR_SYNC = (WAVERR_BASE + 3)
306Const WAVERR_LASTERROR = (WAVERR_BASE + 3)
307
308' waveform audio data types
309Type _System_DeclareHandle_HWAVE:unused As DWord:End Type
310TypeDef HWAVE = *_System_DeclareHandle_HWAVE
311Type _System_DeclareHandle_HWAVEIN:unused As DWord:End Type
312TypeDef HWAVEIN = *_System_DeclareHandle_HWAVEIN
313Type _System_DeclareHandle_HWAVEOUT:unused As DWord:End Type
314TypeDef HWAVEOUT = *_System_DeclareHandle_HWAVEOUT
315
316TypeDef WAVECALLBACK = DRVCALLBACK
317TypeDef LPWAVECALLBACK = *WAVECALLBACK
318
319' wave callback messages
320Const WOM_OPEN = MM_WOM_OPEN
321Const WOM_CLOSE = MM_WOM_CLOSE
322Const WOM_DONE = MM_WOM_DONE
323Const WIM_OPEN = MM_WIM_OPEN
324Const WIM_CLOSE = MM_WIM_CLOSE
325Const WIM_DATA = MM_WIM_DATA
326
327' device ID for wave device mapper
328Const WAVE_MAPPER = (-1)
329
330' flags for dwFlags parameter in waveOutOpen() and waveInOpen()
331Const WAVE_FORMAT_QUERY = &H0001
332Const WAVE_ALLOWSYNC = &H0002
333Const WAVE_MAPPED = &H0004
334Const WAVE_FORMAT_DIRECT = &H0008
335Const WAVE_FORMAT_DIRECT_QUERY = (WAVE_FORMAT_QUERY OR WAVE_FORMAT_DIRECT)
336
337' wave data block header
338Type WAVEHDR
339 lpData As LPSTR
340 dwBufferLength As DWord
341 dwBytesRecorded As DWord
342 dwUser As DWord
343 dwFlags As DWord
344 dwLoops As DWord
345 lpNext As *WAVEHDR
346 reserved As DWord
347End Type
348TypeDef PWAVEHDR = *WAVEHDR
349TypeDef LPWAVEHDR = *WAVEHDR
350
351' flags for dwFlags field of WAVEHDR
352Const WHDR_DONE = &H00000001
353Const WHDR_PREPARED = &H00000002
354Const WHDR_BEGINLOOP = &H00000004
355Const WHDR_ENDLOOP = &H00000008
356Const WHDR_INQUEUE = &H00000010
357
358' waveform output device capabilities structure
359Type WAVEOUTCAPSA
360 wMid As Word
361 wPid As Word
362 vDriverVersion As MMVERSION
363 szPname[ELM(MAXPNAMELEN)] As Char
364 dwFormats As DWord
365 wChannels As Word
366 wReserved1 As Word
367 dwSupport As DWord
368End Type
369TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
370TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
371
372TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
373TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
374TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
375
376' flags for dwSupport field of WAVEOUTCAPS
377Const WAVECAPS_PITCH = &H0001
378Const WAVECAPS_PLAYBACKRATE = &H0002
379Const WAVECAPS_VOLUME = &H0004
380Const WAVECAPS_LRVOLUME = &H0008
381Const WAVECAPS_SYNC = &H0010
382Const WAVECAPS_SAMPLEACCURATE = &H0020
383Const WAVECAPS_DIRECTSOUND = &H0040
384
385' waveform input device capabilities structure
386Type WAVEINCAPSA
387 wMid As Word
388 wPid As Word
389 vDriverVersion As MMVERSION
390 szPname[ELM(MAXPNAMELEN)] As Char
391 dwFormats As DWord
392 wChannels As Word
393 wReserved1 As Word
394End Type
395TypeDef PWAVEINCAPSA = *WAVEINCAPSA
396TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
397
398TypeDef WAVEINCAPS = WAVEINCAPSA
399TypeDef PWAVEINCAPS = PWAVEINCAPSA
400TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
401
402' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
403Const WAVE_INVALIDFORMAT = &H00000000 ' invalid format
404Const WAVE_FORMAT_1M08 = &H00000001 ' 11.025 kHz, Mono, 8-bit
405Const WAVE_FORMAT_1S08 = &H00000002 ' 11.025 kHz, Stereo, 8-bit
406Const WAVE_FORMAT_1M16 = &H00000004 ' 11.025 kHz, Mono, 16-bit
407Const WAVE_FORMAT_1S16 = &H00000008 ' 11.025 kHz, Stereo, 16-bit
408Const WAVE_FORMAT_2M08 = &H00000010 ' 22.05 kHz, Mono, 8-bit
409Const WAVE_FORMAT_2S08 = &H00000020 ' 22.05 kHz, Stereo, 8-bit
410Const WAVE_FORMAT_2M16 = &H00000040 ' 22.05 kHz, Mono, 16-bit
411Const WAVE_FORMAT_2S16 = &H00000080 ' 22.05 kHz, Stereo, 16-bit
412Const WAVE_FORMAT_4M08 = &H00000100 ' 44.1 kHz, Mono, 8-bit
413Const WAVE_FORMAT_4S08 = &H00000200 ' 44.1 kHz, Stereo, 8-bit
414Const WAVE_FORMAT_4M16 = &H00000400 ' 44.1 kHz, Mono, 16-bit
415Const WAVE_FORMAT_4S16 = &H00000800 ' 44.1 kHz, Stereo, 16-bit
416
417' OLD general waveform format structure (information common to all formats)
418Type WAVEFORMAT
419 wFormatTag As Word
420 nChannels As Word
421 nSamplesPerSec As DWord
422 nAvgBytesPerSec As DWord
423 nBlockAlign As Word
424End Type
425TypeDef PWAVEFORMAT = *WAVEFORMAT
426TypeDef LPWAVEFORMAT = *WAVEFORMAT
427
428' flags for wFormatTag field of WAVEFORMAT
429Const WAVE_FORMAT_PCM = 1
430
431' specific waveform format structure for PCM data
432Type PCMWAVEFORMAT
433 wf As WAVEFORMAT
434 wBitsPerSample As Word
435End Type
436TypeDef PPCMWAVEFORMAT = *PCMWAVEFORMAT
437TypeDef LPPCMWAVEFORMAT = *PCMWAVEFORMAT
438
439Type WAVEFORMATEX
440 wFormatTag As Word
441 nChannels As Word
442 nSamplesPerSec As DWord
443 nAvgBytesPerSec As DWord
444 nBlockAlign As Word
445 wBitsPerSample As Word
446 cbSize As Word
447End Type
448TypeDef PWAVEFORMATEX = *WAVEFORMATEX
449TypeDef LPWAVEFORMATEX = *WAVEFORMATEX
450TypeDef LPCWAVEFORMATEX = *WAVEFORMATEX
451
452' waveform audio function prototypes
453Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
454Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
455Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT
456Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT
457Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
458Declare Function waveOutOpen Lib "winmm" (ByRef phwo As HWAVEOUT, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
459Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
460Declare Function waveOutPrepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
461Declare Function waveOutUnprepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
462Declare Function waveOutWrite Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
463Declare Function waveOutPause Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
464Declare Function waveOutRestart Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
465Declare Function waveOutReset Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
466Declare Function waveOutBreakLoop Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
467Declare Function waveOutGetPosition Lib "winmm" (hwo As HWAVEOUT, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
468Declare Function waveOutGetPitch Lib "winmm" (hwo As HWAVEOUT, ByRef pdwPitch As DWord) As MMRESULT
469Declare Function waveOutSetPitch Lib "winmm" (hwo As HWAVEOUT, dwPitch As DWord) As MMRESULT
470Declare Function waveOutGetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, ByRef pdwRate As DWord) As MMRESULT
471Declare Function waveOutSetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, dwRate As DWord) As MMRESULT
472Declare Function waveOutGetID Lib "winmm" (hwo As HWAVEOUT, ByRef puDeviceID As DWord) As MMRESULT
473Declare Function waveOutMessage Lib "winmm" (hwo As HWAVEOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
474
475Declare Function waveInGetNumDevs Lib "winmm" () As DWord
476Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
477Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
478Declare Function waveInOpen Lib "winmm" (ByRef phwi As HWAVEIN, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
479Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT
480Declare Function waveInPrepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
481Declare Function waveInUnprepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
482Declare Function waveInAddBuffer Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
483Declare Function waveInStart Lib "winmm" (hwi As HWAVEIN) As MMRESULT
484Declare Function waveInStop Lib "winmm" (hwi As HWAVEIN) As MMRESULT
485Declare Function waveInReset Lib "winmm" (hwi As HWAVEIN) As MMRESULT
486Declare Function waveInGetPosition Lib "winmm" (hwi As HWAVEIN, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
487Declare Function waveInGetID Lib "winmm" (hwi As HWAVEIN, ByRef puDeviceID As DWord) As MMRESULT
488Declare Function waveInMessage Lib "winmm" (hwi As HWAVEIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
489
490
491
492'--------------------------------------------------------
493' MIDI audio support
494
495' MIDI error return values
496Const MIDIERR_UNPREPARED = (MIDIERR_BASE + 0)
497Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1)
498Const MIDIERR_NOMAP = (MIDIERR_BASE + 2)
499Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3)
500Const MIDIERR_NODEVICE = (MIDIERR_BASE + 4)
501Const MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5)
502Const MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6)
503Const MIDIERR_DONT_CONTINUE = (MIDIERR_BASE + 7)
504Const MIDIERR_LASTERROR = (MIDIERR_BASE + 7)
505
506' MIDI audio data types
507Type _System_DeclareHandle_HMIDI:unused As DWord:End Type
508TypeDef HMIDI = *_System_DeclareHandle_HMIDI
509Type _System_DeclareHandle_HMIDIIN:unused As DWord:End Type
510TypeDef HMIDIIN = *_System_DeclareHandle_HMIDIIN
511Type _System_DeclareHandle_HMIDIOUT:unused As DWord:End Type
512TypeDef HMIDIOUT = *_System_DeclareHandle_HMIDIOUT
513Type _System_DeclareHandle_HMIDISTRM:unused As DWord:End Type
514TypeDef HMIDISTRM = *_System_DeclareHandle_HMIDISTRM
515
516TypeDef MIDICALLBACK = DRVCALLBACK
517TypeDef LPMIDICALLBACK = *MIDICALLBACK
518
519Const MIDIPATCHSIZE = 128
520
521TypeDef LPPATCHARRAY = *Word
522TypeDef LPKEYARRAY = *Word
523
524' MIDI callback messages
525Const MIM_OPEN = MM_MIM_OPEN
526Const MIM_CLOSE = MM_MIM_CLOSE
527Const MIM_DATA = MM_MIM_DATA
528Const MIM_LONGDATA = MM_MIM_LONGDATA
529Const MIM_ERROR = MM_MIM_ERROR
530Const MIM_LONGERROR = MM_MIM_LONGERROR
531Const MOM_OPEN = MM_MOM_OPEN
532Const MOM_CLOSE = MM_MOM_CLOSE
533Const MOM_DONE = MM_MOM_DONE
534Const MIM_MOREDATA = MM_MIM_MOREDATA
535Const MOM_POSITIONCB = MM_MOM_POSITIONCB
536
537' device ID for MIDI mapper
538Const MIDIMAPPER = (-1)
539Const MIDI_MAPPER = (-1)
540
541Const MIDI_IO_STATUS = &H00000020
542
543' flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
544Const MIDI_CACHE_ALL = 1
545Const MIDI_CACHE_BESTFIT = 2
546Const MIDI_CACHE_QUERY = 3
547Const MIDI_UNCACHE = 4
548
549' MIDI output device capabilities structure
550Type MIDIOUTCAPSA
551 wMid As Word
552 wPid As Word
553 vDriverVersion As MMVERSION
554 szPname[ELM(MAXPNAMELEN)] As Char
555 wTechnology As Word
556 wVoices As Word
557 wNotes As Word
558 wChannelMask As Word
559 dwSupport As DWord
560End Type
561TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA
562TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA
563
564TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
565TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
566TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
567
568' flags for wTechnology field of MIDIOUTCAPS structure
569Const MOD_MIDIPORT = 1
570Const MOD_SYNTH = 2
571Const MOD_SQSYNTH = 3
572Const MOD_FMSYNTH = 4
573Const MOD_MAPPER = 5
574
575' flags for dwSupport field of MIDIOUTCAPS structure
576Const MIDICAPS_VOLUME = &H0001
577Const MIDICAPS_LRVOLUME = &H0002
578Const MIDICAPS_CACHE = &H0004
579Const MIDICAPS_STREAM = &H0008
580
581' MIDI input device capabilities structure
582Type MIDIINCAPSA
583 wMid As Word
584 wPid As Word
585 vDriverVersion As MMVERSION
586 szPname[ELM(MAXPNAMELEN)] As Char
587 dwSupport As DWord
588End Type
589TypeDef PMIDIINCAPSA = *MIDIINCAPSA
590TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
591
592TypeDef MIDIINCAPS = MIDIINCAPSA
593TypeDef PMIDIINCAPS = PMIDIINCAPSA
594TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
595
596' MIDI data block header
597Type MIDIHDR
598 lpData As LPSTR
599 dwBufferLength As DWord
600 dwBytesRecorded As DWord
601 dwUser As DWord
602 dwFlags As DWord
603 lpNext As *MIDIHDR
604 reserved As DWord
605 dwOffset As DWord
606 dwReserved[ELM(8)] As DWord
607End Type
608TypeDef PMIDIHDR = *MIDIHDR
609TypeDef LPMIDIHDR = *MIDIHDR
610
611Type MIDIEVENT
612 dwDeltaTime As DWord
613 dwStreamID As DWord
614 dwEvent As DWord
615 dwParms[ELM(1)] As DWord
616End Type
617
618Type MIDISTRMBUFFVER
619 dwVersion As DWord
620 dwMid As DWord
621 dwOEMVersion As DWord
622End Type
623
624' flags for dwFlags field of MIDIHDR structure
625Const MHDR_DONE = &H00000001
626Const MHDR_PREPARED = &H00000002
627Const MHDR_INQUEUE = &H00000004
628Const MHDR_ISSTRM = &H00000008
629
630Const MEVT_F_SHORT = &H00000000
631Const MEVT_F_LONG = &H80000000
632Const MEVT_F_CALLBACK = &H40000000
633Const MEVT_EVENTTYPE(x) = ((x>>24) AND &HFF)
634Const MEVT_EVENTPARM(x) = (x AND &H00FFFFFF)
635Const MEVT_SHORTMSG = (&H00)
636Const MEVT_TEMPO = (&H01)
637Const MEVT_NOP = (&H02)
638Const MEVT_LONGMSG = (&H80)
639Const MEVT_COMMENT = (&H82)
640Const MEVT_VERSION = (&H84)
641
642Const MIDISTRM_ERROR = (-2)
643
644' Structures and defines for midiStreamProperty
645Const MIDIPROP_SET = &H80000000
646Const MIDIPROP_GET = &H40000000
647Const MIDIPROP_TIMEDIV = &H00000001
648Const MIDIPROP_TEMPO = &H00000002
649
650Type MIDIPROPTIMEDIV
651 cbStruct As DWord
652 dwTimeDiv As DWord
653End Type
654TypeDef LPMIDIPROPTIMEDIV = *MIDIPROPTIMEDIV
655
656Type MIDIPROPTEMPO
657 cbStruct As DWord
658 dwTempo As DWord
659End Type
660TypeDef LPMIDIPROPTEMPO = *MIDIPROPTEMPO
661
662
663' MIDI function prototypes
664Declare Function midiOutGetNumDevs Lib "winmm" () As DWord
665Declare Function midiStreamOpen Lib "winmm" (ByRef phms As HMIDISTRM, ByRef puDeviceID As DWord, cMidi As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
666Declare Function midiStreamClose Lib "winmm" (hms As HMIDISTRM) As MMRESULT
667Declare Function midiStreamProperty Lib "winmm" (hms As HMIDISTRM, lppropdata As *Byte, dwProperty As DWord) As MMRESULT
668Declare Function midiStreamPosition Lib "winmm" (hms As HMIDISTRM, ByRef lpmmt As MMTIME, cbmmt As DWord) As MMRESULT
669Declare Function midiStreamOut Lib "winmm" (hms As HMIDISTRM, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
670Declare Function midiStreamPause Lib "winmm" (hms As HMIDISTRM) As MMRESULT
671Declare Function midiStreamRestart Lib "winmm" (hms As HMIDISTRM) As MMRESULT
672Declare Function midiStreamStop Lib "winmm" (hms As HMIDISTRM) As MMRESULT
673
674Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
675Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
676Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
677Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT
678Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT
679Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
680Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
681Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
682Declare Function midiOutPrepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
683Declare Function midiOutUnprepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
684Declare Function midiOutShortMsg Lib "winmm" (hmo As HMIDIOUT, dwMsg As DWord) As MMRESULT
685Declare Function midiOutLongMsg Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
686Declare Function midiOutReset Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
687Declare Function midiOutCachePatches Lib "winmm" (hmo As HMIDIOUT, uBank As DWord, ByRef pwpa As Word, fuCache As DWord) As MMRESULT
688Declare Function midiOutCacheDrumPatches Lib "winmm" (hmo As HMIDIOUT, uPatch As DWord, ByRef pwkya As Word, fuCache As DWord) As MMRESULT
689Declare Function midiOutGetID Lib "winmm" (hmo As HMIDIOUT, ByRef puDeviceID As DWord) As MMRESULT
690Declare Function midiOutMessage Lib "winmm" (hmo As HMIDIOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
691
692Declare Function midiInGetNumDevs Lib "winmm" () As DWord
693Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
694Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
695Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
696Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT
697Declare Function midiInPrepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
698Declare Function midiInUnprepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
699Declare Function midiInAddBuffer Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
700Declare Function midiInStart Lib "winmm" (hmi As HMIDIIN) As MMRESULT
701Declare Function midiInStop Lib "winmm" (hmi As HMIDIIN) As MMRESULT
702Declare Function midiInReset Lib "winmm" (hmi As HMIDIIN) As MMRESULT
703Declare Function midiInGetID Lib "winmm" (hmi As HMIDIIN, ByRef puDeviceID As DWord) As MMRESULT
704Declare Function midiInMessage Lib "winmm" (hmi As HMIDIIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
705
706
707'--------------------------------------------------------
708' Auxiliary audio support
709
710' device ID for aux device mapper
711Const AUX_MAPPER = (-1)
712
713' Auxiliary audio device capabilities structure
714Type AUXCAPSA
715 wMid As Word
716 wPid As Word
717 vDriverVersion As MMVERSION
718 szPname[ELM(MAXPNAMELEN)] As Char
719 wTechnology As Word
720 wReserved1 As Word
721 dwSupport As DWord
722End Type
723TypeDef PAUXCAPSA = *AUXCAPSA
724TypeDef NPAUXCAPSA = *AUXCAPSA
725TypeDef LPAUXCAPSA = *AUXCAPSA
726
727TypeDef AUXCAPS = AUXCAPSA
728TypeDef PAUXCAPS = PAUXCAPSA
729TypeDef NPAUXCAPS = NPAUXCAPSA
730TypeDef LPAUXCAPS = LPAUXCAPSA
731
732Const AUXCAPS_CDAUDIO = 1
733Const AUXCAPS_AUXIN = 2
734
735Const AUXCAPS_VOLUME = &H0001
736Const AUXCAPS_LRVOLUME = &H0002
737
738' auxiliary audio function prototypes
739Declare Function auxGetNumDevs Lib "winmm" () As DWord
740Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
741Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
742Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
743Declare Function auxOutMessage Lib "winmm" (uDeviceID As DWord, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
744
745
746'--------------------------------------------------------
747' Mixer Support
748
749TypeDef HMIXEROBJ = VoidPtr
750TypeDef LPHMIXEROBJ = HMIXEROBJ
751TypeDef HMIXER = VoidPtr
752TypeDef LPHMIXER = *HMIXER
753
754Const MIXER_SHORT_NAME_CHARS = 16
755Const MIXER_LONG_NAME_CHARS = 64
756
757Const MIXERR_INVALLINE = (MIXERR_BASE + 0)
758Const MIXERR_INVALCONTROL = (MIXERR_BASE + 1)
759Const MIXERR_INVALVALUE = (MIXERR_BASE + 2)
760Const MIXERR_LASTERROR = (MIXERR_BASE + 2)
761
762Const MIXER_OBJECTF_HANDLE = &H80000000
763Const MIXER_OBJECTF_MIXER = &H00000000
764Const MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIXER)
765Const MIXER_OBJECTF_WAVEOUT = &H10000000
766Const MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEOUT)
767Const MIXER_OBJECTF_WAVEIN = &H20000000
768Const MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEIN)
769Const MIXER_OBJECTF_MIDIOUT = &H30000000
770Const MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIOUT)
771Const MIXER_OBJECTF_MIDIIN = &H40000000
772Const MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIIN)
773Const MIXER_OBJECTF_AUX = &H50000000
774
775Declare Function mixerGetNumDevs Lib "winmm" () As DWord
776
777Type MIXERCAPSA
778 wMid As Word
779 wPid As Word
780 vDriverVersion As MMVERSION
781 szPname[ELM(MAXPNAMELEN)] As Char
782 fdwSupport As DWord
783 cDestinations As DWord
784End Type
785TypeDef PMIXERCAPSA = *MIXERCAPSA
786TypeDef LPMIXERCAPSA = *MIXERCAPSA
787
788TypeDef MIXERCAPS = MIXERCAPSA
789TypeDef PMIXERCAPS = PMIXERCAPSA
790TypeDef LPMIXERCAPS = LPMIXERCAPSA
791
792Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
793Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
794Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
795Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
796
797Type TARGET
798 dwType As DWord
799 dwDeviceID As DWord
800 wMid As Word
801 wPid As Word
802 vDriverVersion As MMVERSION
803 szPname[ELM(MAXPNAMELEN)] As Char
804End Type
805
806Type MIXERLINEA
807 cbStruct As DWord
808 dwDestination As DWord
809 dwSource As DWord
810 dwLineID As DWord
811 fdwLine As DWord
812 dwUser As DWord
813 dwComponentType As DWord
814 cChannels As DWord
815 cConnections As DWord
816 cControls As DWord
817 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
818 szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
819 Target As TARGET
820End Type
821TypeDef PMIXERLINEA = *MIXERLINEA
822TypeDef LPMIXERLINEA = *MIXERLINEA
823
824TypeDef MIXERLINE = MIXERLINEA
825TypeDef PMIXERLINE = PMIXERLINEA
826TypeDef LPMIXERLINE = LPMIXERLINEA
827
828' MIXERLINE.fdwLine
829Const MIXERLINE_LINEF_ACTIVE = &H00000001
830Const MIXERLINE_LINEF_DISCONNECTED = &H00008000
831Const MIXERLINE_LINEF_SOURCE = &H80000000
832
833' MIXERLINE.dwComponentType
834Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H00000000
835Const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
836Const MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
837Const MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
838Const MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
839Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
840Const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
841Const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
842Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
843Const MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
844Const MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
845
846Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H00001000
847Const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
848Const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
849Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
850Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
851Const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
852Const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
853Const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
854Const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
855Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
856Const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
857Const MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
858Const MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
859
860' MIXERLINE.Target.dwType
861Const MIXERLINE_TARGETTYPE_UNDEFINED = 0
862Const MIXERLINE_TARGETTYPE_WAVEOUT = 1
863Const MIXERLINE_TARGETTYPE_WAVEIN = 2
864Const MIXERLINE_TARGETTYPE_MIDIOUT = 3
865Const MIXERLINE_TARGETTYPE_MIDIIN = 4
866Const MIXERLINE_TARGETTYPE_AUX = 5
867
868Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
869
870Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
871Const MIXER_GETLINEINFOF_SOURCE = &H00000001
872Const MIXER_GETLINEINFOF_LINEID = &H00000002
873Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H00000003
874Const MIXER_GETLINEINFOF_TARGETTYPE = &H00000004
875Const MIXER_GETLINEINFOF_QUERYMASK = &H0000000F
876
877Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
878
879Type MIXERCONTROLA
880 cbStruct As DWord
881 dwControlID As DWord
882 dwControlType As DWord
883 fdwControl As DWord
884 cMultipleItems As DWord
885 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
886 szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
887 Bounds[ELM(6)] As DWord
888 Metrics[ELM(6)] As DWord
889End Type
890TypeDef PMIXERCONTROLA = *MIXERCONTROLA
891TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
892
893TypeDef MIXERCONTROL = MIXERCONTROLA
894TypeDef PMIXERCONTROL = PMIXERCONTROLA
895TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
896
897' MIXERCONTROL.fdwControl
898Const MIXERCONTROL_CONTROLF_UNIFORM = &H00000001
899Const MIXERCONTROL_CONTROLF_MULTIPLE = &H00000002
900Const MIXERCONTROL_CONTROLF_DISABLED = &H80000000
901
902' MIXERCONTROL_CONTROLTYPE_xxx
903Const MIXERCONTROL_CT_CLASS_MASK = &HF0000000
904Const MIXERCONTROL_CT_CLASS_CUSTOM = &H00000000
905Const MIXERCONTROL_CT_CLASS_METER = &H10000000
906Const MIXERCONTROL_CT_CLASS_SWITCH = &H20000000
907Const MIXERCONTROL_CT_CLASS_NUMBER = &H30000000
908Const MIXERCONTROL_CT_CLASS_SLIDER = &H40000000
909Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
910Const MIXERCONTROL_CT_CLASS_TIME = &H60000000
911Const MIXERCONTROL_CT_CLASS_LIST = &H70000000
912Const MIXERCONTROL_CT_SUBCLASS_MASK = &H0F000000
913Const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = &H00000000
914Const MIXERCONTROL_CT_SC_SWITCH_BUTTON = &H01000000
915Const MIXERCONTROL_CT_SC_METER_POLLED = &H00000000
916Const MIXERCONTROL_CT_SC_TIME_MICROSECS = &H00000000
917Const MIXERCONTROL_CT_SC_TIME_MILLISECS = &H01000000
918Const MIXERCONTROL_CT_SC_LIST_SINGLE = &H00000000
919Const MIXERCONTROL_CT_SC_LIST_MULTIPLE = &H01000000
920Const MIXERCONTROL_CT_UNITS_MASK = &H00FF0000
921Const MIXERCONTROL_CT_UNITS_CUSTOM = &H00000000
922Const MIXERCONTROL_CT_UNITS_BOOLEAN = &H00010000
923Const MIXERCONTROL_CT_UNITS_SIGNED = &H00020000
924Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H00030000
925Const MIXERCONTROL_CT_UNITS_DECIBELS = &H00040000
926Const MIXERCONTROL_CT_UNITS_PERCENT = &H00050000
927
928' MIXERCONTROL.dwControlType
929Const MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM OR MIXERCONTROL_CT_UNITS_CUSTOM)
930Const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_BOOLEAN)
931Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_SIGNED)
932Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
933Const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_UNSIGNED)
934Const MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BOOLEAN OR MIXERCONTROL_CT_UNITS_BOOLEAN)
935Const MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
936Const MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
937Const MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
938Const MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
939Const MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
940Const MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BUTTON OR MIXERCONTROL_CT_UNITS_BOOLEAN)
941Const MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_DECIBELS)
942Const MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_SIGNED)
943Const MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
944Const MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_PERCENT)
945Const MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER OR MIXERCONTROL_CT_UNITS_SIGNED)
946Const MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
947Const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
948Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
949Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
950Const MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
951Const MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
952Const MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
953Const MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_SINGLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
954Const MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
955Const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_MULTIPLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
956Const MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
957Const MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MICROSECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
958Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
959
960Type MIXERLINECONTROLSA
961 cbStruct As DWord
962 dwLineID As DWord
963 dwControl_ID_Type As DWord
964 cControls As DWord
965 cbmxctrl As DWord
966 pamxctrl As *MIXERCONTROL
967End Type
968TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
969TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
970
971TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
972TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
973TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
974
975Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
976
977Const MIXER_GETLINECONTROLSF_ALL = &H00000000
978Const MIXER_GETLINECONTROLSF_ONEBYID = &H00000001
979Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H00000002
980Const MIXER_GETLINECONTROLSF_QUERYMASK = &H0000000F
981
982Type MIXERCONTROLDETAILS
983 cbStruct As DWord
984 dwControlID As DWord
985 cChannels As DWord
986 cMultipleItems As DWord
987 cbDetails As DWord
988 paDetails As VoidPtr
989End Type
990TypeDef PMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
991TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
992
993Type MIXERCONTROLDETAILS_LISTTEXTA
994 dwParam1 As DWord
995 dwParam2 As DWord
996 szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
997End Type
998TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
999TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
1000
1001TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
1002TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
1003TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
1004
1005Type MIXERCONTROLDETAILS_BOOLEAN
1006 fValue As Long
1007End Type
1008TypeDef PMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
1009TypeDef LPMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
1010
1011Type MIXERCONTROLDETAILS_SIGNED
1012 lValue As Long
1013End Type
1014TypeDef PMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
1015TypeDef LPMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
1016
1017Type MIXERCONTROLDETAILS_UNSIGNED
1018 dwValue As DWord
1019End Type
1020TypeDef PMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
1021TypeDef LPMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
1022
1023Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1024Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1025Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1026
1027Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
1028Const MIXER_GETCONTROLDETAILSF_LISTTEXT = &H00000001
1029Const MIXER_GETCONTROLDETAILSF_QUERYMASK = &H0000000F
1030
1031Declare Function mixerSetControlDetails Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1032
1033Const MIXER_SETCONTROLDETAILSF_VALUE = &H00000000
1034Const MIXER_SETCONTROLDETAILSF_CUSTOM = &H00000001
1035Const MIXER_SETCONTROLDETAILSF_QUERYMASK = &H0000000F
1036
1037
1038'--------------------------------------------------------
1039' Timer support
1040
1041' timer error
1042Const TIMERR_NOERROR = (0)
1043Const TIMERR_NOCANDO = (TIMERR_BASE+1)
1044Const TIMERR_STRUCT = (TIMERR_BASE+33)
1045
1046TypeDef LPTIMECALLBACK = *Sub(uTimerID As DWord, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
1047
1048Const TIME_ONESHOT = &H0000
1049Const TIME_PERIODIC = &H0001
1050
1051Const TIME_CALLBACK_FUNCTION = &H0000
1052Const TIME_CALLBACK_EVENT_SET = &H0010
1053Const TIME_CALLBACK_EVENT_PULSE = &H0020
1054
1055' timer device capabilities data structure
1056Type TIMECAPS
1057 wPeriodMin As DWord
1058 wPeriodMax As DWord
1059End Type
1060TypeDef PTIMECAPS = *TIMECAPS
1061TypeDef NPTIMECAPS = *TIMECAPS
1062TypeDef LPTIMECAPS = *TIMECAPS
1063
1064' timer function prototypes
1065Declare Function timeGetSystemTime Lib "winmm" (pmmt As *MMTIME, cbmmt As DWord) As MMRESULT
1066Declare Function timeGetTime Lib "winmm" () As DWord
1067Declare Function timeSetEvent Lib "winmm" (uDelay As DWord, uResolution As DWord, fptc As LPTIMECALLBACK, dwUser As DWord, fuEvent As DWord) As MMRESULT
1068Declare Function timeKillEvent Lib "winmm" (uTimerID As DWord) As MMRESULT
1069Declare Function timeGetDevCaps Lib "winmm" (ptc As *TIMECAPS, cbtc As DWord) As MMRESULT
1070Declare Function timeBeginPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
1071Declare Function timeEndPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
1072
1073
1074'--------------------------------------------------------
1075' Joystick support
1076
1077' joystick error
1078Const JOYERR_NOERROR = (0)
1079Const JOYERR_PARMS = (JOYERR_BASE+5)
1080Const JOYERR_NOCANDO = (JOYERR_BASE+6)
1081Const JOYERR_UNPLUGGED = (JOYERR_BASE+7)
1082
1083' constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages
1084Const JOY_BUTTON1 = &H0001
1085Const JOY_BUTTON2 = &H0002
1086Const JOY_BUTTON3 = &H0004
1087Const JOY_BUTTON4 = &H0008
1088Const JOY_BUTTON1CHG = &H0100
1089Const JOY_BUTTON2CHG = &H0200
1090Const JOY_BUTTON3CHG = &H0400
1091Const JOY_BUTTON4CHG = &H0800
1092
1093' constants used with JOYINFOEX
1094Const JOY_BUTTON5 = &H00000010
1095Const JOY_BUTTON6 = &H00000020
1096Const JOY_BUTTON7 = &H00000040
1097Const JOY_BUTTON8 = &H00000080
1098Const JOY_BUTTON9 = &H00000100
1099Const JOY_BUTTON10 = &H00000200
1100Const JOY_BUTTON11 = &H00000400
1101Const JOY_BUTTON12 = &H00000800
1102Const JOY_BUTTON13 = &H00001000
1103Const JOY_BUTTON14 = &H00002000
1104Const JOY_BUTTON15 = &H00004000
1105Const JOY_BUTTON16 = &H00008000
1106Const JOY_BUTTON17 = &H00010000
1107Const JOY_BUTTON18 = &H00020000
1108Const JOY_BUTTON19 = &H00040000
1109Const JOY_BUTTON20 = &H00080000
1110Const JOY_BUTTON21 = &H00100000
1111Const JOY_BUTTON22 = &H00200000
1112Const JOY_BUTTON23 = &H00400000
1113Const JOY_BUTTON24 = &H00800000
1114Const JOY_BUTTON25 = &H01000000
1115Const JOY_BUTTON26 = &H02000000
1116Const JOY_BUTTON27 = &H04000000
1117Const JOY_BUTTON28 = &H08000000
1118Const JOY_BUTTON29 = &H10000000
1119Const JOY_BUTTON30 = &H20000000
1120Const JOY_BUTTON31 = &H40000000
1121Const JOY_BUTTON32 = &H80000000
1122
1123' constants used with JOYINFOEX structure
1124Const JOY_POVCENTERED = (-1)
1125Const JOY_POVFORWARD = 0
1126Const JOY_POVRIGHT = 9000
1127Const JOY_POVBACKWARD = 18000
1128Const JOY_POVLEFT = 27000
1129
1130Const JOY_RETURNX = &H00000001
1131Const JOY_RETURNY = &H00000002
1132Const JOY_RETURNZ = &H00000004
1133Const JOY_RETURNR = &H00000008
1134Const JOY_RETURNU = &H00000010
1135Const JOY_RETURNV = &H00000020
1136Const JOY_RETURNPOV = &H00000040
1137Const JOY_RETURNBUTTONS = &H00000080
1138Const JOY_RETURNRAWDATA = &H00000100
1139Const JOY_RETURNPOVCTS = &H00000200
1140Const JOY_RETURNCENTERED = &H00000400
1141Const JOY_USEDEADZONE = &H00000800
1142Const JOY_RETURNALL = (JOY_RETURNX OR JOY_RETURNY OR JOY_RETURNZ OR JOY_RETURNR OR JOY_RETURNU OR JOY_RETURNV OR JOY_RETURNPOV OR JOY_RETURNBUTTONS)
1143Const JOY_CAL_READALWAYS = &H00010000
1144Const JOY_CAL_READXYONLY = &H00020000
1145Const JOY_CAL_READ3 = &H00040000
1146Const JOY_CAL_READ4 = &H00080000
1147Const JOY_CAL_READXONLY = &H00100000
1148Const JOY_CAL_READYONLY = &H00200000
1149Const JOY_CAL_READ5 = &H00400000
1150Const JOY_CAL_READ6 = &H00800000
1151Const JOY_CAL_READZONLY = &H01000000
1152Const JOY_CAL_READRONLY = &H02000000
1153Const JOY_CAL_READUONLY = &H04000000
1154Const JOY_CAL_READVONLY = &H08000000
1155
1156' joystick ID constants
1157Const JOYSTICKID1 = 0
1158Const JOYSTICKID2 = 1
1159
1160' joystick driver capabilites
1161Const JOYCAPS_HASZ = &H0001
1162Const JOYCAPS_HASR = &H0002
1163Const JOYCAPS_HASU = &H0004
1164Const JOYCAPS_HASV = &H0008
1165Const JOYCAPS_HASPOV = &H0010
1166Const JOYCAPS_POV4DIR = &H0020
1167Const JOYCAPS_POVCTS = &H0040
1168
1169Type JOYCAPSA
1170 wMid As Word
1171 wPid As Word
1172 szPname[ELM(MAXPNAMELEN)] As Char
1173 wXmin As DWord
1174 wXmax As DWord
1175 wYmin As DWord
1176 wYmax As DWord
1177 wZmin As DWord
1178 wZmax As DWord
1179 wNumButtons As DWord
1180 wPeriodMin As DWord
1181 wPeriodMax As DWord
1182 wRmin As DWord
1183 wRmax As DWord
1184 wUmin As DWord
1185 wUmax As DWord
1186 wVmin As DWord
1187 wVmax As DWord
1188 wCaps As DWord
1189 wMaxAxes As DWord
1190 wNumAxes As DWord
1191 wMaxButtons As DWord
1192 szRegKey[ELM(MAXPNAMELEN)] As Char
1193 szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As Char
1194End Type
1195TypeDef PJOYCAPSA = *JOYCAPSA
1196TypeDef NPJOYCAPSA = *JOYCAPSA
1197TypeDef LPJOYCAPSA = *JOYCAPSA
1198
1199TypeDef JOYCAPS = JOYCAPSA
1200TypeDef PJOYCAPS = PJOYCAPSA
1201TypeDef NPJOYCAPS = NPJOYCAPSA
1202TypeDef LPJOYCAPS = LPJOYCAPSA
1203
1204Type JOYINFO
1205 wXpos As DWord
1206 wYpos As DWord
1207 wZpos As DWord
1208 wButtons As DWord
1209End Type
1210TypeDef PJOYINFO = *JOYINFO
1211TypeDef NPJOYINFO = *JOYINFO
1212TypeDef LPJOYINFO = *JOYINFO
1213
1214Type JOYINFOEX
1215 dwSize As DWord
1216 dwFlags As DWord
1217 dwXpos As DWord
1218 dwYpos As DWord
1219 dwZpos As DWord
1220 dwRpos As DWord
1221 dwUpos As DWord
1222 dwVpos As DWord
1223 dwButtons As DWord
1224 dwButtonNumber As DWord
1225 dwPOV As DWord
1226 dwReserved1 As DWord
1227 dwReserved2 As DWord
1228End Type
1229TypeDef PJOYINFOEX = *JOYINFOEX
1230TypeDef NPJOYINFOEX = *JOYINFOEX
1231TypeDef LPJOYINFOEX = *JOYINFOEX
1232
1233' joystick function prototypes
1234Declare Function joyGetNumDevs Lib "winmm" () As DWord
1235Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
1236Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
1237Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
1238Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, puThreshold As *DWord) As MMRESULT
1239Declare Function joyReleaseCapture Lib "winmm" (uJoyID As DWord) As MMRESULT
1240Declare Function joySetCapture Lib "winmm" (hwnd As HWND, uJoyID As DWord, uPeriod As DWord, fChanged As BOOL) As MMRESULT
1241Declare Function joySetThreshold Lib "winmm" (uJoyID As DWord, uThreshold As DWord) As MMRESULT
1242
1243
1244'--------------------------------------------------------
1245' Multimedia File I/O support
1246
1247' MMIO error return values
1248Const MMIOERR_BASE = 256
1249Const MMIOERR_FILENOTFOUND = (MMIOERR_BASE + 1)
1250Const MMIOERR_OUTOFMEMORY = (MMIOERR_BASE + 2)
1251Const MMIOERR_CANNOTOPEN = (MMIOERR_BASE + 3)
1252Const MMIOERR_CANNOTCLOSE = (MMIOERR_BASE + 4)
1253Const MMIOERR_CANNOTREAD = (MMIOERR_BASE + 5)
1254Const MMIOERR_CANNOTWRITE = (MMIOERR_BASE + 6)
1255Const MMIOERR_CANNOTSEEK = (MMIOERR_BASE + 7)
1256Const MMIOERR_CANNOTEXPAND = (MMIOERR_BASE + 8)
1257Const MMIOERR_CHUNKNOTFOUND = (MMIOERR_BASE + 9)
1258Const MMIOERR_UNBUFFERED = (MMIOERR_BASE + 10)
1259Const MMIOERR_PATHNOTFOUND = (MMIOERR_BASE + 11)
1260Const MMIOERR_ACCESSDENIED = (MMIOERR_BASE + 12)
1261Const MMIOERR_SHARINGVIOLATION = (MMIOERR_BASE + 13)
1262Const MMIOERR_NETWORKERROR = (MMIOERR_BASE + 14)
1263Const MMIOERR_TOOMANYOPENFILES = (MMIOERR_BASE + 15)
1264Const MMIOERR_INVALIDFILE = (MMIOERR_BASE + 16)
1265
1266' MMIO constants
1267Const CFSEPCHAR = "+"
1268
1269' MMIO data types
1270TypeDef FOURCC = DWord
1271TypeDef HPSTR = *Char
1272TypeDef HMMIO = VoidPtr
1273
1274TypeDef LPMMIOPROC = *Function(lpmmioinfo As LPSTR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
1275
1276Type MMIOINFO
1277 dwFlags As DWord
1278 fccIOProc As FOURCC
1279 pIOProc As LPMMIOPROC
1280 wErrorRet As DWord
1281 htask As HTASK
1282 cchBuffer As Long
1283 pchBuffer As HPSTR
1284 pchNext As HPSTR
1285 pchEndRead As HPSTR
1286 pchEndWrite As HPSTR
1287 lBufOffset As Long
1288 lDiskOffset As Long
1289 adwInfo[ELM(3)] As DWord
1290 dwReserved1 As DWord
1291 dwReserved2 As DWord
1292 hmmio As HMMIO
1293End Type
1294TypeDef PMMIOINFO = *MMIOINFO
1295TypeDef NPMMIOINFO = *MMIOINFO
1296TypeDef LPMMIOINFO = *MMIOINFO
1297
1298Type MMCKINFO
1299 ckid As FOURCC
1300 cksize As DWord
1301 fccType As FOURCC
1302 dwDataOffset As DWord
1303 dwFlags As DWord
1304End Type
1305TypeDef PMMCKINFO = *MMCKINFO
1306TypeDef NPMMCKINFO = *MMCKINFO
1307TypeDef LPMMCKINFO = *MMCKINFO
1308
1309Const MMIO_RWMODE = &H00000003
1310Const MMIO_SHAREMODE = &H00000070
1311Const MMIO_CREATE = &H00001000
1312Const MMIO_PARSE = &H00000100
1313Const MMIO_DELETE = &H00000200
1314Const MMIO_EXIST = &H00004000
1315Const MMIO_ALLOCBUF = &H00010000
1316Const MMIO_GETTEMP = &H00020000
1317Const MMIO_DIRTY = &H10000000
1318Const MMIO_READ = &H00000000
1319Const MMIO_WRITE = &H00000001
1320Const MMIO_READWRITE = &H00000002
1321Const MMIO_COMPAT = &H00000000
1322Const MMIO_EXCLUSIVE = &H00000010
1323Const MMIO_DENYWRITE = &H00000020
1324Const MMIO_DENYREAD = &H00000030
1325Const MMIO_DENYNONE = &H00000040
1326Const MMIO_FHOPEN = &H0010
1327Const MMIO_EMPTYBUF = &H0010
1328Const MMIO_TOUPPER = &H0010
1329Const MMIO_INSTALLPROC = &H00010000
1330Const MMIO_GLOBALPROC = &H10000000
1331Const MMIO_REMOVEPROC = &H00020000
1332Const MMIO_UNICODEPROC = &H01000000
1333Const MMIO_FINDPROC = &H00040000
1334Const MMIO_FINDCHUNK = &H0010
1335Const MMIO_FINDRIFF = &H0020
1336Const MMIO_FINDLIST = &H0040
1337Const MMIO_CREATERIFF = &H0020
1338Const MMIO_CREATELIST = &H0040
1339
1340Const MMIOM_READ = MMIO_READ
1341Const MMIOM_WRITE = MMIO_WRITE
1342Const MMIOM_SEEK = 2
1343Const MMIOM_OPEN = 3
1344Const MMIOM_CLOSE = 4
1345Const MMIOM_WRITEFLUSH = 5
1346Const MMIOM_RENAME = 6
1347Const MMIOM_USER = &H8000
1348
1349Const FOURCC_RIFF = MAKEFOURCC(&H52, &H49, &H46, &H46)
1350Const FOURCC_LIST = MAKEFOURCC(&H4C, &H49, &H53, &H54)
1351Const FOURCC_DOS = MAKEFOURCC(&H44, &H4F, &H53, &H20)
1352Const FOURCC_MEM = MAKEFOURCC(&H4D, &H45, &H4D, &H20)
1353
1354Const SEEK_SET = 0
1355Const SEEK_CUR = 1
1356Const SEEK_END = 2
1357
1358Const MMIO_DEFAULTBUFFER = 8192
1359
1360Function mmioFOURCC(ch0 As String, ch1 As String, ch2 As String, ch3 As String) As FOURCC
1361 mmioFOURCC = MAKEFOURCC(Asc(ch0), Asc(ch1), Asc(ch2), Asc(ch3))
1362End Function
1363
1364' MMIO function prototypes
1365Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
1366Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
1367Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
1368Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
1369Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
1370Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
1371Declare Function mmioWrite Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
1372Declare Function mmioSeek Lib "winmm" (hmmio As HMMIO, lOffset As Long, iOrigin As Long) As Long
1373Declare Function mmioGetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
1374Declare Function mmioSetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
1375Declare Function mmioSetBuffer Lib "winmm" (hmmio As HMMIO, pchBuffer As LPSTR, cchBuffer As Long, fuBuffer As DWord) As MMRESULT
1376Declare Function mmioFlush Lib "winmm" (hmmio As HMMIO, fuFlush As DWord) As MMRESULT
1377Declare Function mmioAdvance Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuAdvance As DWord) As MMRESULT
1378Declare Function mmioSendMessage Lib "winmm" (hmmio As HMMIO, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
1379Declare Function mmioDescend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, pmmckiParent As *MMCKINFO, fuDescend As DWord) As MMRESULT
1380Declare Function mmioAscend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuAscend As DWord) As MMRESULT
1381Declare Function mmioCreateChunk Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuCreate As DWord) As MMRESULT
1382
1383
1384'--------------------------------------------------------
1385' MCI support
1386
1387'--------------------------------------------------------
1388' Time Format(used in MCI_SET_PARAMS, MCI_STATUS_PARAMS)
1389
1390Const MCI_FORMAT_MILLISECONDS = 0
1391Const MCI_FORMAT_HMS = 1
1392Const MCI_FORMAT_MSF = 2
1393Const MCI_FORMAT_FRAMES = 3
1394Const MCI_FORMAT_SMPTE_24 = 4
1395Const MCI_FORMAT_SMPTE_25 = 5
1396Const MCI_FORMAT_SMPTE_30 = 6
1397Const MCI_FORMAT_SMPTE_30DROP = 7
1398Const MCI_FORMAT_BYTES = 8
1399Const MCI_FORMAT_SAMPLES = 9
1400Const MCI_FORMAT_TMSF = 10
1401
1402
1403'--------------
1404' Types of MCI
1405'--------------
1406
1407Type MCI_OPEN_PARMS
1408 dwCallback As DWord
1409 wDeviceID As DWord
1410 lpstrDeviceType As BytePtr
1411 lpstrElementName As BytePtr
1412 lpstrAlias As BytePtr
1413End Type
1414
1415Type MCI_PLAY_PARMS
1416 dwCallback As DWord
1417 dwFrom As DWord
1418 dwTo As DWord
1419End Type
1420
1421Type MCI_SEEK_PARMS
1422 dwCallback As DWord
1423 dwTo As DWord
1424End Type
1425
1426Type MCI_SET_PARMS
1427 dwCallback As DWord
1428 dwTimeFormat As DWord
1429 dwAudio As DWord
1430End Type
1431
1432Const MCI_STATUS_LENGTH = &H00000001
1433Const MCI_STATUS_POSITION = &H00000002
1434Const MCI_STATUS_NUMBER_OF_TRACKS = &H00000003
1435Const MCI_STATUS_MODE = &H00000004
1436Const MCI_STATUS_MEDIA_PRESENT = &H00000005
1437Const MCI_STATUS_TIME_FORMAT = &H00000006
1438Const MCI_STATUS_READY = &H00000007
1439Const MCI_STATUS_CURRENT_TRACK = &H00000008
1440Type MCI_STATUS_PARMS
1441 dwCallback As DWord
1442 dwReturn As DWord
1443 dwItem As DWord
1444 dwTrack As DWord
1445End Type
1446
1447
1448'------------
1449' MCI Macros
1450
1451Function MCI_MAKE_TMSF(tracks As Byte, minutes As Byte, seconds As Byte, frames As Byte) As DWord
1452 MCI_MAKE_TMSF=MAKELONG(MAKEWORD(tracks,minutes),MAKEWORD(seconds,frames))
1453End Function
1454
1455Function MCI_MSF_MINUTE(dwMFS As DWord) As Byte
1456 MCI_MSF_MINUTE=LOBYTE(LOWORD(dwMFS))
1457End Function
1458
1459Function MCI_MSF_SECOND(dwMFS As DWord) As Byte
1460 MCI_MSF_SECOND=HIBYTE(LOWORD(dwMFS))
1461End Function
1462
1463
1464'---------------
1465' MCI Functions
1466
1467' common flags for dwFlags parameter of MCI command messages
1468Const MCI_NOTIFY = &H00000001
1469Const MCI_WAIT = &H00000002
1470Const MCI_FROM = &H00000004
1471Const MCI_TO = &H00000008
1472Const MCI_TRACK = &H00000010
1473
1474' flags for dwFlags parameter of MCI_OPEN command message
1475Const MCI_OPEN_SHAREABLE = &H00000100
1476Const MCI_OPEN_ELEMENT = &H00000200
1477Const MCI_OPEN_ALIAS = &H00000400
1478Const MCI_OPEN_ELEMENT_ID = &H00000800
1479Const MCI_OPEN_TYPE_ID = &H00001000
1480Const MCI_OPEN_TYPE = &H00002000
1481Const MCI_ANIM_OPEN_WS = &H00010000
1482Const MCI_ANIM_OPEN_PARENT = &H00020000
1483Const MCI_ANIM_OPEN_NOSTATIC = &H00040000
1484Const MCI_DGV_OPEN_WS = &H00010000
1485Const MCI_DGV_OPEN_PARENT = &H00020000
1486Const MCI_DGV_OPEN_NOSTATIC = &H00040000
1487Const MCI_DGV_OPEN_16BIT = &H00080000
1488Const MCI_DGV_OPEN_32BIT = &H00100000
1489Const MCI_OVLY_OPEN_WS = &H00010000
1490Const MCI_OVLY_OPEN_PARENT = &H00020000
1491
1492' flags for dwFlags parameter of MCI_PLAY command message
1493Const MCI_ANIM_PLAY_SPEED = &H00010000
1494Const MCI_ANIM_PLAY_REVERSE = &H00020000
1495Const MCI_ANIM_PLAY_FAST = &H00040000
1496Const MCI_ANIM_PLAY_SLOW = &H00080000
1497Const MCI_ANIM_PLAY_SCAN = &H00100000
1498Const MCI_DGV_PLAY_REPEAT = &H00010000
1499Const MCI_DGV_PLAY_REVERSE = &H00020000
1500Const MCI_MCIAVI_PLAY_WINDOW = &H01000000
1501Const MCI_MCIAVI_PLAY_FULLSCREEN = &H02000000
1502Const MCI_VCR_PLAY_REVERSE = &H00010000
1503Const MCI_VCR_PLAY_AT = &H00020000
1504Const MCI_VCR_PLAY_SCAN = &H00040000
1505Const MCI_VD_PLAY_REVERSE = &H00010000
1506Const MCI_VD_PLAY_FAST = &H00020000
1507Const MCI_VD_PLAY_SPEED = &H00040000
1508Const MCI_VD_PLAY_SCAN = &H00080000
1509Const MCI_VD_PLAY_SLOW = &H00100000
1510
1511' flags for dwFlags parameter of MCI_SEEK command message
1512Const MCI_SEEK_TO_START = &H00000100
1513Const MCI_SEEK_TO_END = &H00000200
1514Const MCI_VCR_SEEK_REVERSE = &H00010000
1515Const MCI_VCR_SEEK_MARK = &H00020000
1516Const MCI_VCR_SEEK_AT = &H00040000
1517Const MCI_VD_SEEK_REVERSE = &H00010000
1518
1519' flags for dwFlags parameter of MCI_SET command message
1520Const MCI_SET_DOOR_OPEN = &H00000100
1521Const MCI_SET_DOOR_CLOSED = &H00000200
1522Const MCI_SET_TIME_FORMAT = &H00000400
1523Const MCI_SET_AUDIO = &H00000800
1524Const MCI_SET_VIDEO = &H00001000
1525Const MCI_SET_ON = &H00002000
1526Const MCI_SET_OFF = &H00004000
1527Const MCI_DGV_SET_SEEK_EXACTLY = &H00010000
1528Const MCI_DGV_SET_SPEED = &H00020000
1529Const MCI_DGV_SET_STILL = &H00040000
1530Const MCI_DGV_SET_FILEFORMAT = &H00080000
1531Const MCI_SEQ_FORMAT_SONGPTR = &H4001
1532Const MCI_SEQ_FILE = &H4002
1533Const MCI_SEQ_MIDI = &H4003
1534Const MCI_SEQ_SMPTE = &H4004
1535Const MCI_SEQ_NONE = 65533
1536Const MCI_SEQ_MAPPER = 65535
1537Const MCI_SEQ_SET_TEMPO = &H00010000
1538Const MCI_SEQ_SET_PORT = &H00020000
1539Const MCI_SEQ_SET_SLAVE = &H00040000
1540Const MCI_SEQ_SET_MASTER = &H00080000
1541Const MCI_SEQ_SET_OFFSET = &H01000000
1542Const MCI_VCR_SET_TIME_MODE = &H00010000
1543Const MCI_VCR_SET_POWER = &H00020000
1544Const MCI_VCR_SET_RECORD_FORMAT = &H00040000
1545Const MCI_VCR_SET_COUNTER_FORMAT = &H00080000
1546Const MCI_VCR_SET_INDEX = &H00100000
1547Const MCI_VCR_SET_ASSEMBLE_RECORD = &H00200000
1548Const MCI_VCR_SET_TRACKING = &H00400000
1549Const MCI_VCR_SET_SPEED = &H00800000
1550Const MCI_VCR_SET_TAPE_LENGTH = &H01000000
1551Const MCI_VCR_SET_COUNTER_VALUE = &H02000000
1552Const MCI_VCR_SET_CLOCK = &H04000000
1553Const MCI_VCR_SET_PAUSE_TIMEOUT = &H08000000
1554Const MCI_VCR_SET_PREROLL_DURATION = &H10000000
1555Const MCI_VCR_SET_POSTROLL_DURATION = &H20000000
1556Const MCI_VD_FORMAT_TRACK = &H4001
1557Const MCI_WAVE_SET_FORMATTAG = &H00010000
1558Const MCI_WAVE_SET_CHANNELS = &H00020000
1559Const MCI_WAVE_SET_SAMPLESPERSEC = &H00040000
1560Const MCI_WAVE_SET_AVGBYTESPERSEC = &H00080000
1561Const MCI_WAVE_SET_BLOCKALIGN = &H00100000
1562Const MCI_WAVE_SET_BITSPERSAMPLE = &H00200000
1563Const MCI_WAVE_INPUT = &H00400000
1564Const MCI_WAVE_OUTPUT = &H00800000
1565Const MCI_WAVE_SET_ANYINPUT = &H04000000
1566Const MCI_WAVE_SET_ANYOUTPUT = &H08000000
1567
1568' flags for dwFlags parameter of MCI_STATUS command message
1569Const MCI_STATUS_ITEM = &H00000100
1570Const MCI_STATUS_START = &H00000200
1571Const MCI_CDA_STATUS_TYPE_TRACK = &H00004001
1572Const MCI_CDA_TRACK_AUDIO = MCI_CD_OFFSET+0
1573Const MCI_CDA_TRACK_OTHER = MCI_CD_OFFSET+1
1574Const MCI_DGV_STATUS_NOMINAL = &H00020000
1575Const MCI_DGV_STATUS_REFERENCE = &H00040000
1576Const MCI_DGV_STATUS_LEFT = &H00080000
1577Const MCI_DGV_STATUS_RIGHT = &H00100000
1578Const MCI_DGV_STATUS_DISKSPACE = &H00200000
1579Const MCI_DGV_STATUS_INPUT = &H00400000
1580Const MCI_DGV_STATUS_OUTPUT = &H00800000
1581Const MCI_DGV_STATUS_RECORD = &H01000000
1582
1583' constants for predefined MCI device types
1584Const MCI_DEVTYPE_VCR = 513
1585Const MCI_DEVTYPE_VIDEODISC = 514
1586Const MCI_DEVTYPE_OVERLAY = 515
1587Const MCI_DEVTYPE_CD_AUDIO = 516
1588Const MCI_DEVTYPE_DAT = 517
1589Const MCI_DEVTYPE_SCANNER = 518
1590Const MCI_DEVTYPE_ANIMATION = 519
1591Const MCI_DEVTYPE_DIGITAL_VIDEO = 520
1592Const MCI_DEVTYPE_OTHER = 521
1593Const MCI_DEVTYPE_WAVEFORM_AUDIO = 522
1594Const MCI_DEVTYPE_SEQUENCER = 523
1595
1596' return values for 'status mode' command
1597Const MCI_MODE_NOT_READY = MCI_STRING_OFFSET + 12
1598Const MCI_MODE_STOP = MCI_STRING_OFFSET + 13
1599Const MCI_MODE_PLAY = MCI_STRING_OFFSET + 14
1600Const MCI_MODE_RECORD = MCI_STRING_OFFSET + 15
1601Const MCI_MODE_SEEK = MCI_STRING_OFFSET + 16
1602Const MCI_MODE_PAUSE = MCI_STRING_OFFSET + 17
1603Const MCI_MODE_OPEN = MCI_STRING_OFFSET + 18
1604
1605Const MCI_OPEN = &H0803
1606Const MCI_CLOSE = &H0804
1607Const MCI_ESCAPE = &H0805
1608Const MCI_PLAY = &H0806
1609Const MCI_SEEK = &H0807
1610Const MCI_STOP = &H0808
1611Const MCI_PAUSE = &H0809
1612Const MCI_INFO = &H080A
1613Const MCI_GETDEVCAPS = &H080B
1614Const MCI_SPIN = &H080C
1615Const MCI_SET = &H080D
1616Const MCI_STEP = &H080E
1617Const MCI_RECORD = &H080F
1618Const MCI_SYSINFO = &H0810
1619Const MCI_BREAK = &H0811
1620Const MCI_SAVE = &H0813
1621Const MCI_STATUS = &H0814
1622Const MCI_CUE = &H0830
1623Const MCI_REALIZE = &H0840
1624Const MCI_WINDOW = &H0841
1625Const MCI_PUT = &H0842
1626Const MCI_WHERE = &H0843
1627Const MCI_FREEZE = &H0844
1628Const MCI_UNFREEZE = &H0845
1629Const MCI_LOAD = &H0850
1630Const MCI_CUT = &H0851
1631Const MCI_COPY = &H0852
1632Const MCI_PASTE = &H0853
1633Const MCI_UPDATE = &H0854
1634Const MCI_RESUME = &H0855
1635Const MCI_DELETE = &H0856
1636Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (dwMciID As DWord, uMsg As DWord, fdwCommand As DWord, ByRef lpParam As Any) As DWord
1637
1638Const MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1
1639Const MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3
1640Const MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5
1641Const MCIERR_HARDWARE = MCIERR_BASE + 6
1642Const MCIERR_INVALID_DEVICE_NAME = MCIERR_BASE + 7
1643Const MCIERR_OUT_OF_MEMORY = MCIERR_BASE + 8
1644Const MCIERR_DEVICE_OPEN = MCIERR_BASE + 9
1645Const MCIERR_CANNOT_LOAD_DRIVER = MCIERR_BASE + 10
1646Const MCIERR_MISSING_COMMAND_STRING = MCIERR_BASE + 11
1647Const MCIERR_PARAM_OVERFLOW = MCIERR_BASE + 12
1648Const MCIERR_MISSING_STRING_ARGUMENT = MCIERR_BASE + 13
1649Const MCIERR_BAD_INTEGER = MCIERR_BASE + 14
1650Const MCIERR_PARSER_INTERNAL = MCIERR_BASE + 15
1651Const MCIERR_DRIVER_INTERNAL = MCIERR_BASE + 16
1652Const MCIERR_MISSING_PARAMETER = MCIERR_BASE + 17
1653Const MCIERR_UNSUPPORTED_FUNCTION = MCIERR_BASE + 18
1654Const MCIERR_FILE_NOT_FOUND = MCIERR_BASE + 19
1655Const MCIERR_DEVICE_NOT_READY = MCIERR_BASE + 20
1656Const MCIERR_INTERNAL = MCIERR_BASE + 21
1657Const MCIERR_DRIVER = MCIERR_BASE + 22
1658Const MCIERR_CANNOT_USE_ALL = MCIERR_BASE + 23
1659Const MCIERR_MULTIPLE = MCIERR_BASE + 24
1660Const MCIERR_EXTENSION_NOT_FOUND = MCIERR_BASE + 25
1661Const MCIERR_OUTOFRANGE = MCIERR_BASE + 26
1662Const MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28
1663Const MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30
1664Const MCIERR_DEVICE_TYPE_REQUIRED = MCIERR_BASE + 31
1665Const MCIERR_DEVICE_LOCKED = MCIERR_BASE + 32
1666Const MCIERR_DUPLICATE_ALIAS = MCIERR_BASE + 33
1667Const MCIERR_BAD_CONSTANT = MCIERR_BASE + 34
1668Const MCIERR_MUST_USE_SHAREABLE = MCIERR_BASE + 35
1669Const MCIERR_MISSING_DEVICE_NAME = MCIERR_BASE + 36
1670Const MCIERR_BAD_TIME_FORMAT = MCIERR_BASE + 37
1671Const MCIERR_NO_CLOSING_QUOTE = MCIERR_BASE + 38
1672Const MCIERR_DUPLICATE_FLAGS = MCIERR_BASE + 39
1673Const MCIERR_INVALID_FILE = MCIERR_BASE + 40
1674Const MCIERR_NULL_PARAMETER_BLOCK = MCIERR_BASE + 41
1675Const MCIERR_UNNAMED_RESOURCE = MCIERR_BASE + 42
1676Const MCIERR_NEW_REQUIRES_ALIAS = MCIERR_BASE + 43
1677Const MCIERR_NOTIFY_ON_AUTO_OPEN = MCIERR_BASE + 44
1678Const MCIERR_NO_ELEMENT_ALLOWED = MCIERR_BASE + 45
1679Const MCIERR_NONAPPLICABLE_FUNCTION = MCIERR_BASE + 46
1680Const MCIERR_ILLEGAL_FOR_AUTO_OPEN = MCIERR_BASE + 47
1681Const MCIERR_FILENAME_REQUIRED = MCIERR_BASE + 48
1682Const MCIERR_EXTRA_CHARACTERS = MCIERR_BASE + 49
1683Const MCIERR_DEVICE_NOT_INSTALLED = MCIERR_BASE + 50
1684Const MCIERR_GET_CD = MCIERR_BASE + 51
1685Const MCIERR_SET_CD = MCIERR_BASE + 52
1686Const MCIERR_SET_DRIVE = MCIERR_BASE + 53
1687Const MCIERR_DEVICE_LENGTH = MCIERR_BASE + 54
1688Const MCIERR_DEVICE_ORD_LENGTH = MCIERR_BASE + 55
1689Const MCIERR_NO_INTEGER = MCIERR_BASE + 56
1690Const MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64
1691Const MCIERR_WAVE_SETOUTPUTINUSE = MCIERR_BASE + 65
1692Const MCIERR_WAVE_INPUTSINUSE = MCIERR_BASE + 66
1693Const MCIERR_WAVE_SETINPUTINUSE = MCIERR_BASE + 67
1694Const MCIERR_WAVE_OUTPUTUNSPECIFIED = MCIERR_BASE + 68
1695Const MCIERR_WAVE_INPUTUNSPECIFIED = MCIERR_BASE + 69
1696Const MCIERR_WAVE_OUTPUTSUNSUITABLE = MCIERR_BASE + 70
1697Const MCIERR_WAVE_SETOUTPUTUNSUITABLE = MCIERR_BASE + 71
1698Const MCIERR_WAVE_INPUTSUNSUITABLE = MCIERR_BASE + 72
1699Const MCIERR_WAVE_SETINPUTUNSUITABLE = MCIERR_BASE + 73
1700Const MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80
1701Const MCIERR_SEQ_PORT_INUSE = MCIERR_BASE + 81
1702Const MCIERR_SEQ_PORT_NONEXISTENT = MCIERR_BASE + 82
1703Const MCIERR_SEQ_PORT_MAPNODEVICE = MCIERR_BASE + 83
1704Const MCIERR_SEQ_PORT_MISCERROR = MCIERR_BASE + 84
1705Const MCIERR_SEQ_TIMER = MCIERR_BASE + 85
1706Const MCIERR_SEQ_PORTUNSPECIFIED = MCIERR_BASE + 86
1707Const MCIERR_SEQ_NOMIDIPRESENT = MCIERR_BASE + 87
1708Const MCIERR_NO_WINDOW = MCIERR_BASE + 90
1709Const MCIERR_CREATEWINDOW = MCIERR_BASE + 91
1710Const MCIERR_FILE_READ = MCIERR_BASE + 92
1711Const MCIERR_FILE_WRITE = MCIERR_BASE + 93
1712Const MCIERR_NO_IDENTITY = MCIERR_BASE + 94
1713Const MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256
1714Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As DWord, pszText As PSTR, cchText As Long) As BOOL
1715
1716
1717#endif '_INC_MMSYS
Note: See TracBrowser for help on using the repository browser.