' api_mmsys.sbp ' Include file for Multimedia API's #ifndef _INC_MMSYS #define _INC_MMSYS ' general constants Const MAXPNAMELEN = 32 Const MAXERRORLENGTH = 256 Const MAX_JOYSTICKOEMVXDNAME = 260 Const MM_MIDI_MAPPER = 1 Const MM_WAVE_MAPPER = 2 Const MM_SNDBLST_MIDIOUT = 3 Const MM_SNDBLST_MIDIIN = 4 Const MM_SNDBLST_SYNTH = 5 Const MM_SNDBLST_WAVEOUT = 6 Const MM_SNDBLST_WAVEIN = 7 Const MM_ADLIB = 9 Const MM_MPU401_MIDIOUT = 10 Const MM_MPU401_MIDIIN = 11 Const MM_PC_JOYSTICK = 12 ' general data types TypeDef MMVERSION = DWord TypeDef VERSION = DWord TypeDef MMRESULT = DWord ' MMTIME data structure Type Smpte hour As Byte min As Byte sec As Byte frame As Byte fps As Byte dummy As Byte pad[ELM(2)] As Byte End Type Type Midi songptrpos As DWord End Type Type MMTIME Public wType As DWord u As DWord /* union ms As DWord sample As DWord cb As DWord ticks As DWord smpte As Smpte midi As Midi */ End Type TypeDef PMMTIME = *MMTIME TypeDef LPMMTIME = *MMTIME Const 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) ' types for wType field in MMTIME struct Const TIME_MS = &H0001 Const TIME_SAMPLES = &H0002 Const TIME_BYTES = &H0004 Const TIME_SMPTE = &H0008 Const TIME_MIDI = &H0010 Const TIME_TICKS = &H0020 '---------------------------------------- ' Multimedia Extensions Window Messages Const MM_JOY1MOVE = &H3A0 'joystick Const MM_JOY2MOVE = &H3A1 Const MM_JOY1ZMOVE = &H3A2 Const MM_JOY2ZMOVE = &H3A3 Const MM_JOY1BUTTONDOWN = &H3B5 Const MM_JOY2BUTTONDOWN = &H3B6 Const MM_JOY1BUTTONUP = &H3B7 Const MM_JOY2BUTTONUP = &H3B8 Const MM_MCINOTIFY = &H3B9 'MCI Const MCI_NOTIFY_SUCCESSFUL = &H0001 Const MCI_NOTIFY_SUPERSEDED = &H0002 Const MCI_NOTIFY_ABORTED = &H0004 Const MCI_NOTIFY_FAILURE = &H0008 Const MM_WOM_OPEN = &H3BB 'waveform output Const MM_WOM_CLOSE = &H3BC Const MM_WOM_DONE = &H3BD Const MM_WIM_OPEN = &H3BE 'waveform input Const MM_WIM_CLOSE = &H3BF Const MM_WIM_DATA = &H3C0 Const MM_MIM_OPEN = &H3C1 'MIDI input Const MM_MIM_CLOSE = &H3C2 Const MM_MIM_DATA = &H3C3 Const MM_MIM_LONGDATA = &H3C4 Const MM_MIM_ERROR = &H3C5 Const MM_MIM_LONGERROR = &H3C6 Const MM_MOM_OPEN = &H3C7 'MIDI output Const MM_MOM_CLOSE = &H3C8 Const MM_MOM_DONE = &H3C9 Const MM_DRVM_OPEN = &H3D0 'installable drivers Const MM_DRVM_CLOSE = &H3D1 Const MM_DRVM_DATA = &H3D2 Const MM_DRVM_ERROR = &H3D3 Const MM_STREAM_OPEN = &H3D4 Const MM_STREAM_CLOSE = &H3D5 Const MM_STREAM_DONE = &H3D6 Const MM_STREAM_ERROR = &H3D7 Const MM_MOM_POSITIONCB = &H3CA Const MM_MCISIGNAL = &H3CB Const MM_MIM_MOREDATA = &H3CC 'MIM_DONE w/ pending events Const MM_MIXM_LINE_CHANGE = &H3D0 'mixer line change notify Const MM_MIXM_CONTROL_CHANGE =&H3D1 'mixer control change notify '---------------------------------------------- ' String resource number bases (internal use) Const MMSYSERR_BASE = 0 Const WAVERR_BASE = 32 Const MIDIERR_BASE = 64 Const TIMERR_BASE = 96 Const JOYERR_BASE = 160 Const MCIERR_BASE = 256 Const MIXERR_BASE = 1024 Const MCI_STRING_OFFSET = 512 Const MCI_VD_OFFSET = 1024 Const MCI_CD_OFFSET = 1088 Const MCI_WAVE_OFFSET = 1152 Const MCI_SEQ_OFFSET = 1216 '---------------------------------------------- ' General error return values Const MMSYSERR_NOERROR = 0 'no error Const MMSYSERR_ERROR = (MMSYSERR_BASE + 1) 'unspecified error Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2) 'device ID out of range Const MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3) 'driver failed enable Const MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4) 'device already allocated Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5) 'device handle is invalid Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6) 'no device driver present Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7) 'memory allocation error Const MMSYSERR_NOTSUPPORTED= (MMSYSERR_BASE + 8) 'function isn't supported Const MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9) 'error value out of range Const MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10) 'invalid flag passed Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) 'invalid parameter passed Const MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12) 'handle being used Const MMSYSERR_INVALIDALIAS= (MMSYSERR_BASE + 13) 'specified alias not found Const MMSYSERR_BADDB = (MMSYSERR_BASE + 14) 'bad registry database Const MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15) 'registry key not found Const MMSYSERR_READERROR = (MMSYSERR_BASE + 16) 'registry read error Const MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17) 'registry write error Const MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18) 'registry delete error Const MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19) 'registry value not found Const MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20) 'driver does not call DriverCallback Const MMSYSERR_LASTERROR = (MMSYSERR_BASE + 20) 'last error in range '-------------------------------------------------------- ' Installable driver support Type _System_DeclareHandle_HDRVR:unused As DWord:End Type TypeDef HDRVR = *_System_DeclareHandle_HDRVR Type DRVCONFIGINFOEX dwDCISize As DWord lpszDCISectionName As LPCWSTR lpszDCIAliasName As LPCWSTR dnDevNode As DWORD End Type TypeDef PDRVCONFIGINFOEX = *DRVCONFIGINFOEX TypeDef LPDRVCONFIGINFOEX = *DRVCONFIGINFOEX ' Driver messages Const DRV_LOAD = &H0001 Const DRV_ENABLE = &H0002 Const DRV_OPEN = &H0003 Const DRV_CLOSE = &H0004 Const DRV_DISABLE = &H0005 Const DRV_FREE = &H0006 Const DRV_CONFIGURE = &H0007 Const DRV_QUERYCONFIGURE = &H0008 Const DRV_INSTALL = &H0009 Const DRV_REMOVE = &H000A Const DRV_EXITSESSION = &H000B Const DRV_POWER = &H000F Const DRV_RESERVED = &H0800 Const DRV_USER = &H4000 Type DRVCONFIGINFO dwDCISize As DWord lpszDCISectionName As LPCWSTR lpszDCIAliasName As LPCWSTR End Type TypeDef PDRVCONFIGINFO = *DRVCONFIGINFO TypeDef LPDRVCONFIGINFO = *DRVCONFIGINFO ' Supported return values for DRV_CONFIGURE message Const DRVCNF_CANCEL = &H0000 Const DRVCNF_OK = &H0001 Const DRVCNF_RESTART = &H0002 TypeDef DRIVERPROC = *Function(dwDriverId As DWord, hdrvr As HDRVR, msg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT Declare Function CloseDriver Lib "winmm" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT Declare Function OpenDriver Lib "winmm" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR Declare Function SendDriverMessage Lib "winmm" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT Declare Function GetDriverModuleHandle Lib "winmm" (hDriver As HDRVR) As HMODULE Declare Function DefDriverProc Lib "winmm" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT Declare Function DrvClose Lib "winmm" Alias "CloseDriver" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT Declare Function DrvOpen Lib "winmm" Alias "OpenDriver" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR Declare Function DrvSendMessage Lib "winmm" Alias "SendDriverMessage" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT Declare Function DrvGetModuleHandle Lib "winmm" Alias "GetDriverModuleHandle" (hDriver As HDRVR) As HMODULE Declare Function DrvDefDriverProc Lib "winmm" Alias "DefDriverProc" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT ' return values from DriverProc() function Const DRV_CANCEL = DRVCNF_CANCEL Const DRV_OK = DRVCNF_OK Const DRV_RESTART = DRVCNF_RESTART Const DRV_MCI_FIRST = DRV_RESERVED Const DRV_MCI_LAST = (DRV_RESERVED + &HFFF) '-------------------------------------------------------- ' Driver callback support Const CALLBACK_TYPEMASK = &H00070000 'callback type mask Const CALLBACK_NULL = &H00000000 'no callback Const CALLBACK_WINDOW = &H00010000 'dwCallback is a HWND Const CALLBACK_TASK = &H00020000 'dwCallback is a HTASK Const CALLBACK_FUNCTION = &H00030000 'dwCallback is a FARPROC Const CALLBACK_THREAD = (CALLBACK_TASK)'thread ID replaces 16 bit task Const CALLBACK_EVENT = &H00050000 'dwCallback is an EVENT Handle TypeDef DRVCALLBACK = *Sub(hdrvr As HDRVR, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord) TypeDef PDRVCALLBACK = *DRVCALLBACK TypeDef LPDRVCALLBACK = *DRVCALLBACK '-------------------------------------------------------- ' General MMSYSTEM support Declare Function mmsystemGetVersion Lib "winmm" () As DWord '-------------------------------------------------------- ' Sound support Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL Const SND_SYNC = &H0000 Const SND_ASYNC = &H0001 Const SND_NODEFAULT = &H0002 Const SND_MEMORY = &H0004 Const SND_LOOP = &H0008 Const SND_NOSTOP = &H0010 Const SND_NOWAIT = &H00002000 Const SND_ALIAS = &H00010000 Const SND_ALIAS_ID = &H00110000 Const SND_FILENAME = &H00020000 Const SND_RESOURCE = &H00040004 Const SND_PURGE = &H0040 Const SND_APPLICATION = &H0080 Const SND_ALIAS_START = 0 Const sndAlias(ch0, ch1) = (SND_ALIAS_START + ((&HFF AND ch0) OR (&HFF AND ch1)<<8)) Const SND_ALIAS_SYSTEMASTERISK = sndAlias(&H53, &H2A) Const SND_ALIAS_SYSTEMQUESTION = sndAlias(&H53, &H3F) Const SND_ALIAS_SYSTEMHAND = sndAlias(&H53, &H48) Const SND_ALIAS_SYSTEMEXIT = sndAlias(&H53, &H45) Const SND_ALIAS_SYSTEMSTART = sndAlias(&H53, &H53) Const SND_ALIAS_SYSTEMWELCOME = sndAlias(&H53, &H57) Const SND_ALIAS_SYSTEMEXCLAMATION = sndAlias(&H53, &H21) Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44) Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL '-------------------------------------------------------- ' Waveform audio support ' waveform audio error return values Const WAVERR_BADFORMAT = (WAVERR_BASE + 0) Const WAVERR_STILLPLAYING = (WAVERR_BASE + 1) Const WAVERR_UNPREPARED = (WAVERR_BASE + 2) Const WAVERR_SYNC = (WAVERR_BASE + 3) Const WAVERR_LASTERROR = (WAVERR_BASE + 3) ' waveform audio data types Type _System_DeclareHandle_HWAVE:unused As DWord:End Type TypeDef HWAVE = *_System_DeclareHandle_HWAVE Type _System_DeclareHandle_HWAVEIN:unused As DWord:End Type TypeDef HWAVEIN = *_System_DeclareHandle_HWAVEIN Type _System_DeclareHandle_HWAVEOUT:unused As DWord:End Type TypeDef HWAVEOUT = *_System_DeclareHandle_HWAVEOUT TypeDef WAVECALLBACK = DRVCALLBACK TypeDef LPWAVECALLBACK = *WAVECALLBACK ' wave callback messages Const WOM_OPEN = MM_WOM_OPEN Const WOM_CLOSE = MM_WOM_CLOSE Const WOM_DONE = MM_WOM_DONE Const WIM_OPEN = MM_WIM_OPEN Const WIM_CLOSE = MM_WIM_CLOSE Const WIM_DATA = MM_WIM_DATA ' device ID for wave device mapper Const WAVE_MAPPER = (-1) ' flags for dwFlags parameter in waveOutOpen() and waveInOpen() Const WAVE_FORMAT_QUERY = &H0001 Const WAVE_ALLOWSYNC = &H0002 Const WAVE_MAPPED = &H0004 Const WAVE_FORMAT_DIRECT = &H0008 Const WAVE_FORMAT_DIRECT_QUERY = (WAVE_FORMAT_QUERY OR WAVE_FORMAT_DIRECT) ' wave data block header Type WAVEHDR lpData As LPSTR dwBufferLength As DWord dwBytesRecorded As DWord dwUser As DWord dwFlags As DWord dwLoops As DWord lpNext As *WAVEHDR reserved As DWord End Type TypeDef PWAVEHDR = *WAVEHDR TypeDef LPWAVEHDR = *WAVEHDR ' flags for dwFlags field of WAVEHDR Const WHDR_DONE = &H00000001 Const WHDR_PREPARED = &H00000002 Const WHDR_BEGINLOOP = &H00000004 Const WHDR_ENDLOOP = &H00000008 Const WHDR_INQUEUE = &H00000010 ' waveform output device capabilities structure Type WAVEOUTCAPSA wMid As Word wPid As Word vDriverVersion As MMVERSION szPname[ELM(MAXPNAMELEN)] As Char dwFormats As DWord wChannels As Word wReserved1 As Word dwSupport As DWord End Type TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA TypeDef WAVEOUTCAPS = WAVEOUTCAPSA TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA ' flags for dwSupport field of WAVEOUTCAPS Const WAVECAPS_PITCH = &H0001 Const WAVECAPS_PLAYBACKRATE = &H0002 Const WAVECAPS_VOLUME = &H0004 Const WAVECAPS_LRVOLUME = &H0008 Const WAVECAPS_SYNC = &H0010 Const WAVECAPS_SAMPLEACCURATE = &H0020 Const WAVECAPS_DIRECTSOUND = &H0040 ' waveform input device capabilities structure Type WAVEINCAPSA wMid As Word wPid As Word vDriverVersion As MMVERSION szPname[ELM(MAXPNAMELEN)] As Char dwFormats As DWord wChannels As Word wReserved1 As Word End Type TypeDef PWAVEINCAPSA = *WAVEINCAPSA TypeDef LPWAVEINCAPSA = *WAVEINCAPSA TypeDef WAVEINCAPS = WAVEINCAPSA TypeDef PWAVEINCAPS = PWAVEINCAPSA TypeDef LPWAVEINCAPS = LPWAVEINCAPSA ' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS Const WAVE_INVALIDFORMAT = &H00000000 ' invalid format Const WAVE_FORMAT_1M08 = &H00000001 ' 11.025 kHz, Mono, 8-bit Const WAVE_FORMAT_1S08 = &H00000002 ' 11.025 kHz, Stereo, 8-bit Const WAVE_FORMAT_1M16 = &H00000004 ' 11.025 kHz, Mono, 16-bit Const WAVE_FORMAT_1S16 = &H00000008 ' 11.025 kHz, Stereo, 16-bit Const WAVE_FORMAT_2M08 = &H00000010 ' 22.05 kHz, Mono, 8-bit Const WAVE_FORMAT_2S08 = &H00000020 ' 22.05 kHz, Stereo, 8-bit Const WAVE_FORMAT_2M16 = &H00000040 ' 22.05 kHz, Mono, 16-bit Const WAVE_FORMAT_2S16 = &H00000080 ' 22.05 kHz, Stereo, 16-bit Const WAVE_FORMAT_4M08 = &H00000100 ' 44.1 kHz, Mono, 8-bit Const WAVE_FORMAT_4S08 = &H00000200 ' 44.1 kHz, Stereo, 8-bit Const WAVE_FORMAT_4M16 = &H00000400 ' 44.1 kHz, Mono, 16-bit Const WAVE_FORMAT_4S16 = &H00000800 ' 44.1 kHz, Stereo, 16-bit ' OLD general waveform format structure (information common to all formats) Type WAVEFORMAT wFormatTag As Word nChannels As Word nSamplesPerSec As DWord nAvgBytesPerSec As DWord nBlockAlign As Word End Type TypeDef PWAVEFORMAT = *WAVEFORMAT TypeDef LPWAVEFORMAT = *WAVEFORMAT ' flags for wFormatTag field of WAVEFORMAT Const WAVE_FORMAT_PCM = 1 ' specific waveform format structure for PCM data Type PCMWAVEFORMAT wf As WAVEFORMAT wBitsPerSample As Word End Type TypeDef PPCMWAVEFORMAT = *PCMWAVEFORMAT TypeDef LPPCMWAVEFORMAT = *PCMWAVEFORMAT Type WAVEFORMATEX wFormatTag As Word nChannels As Word nSamplesPerSec As DWord nAvgBytesPerSec As DWord nBlockAlign As Word wBitsPerSample As Word cbSize As Word End Type TypeDef PWAVEFORMATEX = *WAVEFORMATEX TypeDef LPWAVEFORMATEX = *WAVEFORMATEX TypeDef LPCWAVEFORMATEX = *WAVEFORMATEX ' waveform audio function prototypes Declare Function waveOutGetNumDevs Lib "winmm" () As DWord Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT Declare 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 Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT Declare Function waveOutPrepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveOutUnprepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveOutWrite Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveOutPause Lib "winmm" (hwo As HWAVEOUT) As MMRESULT Declare Function waveOutRestart Lib "winmm" (hwo As HWAVEOUT) As MMRESULT Declare Function waveOutReset Lib "winmm" (hwo As HWAVEOUT) As MMRESULT Declare Function waveOutBreakLoop Lib "winmm" (hwo As HWAVEOUT) As MMRESULT Declare Function waveOutGetPosition Lib "winmm" (hwo As HWAVEOUT, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT Declare Function waveOutGetPitch Lib "winmm" (hwo As HWAVEOUT, ByRef pdwPitch As DWord) As MMRESULT Declare Function waveOutSetPitch Lib "winmm" (hwo As HWAVEOUT, dwPitch As DWord) As MMRESULT Declare Function waveOutGetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, ByRef pdwRate As DWord) As MMRESULT Declare Function waveOutSetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, dwRate As DWord) As MMRESULT Declare Function waveOutGetID Lib "winmm" (hwo As HWAVEOUT, ByRef puDeviceID As DWord) As MMRESULT Declare Function waveOutMessage Lib "winmm" (hwo As HWAVEOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT Declare Function waveInGetNumDevs Lib "winmm" () As DWord Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT Declare 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 Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT Declare Function waveInPrepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveInUnprepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveInAddBuffer Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT Declare Function waveInStart Lib "winmm" (hwi As HWAVEIN) As MMRESULT Declare Function waveInStop Lib "winmm" (hwi As HWAVEIN) As MMRESULT Declare Function waveInReset Lib "winmm" (hwi As HWAVEIN) As MMRESULT Declare Function waveInGetPosition Lib "winmm" (hwi As HWAVEIN, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT Declare Function waveInGetID Lib "winmm" (hwi As HWAVEIN, ByRef puDeviceID As DWord) As MMRESULT Declare Function waveInMessage Lib "winmm" (hwi As HWAVEIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT '-------------------------------------------------------- ' MIDI audio support ' MIDI error return values Const MIDIERR_UNPREPARED = (MIDIERR_BASE + 0) Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1) Const MIDIERR_NOMAP = (MIDIERR_BASE + 2) Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3) Const MIDIERR_NODEVICE = (MIDIERR_BASE + 4) Const MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5) Const MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6) Const MIDIERR_DONT_CONTINUE = (MIDIERR_BASE + 7) Const MIDIERR_LASTERROR = (MIDIERR_BASE + 7) ' MIDI audio data types Type _System_DeclareHandle_HMIDI:unused As DWord:End Type TypeDef HMIDI = *_System_DeclareHandle_HMIDI Type _System_DeclareHandle_HMIDIIN:unused As DWord:End Type TypeDef HMIDIIN = *_System_DeclareHandle_HMIDIIN Type _System_DeclareHandle_HMIDIOUT:unused As DWord:End Type TypeDef HMIDIOUT = *_System_DeclareHandle_HMIDIOUT Type _System_DeclareHandle_HMIDISTRM:unused As DWord:End Type TypeDef HMIDISTRM = *_System_DeclareHandle_HMIDISTRM TypeDef MIDICALLBACK = DRVCALLBACK TypeDef LPMIDICALLBACK = *MIDICALLBACK Const MIDIPATCHSIZE = 128 TypeDef LPPATCHARRAY = *Word TypeDef LPKEYARRAY = *Word ' MIDI callback messages Const MIM_OPEN = MM_MIM_OPEN Const MIM_CLOSE = MM_MIM_CLOSE Const MIM_DATA = MM_MIM_DATA Const MIM_LONGDATA = MM_MIM_LONGDATA Const MIM_ERROR = MM_MIM_ERROR Const MIM_LONGERROR = MM_MIM_LONGERROR Const MOM_OPEN = MM_MOM_OPEN Const MOM_CLOSE = MM_MOM_CLOSE Const MOM_DONE = MM_MOM_DONE Const MIM_MOREDATA = MM_MIM_MOREDATA Const MOM_POSITIONCB = MM_MOM_POSITIONCB ' device ID for MIDI mapper Const MIDIMAPPER = (-1) Const MIDI_MAPPER = (-1) Const MIDI_IO_STATUS = &H00000020 ' flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() Const MIDI_CACHE_ALL = 1 Const MIDI_CACHE_BESTFIT = 2 Const MIDI_CACHE_QUERY = 3 Const MIDI_UNCACHE = 4 ' MIDI output device capabilities structure Type MIDIOUTCAPSA wMid As Word wPid As Word vDriverVersion As MMVERSION szPname[ELM(MAXPNAMELEN)] As Char wTechnology As Word wVoices As Word wNotes As Word wChannelMask As Word dwSupport As DWord End Type TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA TypeDef MIDIOUTCAPS = MIDIOUTCAPSA TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA ' flags for wTechnology field of MIDIOUTCAPS structure Const MOD_MIDIPORT = 1 Const MOD_SYNTH = 2 Const MOD_SQSYNTH = 3 Const MOD_FMSYNTH = 4 Const MOD_MAPPER = 5 ' flags for dwSupport field of MIDIOUTCAPS structure Const MIDICAPS_VOLUME = &H0001 Const MIDICAPS_LRVOLUME = &H0002 Const MIDICAPS_CACHE = &H0004 Const MIDICAPS_STREAM = &H0008 ' MIDI input device capabilities structure Type MIDIINCAPSA wMid As Word wPid As Word vDriverVersion As MMVERSION szPname[ELM(MAXPNAMELEN)] As Char dwSupport As DWord End Type TypeDef PMIDIINCAPSA = *MIDIINCAPSA TypeDef LPMIDIINCAPSA = *MIDIINCAPSA TypeDef MIDIINCAPS = MIDIINCAPSA TypeDef PMIDIINCAPS = PMIDIINCAPSA TypeDef LPMIDIINCAPS = LPMIDIINCAPSA ' MIDI data block header Type MIDIHDR lpData As LPSTR dwBufferLength As DWord dwBytesRecorded As DWord dwUser As DWord dwFlags As DWord lpNext As *MIDIHDR reserved As DWord dwOffset As DWord dwReserved[ELM(8)] As DWord End Type TypeDef PMIDIHDR = *MIDIHDR TypeDef LPMIDIHDR = *MIDIHDR Type MIDIEVENT dwDeltaTime As DWord dwStreamID As DWord dwEvent As DWord dwParms[ELM(1)] As DWord End Type Type MIDISTRMBUFFVER dwVersion As DWord dwMid As DWord dwOEMVersion As DWord End Type ' flags for dwFlags field of MIDIHDR structure Const MHDR_DONE = &H00000001 Const MHDR_PREPARED = &H00000002 Const MHDR_INQUEUE = &H00000004 Const MHDR_ISSTRM = &H00000008 Const MEVT_F_SHORT = &H00000000 Const MEVT_F_LONG = &H80000000 Const MEVT_F_CALLBACK = &H40000000 Const MEVT_EVENTTYPE(x) = ((x>>24) AND &HFF) Const MEVT_EVENTPARM(x) = (x AND &H00FFFFFF) Const MEVT_SHORTMSG = (&H00) Const MEVT_TEMPO = (&H01) Const MEVT_NOP = (&H02) Const MEVT_LONGMSG = (&H80) Const MEVT_COMMENT = (&H82) Const MEVT_VERSION = (&H84) Const MIDISTRM_ERROR = (-2) ' Structures and defines for midiStreamProperty Const MIDIPROP_SET = &H80000000 Const MIDIPROP_GET = &H40000000 Const MIDIPROP_TIMEDIV = &H00000001 Const MIDIPROP_TEMPO = &H00000002 Type MIDIPROPTIMEDIV cbStruct As DWord dwTimeDiv As DWord End Type TypeDef LPMIDIPROPTIMEDIV = *MIDIPROPTIMEDIV Type MIDIPROPTEMPO cbStruct As DWord dwTempo As DWord End Type TypeDef LPMIDIPROPTEMPO = *MIDIPROPTEMPO ' MIDI function prototypes Declare Function midiOutGetNumDevs Lib "winmm" () As DWord Declare 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 Declare Function midiStreamClose Lib "winmm" (hms As HMIDISTRM) As MMRESULT Declare Function midiStreamProperty Lib "winmm" (hms As HMIDISTRM, lppropdata As *Byte, dwProperty As DWord) As MMRESULT Declare Function midiStreamPosition Lib "winmm" (hms As HMIDISTRM, ByRef lpmmt As MMTIME, cbmmt As DWord) As MMRESULT Declare Function midiStreamOut Lib "winmm" (hms As HMIDISTRM, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiStreamPause Lib "winmm" (hms As HMIDISTRM) As MMRESULT Declare Function midiStreamRestart Lib "winmm" (hms As HMIDISTRM) As MMRESULT Declare Function midiStreamStop Lib "winmm" (hms As HMIDISTRM) As MMRESULT Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT Declare Function midiOutPrepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiOutUnprepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiOutShortMsg Lib "winmm" (hmo As HMIDIOUT, dwMsg As DWord) As MMRESULT Declare Function midiOutLongMsg Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiOutReset Lib "winmm" (hmo As HMIDIOUT) As MMRESULT Declare Function midiOutCachePatches Lib "winmm" (hmo As HMIDIOUT, uBank As DWord, ByRef pwpa As Word, fuCache As DWord) As MMRESULT Declare Function midiOutCacheDrumPatches Lib "winmm" (hmo As HMIDIOUT, uPatch As DWord, ByRef pwkya As Word, fuCache As DWord) As MMRESULT Declare Function midiOutGetID Lib "winmm" (hmo As HMIDIOUT, ByRef puDeviceID As DWord) As MMRESULT Declare Function midiOutMessage Lib "winmm" (hmo As HMIDIOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT Declare Function midiInGetNumDevs Lib "winmm" () As DWord Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT Declare Function midiInPrepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiInUnprepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiInAddBuffer Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT Declare Function midiInStart Lib "winmm" (hmi As HMIDIIN) As MMRESULT Declare Function midiInStop Lib "winmm" (hmi As HMIDIIN) As MMRESULT Declare Function midiInReset Lib "winmm" (hmi As HMIDIIN) As MMRESULT Declare Function midiInGetID Lib "winmm" (hmi As HMIDIIN, ByRef puDeviceID As DWord) As MMRESULT Declare Function midiInMessage Lib "winmm" (hmi As HMIDIIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT '-------------------------------------------------------- ' Time Format(used in MCI_SET_PARAMS, MCI_STATUS_PARAMS) Const MCI_FORMAT_MILLISECONDS = 0 Const MCI_FORMAT_HMS = 1 Const MCI_FORMAT_MSF = 2 Const MCI_FORMAT_FRAMES = 3 Const MCI_FORMAT_SMPTE_24 = 4 Const MCI_FORMAT_SMPTE_25 = 5 Const MCI_FORMAT_SMPTE_30 = 6 Const MCI_FORMAT_SMPTE_30DROP = 7 Const MCI_FORMAT_BYTES = 8 Const MCI_FORMAT_SAMPLES = 9 Const MCI_FORMAT_TMSF = 10 '-------------- ' Types of MCI '-------------- Type MCI_OPEN_PARMS dwCallback As DWord wDeviceID As DWord lpstrDeviceType As BytePtr lpstrElementName As BytePtr lpstrAlias As BytePtr End Type Type MCI_PLAY_PARMS dwCallback As DWord dwFrom As DWord dwTo As DWord End Type Type MCI_SEEK_PARMS dwCallback As DWord dwTo As DWord End Type Type MCI_SET_PARMS dwCallback As DWord dwTimeFormat As DWord dwAudio As DWord End Type Const MCI_STATUS_LENGTH = &H00000001 Const MCI_STATUS_POSITION = &H00000002 Const MCI_STATUS_NUMBER_OF_TRACKS = &H00000003 Const MCI_STATUS_MODE = &H00000004 Const MCI_STATUS_MEDIA_PRESENT = &H00000005 Const MCI_STATUS_TIME_FORMAT = &H00000006 Const MCI_STATUS_READY = &H00000007 Const MCI_STATUS_CURRENT_TRACK = &H00000008 Type MCI_STATUS_PARMS dwCallback As DWord dwReturn As DWord dwItem As DWord dwTrack As DWord End Type '------------ ' MCI Macros Function MCI_MAKE_TMSF(tracks As Byte, minutes As Byte, seconds As Byte, frames As Byte) As DWord MCI_MAKE_TMSF=MAKELONG(MAKEWORD(tracks,minutes),MAKEWORD(seconds,frames)) End Function Function MCI_MSF_MINUTE(dwMFS As DWord) As Byte MCI_MSF_MINUTE=LOBYTE(LOWORD(dwMFS)) End Function Function MCI_MSF_SECOND(dwMFS As DWord) As Byte MCI_MSF_SECOND=HIBYTE(LOWORD(dwMFS)) End Function '--------------- ' MCI Functions ' common flags for dwFlags parameter of MCI command messages Const MCI_NOTIFY = &H00000001 Const MCI_WAIT = &H00000002 Const MCI_FROM = &H00000004 Const MCI_TO = &H00000008 Const MCI_TRACK = &H00000010 ' flags for dwFlags parameter of MCI_OPEN command message Const MCI_OPEN_SHAREABLE = &H00000100 Const MCI_OPEN_ELEMENT = &H00000200 Const MCI_OPEN_ALIAS = &H00000400 Const MCI_OPEN_ELEMENT_ID = &H00000800 Const MCI_OPEN_TYPE_ID = &H00001000 Const MCI_OPEN_TYPE = &H00002000 Const MCI_ANIM_OPEN_WS = &H00010000 Const MCI_ANIM_OPEN_PARENT = &H00020000 Const MCI_ANIM_OPEN_NOSTATIC = &H00040000 Const MCI_DGV_OPEN_WS = &H00010000 Const MCI_DGV_OPEN_PARENT = &H00020000 Const MCI_DGV_OPEN_NOSTATIC = &H00040000 Const MCI_DGV_OPEN_16BIT = &H00080000 Const MCI_DGV_OPEN_32BIT = &H00100000 Const MCI_OVLY_OPEN_WS = &H00010000 Const MCI_OVLY_OPEN_PARENT = &H00020000 ' flags for dwFlags parameter of MCI_PLAY command message Const MCI_ANIM_PLAY_SPEED = &H00010000 Const MCI_ANIM_PLAY_REVERSE = &H00020000 Const MCI_ANIM_PLAY_FAST = &H00040000 Const MCI_ANIM_PLAY_SLOW = &H00080000 Const MCI_ANIM_PLAY_SCAN = &H00100000 Const MCI_DGV_PLAY_REPEAT = &H00010000 Const MCI_DGV_PLAY_REVERSE = &H00020000 Const MCI_MCIAVI_PLAY_WINDOW = &H01000000 Const MCI_MCIAVI_PLAY_FULLSCREEN = &H02000000 Const MCI_VCR_PLAY_REVERSE = &H00010000 Const MCI_VCR_PLAY_AT = &H00020000 Const MCI_VCR_PLAY_SCAN = &H00040000 Const MCI_VD_PLAY_REVERSE = &H00010000 Const MCI_VD_PLAY_FAST = &H00020000 Const MCI_VD_PLAY_SPEED = &H00040000 Const MCI_VD_PLAY_SCAN = &H00080000 Const MCI_VD_PLAY_SLOW = &H00100000 ' flags for dwFlags parameter of MCI_SEEK command message Const MCI_SEEK_TO_START = &H00000100 Const MCI_SEEK_TO_END = &H00000200 Const MCI_VCR_SEEK_REVERSE = &H00010000 Const MCI_VCR_SEEK_MARK = &H00020000 Const MCI_VCR_SEEK_AT = &H00040000 Const MCI_VD_SEEK_REVERSE = &H00010000 ' flags for dwFlags parameter of MCI_SET command message Const MCI_SET_DOOR_OPEN = &H00000100 Const MCI_SET_DOOR_CLOSED = &H00000200 Const MCI_SET_TIME_FORMAT = &H00000400 Const MCI_SET_AUDIO = &H00000800 Const MCI_SET_VIDEO = &H00001000 Const MCI_SET_ON = &H00002000 Const MCI_SET_OFF = &H00004000 Const MCI_DGV_SET_SEEK_EXACTLY = &H00010000 Const MCI_DGV_SET_SPEED = &H00020000 Const MCI_DGV_SET_STILL = &H00040000 Const MCI_DGV_SET_FILEFORMAT = &H00080000 Const MCI_SEQ_FORMAT_SONGPTR = &H4001 Const MCI_SEQ_FILE = &H4002 Const MCI_SEQ_MIDI = &H4003 Const MCI_SEQ_SMPTE = &H4004 Const MCI_SEQ_NONE = 65533 Const MCI_SEQ_MAPPER = 65535 Const MCI_SEQ_SET_TEMPO = &H00010000 Const MCI_SEQ_SET_PORT = &H00020000 Const MCI_SEQ_SET_SLAVE = &H00040000 Const MCI_SEQ_SET_MASTER = &H00080000 Const MCI_SEQ_SET_OFFSET = &H01000000 Const MCI_VCR_SET_TIME_MODE = &H00010000 Const MCI_VCR_SET_POWER = &H00020000 Const MCI_VCR_SET_RECORD_FORMAT = &H00040000 Const MCI_VCR_SET_COUNTER_FORMAT = &H00080000 Const MCI_VCR_SET_INDEX = &H00100000 Const MCI_VCR_SET_ASSEMBLE_RECORD = &H00200000 Const MCI_VCR_SET_TRACKING = &H00400000 Const MCI_VCR_SET_SPEED = &H00800000 Const MCI_VCR_SET_TAPE_LENGTH = &H01000000 Const MCI_VCR_SET_COUNTER_VALUE = &H02000000 Const MCI_VCR_SET_CLOCK = &H04000000 Const MCI_VCR_SET_PAUSE_TIMEOUT = &H08000000 Const MCI_VCR_SET_PREROLL_DURATION = &H10000000 Const MCI_VCR_SET_POSTROLL_DURATION = &H20000000 Const MCI_VD_FORMAT_TRACK = &H4001 Const MCI_WAVE_SET_FORMATTAG = &H00010000 Const MCI_WAVE_SET_CHANNELS = &H00020000 Const MCI_WAVE_SET_SAMPLESPERSEC = &H00040000 Const MCI_WAVE_SET_AVGBYTESPERSEC = &H00080000 Const MCI_WAVE_SET_BLOCKALIGN = &H00100000 Const MCI_WAVE_SET_BITSPERSAMPLE = &H00200000 Const MCI_WAVE_INPUT = &H00400000 Const MCI_WAVE_OUTPUT = &H00800000 Const MCI_WAVE_SET_ANYINPUT = &H04000000 Const MCI_WAVE_SET_ANYOUTPUT = &H08000000 ' flags for dwFlags parameter of MCI_STATUS command message Const MCI_STATUS_ITEM = &H00000100 Const MCI_STATUS_START = &H00000200 Const MCI_CDA_STATUS_TYPE_TRACK = &H00004001 Const MCI_CDA_TRACK_AUDIO = MCI_CD_OFFSET+0 Const MCI_CDA_TRACK_OTHER = MCI_CD_OFFSET+1 Const MCI_DGV_STATUS_NOMINAL = &H00020000 Const MCI_DGV_STATUS_REFERENCE = &H00040000 Const MCI_DGV_STATUS_LEFT = &H00080000 Const MCI_DGV_STATUS_RIGHT = &H00100000 Const MCI_DGV_STATUS_DISKSPACE = &H00200000 Const MCI_DGV_STATUS_INPUT = &H00400000 Const MCI_DGV_STATUS_OUTPUT = &H00800000 Const MCI_DGV_STATUS_RECORD = &H01000000 ' constants for predefined MCI device types Const MCI_DEVTYPE_VCR = 513 Const MCI_DEVTYPE_VIDEODISC = 514 Const MCI_DEVTYPE_OVERLAY = 515 Const MCI_DEVTYPE_CD_AUDIO = 516 Const MCI_DEVTYPE_DAT = 517 Const MCI_DEVTYPE_SCANNER = 518 Const MCI_DEVTYPE_ANIMATION = 519 Const MCI_DEVTYPE_DIGITAL_VIDEO = 520 Const MCI_DEVTYPE_OTHER = 521 Const MCI_DEVTYPE_WAVEFORM_AUDIO = 522 Const MCI_DEVTYPE_SEQUENCER = 523 ' return values for 'status mode' command Const MCI_MODE_NOT_READY = MCI_STRING_OFFSET + 12 Const MCI_MODE_STOP = MCI_STRING_OFFSET + 13 Const MCI_MODE_PLAY = MCI_STRING_OFFSET + 14 Const MCI_MODE_RECORD = MCI_STRING_OFFSET + 15 Const MCI_MODE_SEEK = MCI_STRING_OFFSET + 16 Const MCI_MODE_PAUSE = MCI_STRING_OFFSET + 17 Const MCI_MODE_OPEN = MCI_STRING_OFFSET + 18 Const MCI_OPEN = &H0803 Const MCI_CLOSE = &H0804 Const MCI_ESCAPE = &H0805 Const MCI_PLAY = &H0806 Const MCI_SEEK = &H0807 Const MCI_STOP = &H0808 Const MCI_PAUSE = &H0809 Const MCI_INFO = &H080A Const MCI_GETDEVCAPS = &H080B Const MCI_SPIN = &H080C Const MCI_SET = &H080D Const MCI_STEP = &H080E Const MCI_RECORD = &H080F Const MCI_SYSINFO = &H0810 Const MCI_BREAK = &H0811 Const MCI_SAVE = &H0813 Const MCI_STATUS = &H0814 Const MCI_CUE = &H0830 Const MCI_REALIZE = &H0840 Const MCI_WINDOW = &H0841 Const MCI_PUT = &H0842 Const MCI_WHERE = &H0843 Const MCI_FREEZE = &H0844 Const MCI_UNFREEZE = &H0845 Const MCI_LOAD = &H0850 Const MCI_CUT = &H0851 Const MCI_COPY = &H0852 Const MCI_PASTE = &H0853 Const MCI_UPDATE = &H0854 Const MCI_RESUME = &H0855 Const MCI_DELETE = &H0856 Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (dwMciID As DWord, uMsg As DWord, fdwCommand As DWord, ByRef lpParam As Any) As DWord Const MCIERR_INVALID_DEVICE_ID = MCIERR_BASE + 1 Const MCIERR_UNRECOGNIZED_KEYWORD = MCIERR_BASE + 3 Const MCIERR_UNRECOGNIZED_COMMAND = MCIERR_BASE + 5 Const MCIERR_HARDWARE = MCIERR_BASE + 6 Const MCIERR_INVALID_DEVICE_NAME = MCIERR_BASE + 7 Const MCIERR_OUT_OF_MEMORY = MCIERR_BASE + 8 Const MCIERR_DEVICE_OPEN = MCIERR_BASE + 9 Const MCIERR_CANNOT_LOAD_DRIVER = MCIERR_BASE + 10 Const MCIERR_MISSING_COMMAND_STRING = MCIERR_BASE + 11 Const MCIERR_PARAM_OVERFLOW = MCIERR_BASE + 12 Const MCIERR_MISSING_STRING_ARGUMENT = MCIERR_BASE + 13 Const MCIERR_BAD_INTEGER = MCIERR_BASE + 14 Const MCIERR_PARSER_INTERNAL = MCIERR_BASE + 15 Const MCIERR_DRIVER_INTERNAL = MCIERR_BASE + 16 Const MCIERR_MISSING_PARAMETER = MCIERR_BASE + 17 Const MCIERR_UNSUPPORTED_FUNCTION = MCIERR_BASE + 18 Const MCIERR_FILE_NOT_FOUND = MCIERR_BASE + 19 Const MCIERR_DEVICE_NOT_READY = MCIERR_BASE + 20 Const MCIERR_INTERNAL = MCIERR_BASE + 21 Const MCIERR_DRIVER = MCIERR_BASE + 22 Const MCIERR_CANNOT_USE_ALL = MCIERR_BASE + 23 Const MCIERR_MULTIPLE = MCIERR_BASE + 24 Const MCIERR_EXTENSION_NOT_FOUND = MCIERR_BASE + 25 Const MCIERR_OUTOFRANGE = MCIERR_BASE + 26 Const MCIERR_FLAGS_NOT_COMPATIBLE = MCIERR_BASE + 28 Const MCIERR_FILE_NOT_SAVED = MCIERR_BASE + 30 Const MCIERR_DEVICE_TYPE_REQUIRED = MCIERR_BASE + 31 Const MCIERR_DEVICE_LOCKED = MCIERR_BASE + 32 Const MCIERR_DUPLICATE_ALIAS = MCIERR_BASE + 33 Const MCIERR_BAD_CONSTANT = MCIERR_BASE + 34 Const MCIERR_MUST_USE_SHAREABLE = MCIERR_BASE + 35 Const MCIERR_MISSING_DEVICE_NAME = MCIERR_BASE + 36 Const MCIERR_BAD_TIME_FORMAT = MCIERR_BASE + 37 Const MCIERR_NO_CLOSING_QUOTE = MCIERR_BASE + 38 Const MCIERR_DUPLICATE_FLAGS = MCIERR_BASE + 39 Const MCIERR_INVALID_FILE = MCIERR_BASE + 40 Const MCIERR_NULL_PARAMETER_BLOCK = MCIERR_BASE + 41 Const MCIERR_UNNAMED_RESOURCE = MCIERR_BASE + 42 Const MCIERR_NEW_REQUIRES_ALIAS = MCIERR_BASE + 43 Const MCIERR_NOTIFY_ON_AUTO_OPEN = MCIERR_BASE + 44 Const MCIERR_NO_ELEMENT_ALLOWED = MCIERR_BASE + 45 Const MCIERR_NONAPPLICABLE_FUNCTION = MCIERR_BASE + 46 Const MCIERR_ILLEGAL_FOR_AUTO_OPEN = MCIERR_BASE + 47 Const MCIERR_FILENAME_REQUIRED = MCIERR_BASE + 48 Const MCIERR_EXTRA_CHARACTERS = MCIERR_BASE + 49 Const MCIERR_DEVICE_NOT_INSTALLED = MCIERR_BASE + 50 Const MCIERR_GET_CD = MCIERR_BASE + 51 Const MCIERR_SET_CD = MCIERR_BASE + 52 Const MCIERR_SET_DRIVE = MCIERR_BASE + 53 Const MCIERR_DEVICE_LENGTH = MCIERR_BASE + 54 Const MCIERR_DEVICE_ORD_LENGTH = MCIERR_BASE + 55 Const MCIERR_NO_INTEGER = MCIERR_BASE + 56 Const MCIERR_WAVE_OUTPUTSINUSE = MCIERR_BASE + 64 Const MCIERR_WAVE_SETOUTPUTINUSE = MCIERR_BASE + 65 Const MCIERR_WAVE_INPUTSINUSE = MCIERR_BASE + 66 Const MCIERR_WAVE_SETINPUTINUSE = MCIERR_BASE + 67 Const MCIERR_WAVE_OUTPUTUNSPECIFIED = MCIERR_BASE + 68 Const MCIERR_WAVE_INPUTUNSPECIFIED = MCIERR_BASE + 69 Const MCIERR_WAVE_OUTPUTSUNSUITABLE = MCIERR_BASE + 70 Const MCIERR_WAVE_SETOUTPUTUNSUITABLE = MCIERR_BASE + 71 Const MCIERR_WAVE_INPUTSUNSUITABLE = MCIERR_BASE + 72 Const MCIERR_WAVE_SETINPUTUNSUITABLE = MCIERR_BASE + 73 Const MCIERR_SEQ_DIV_INCOMPATIBLE = MCIERR_BASE + 80 Const MCIERR_SEQ_PORT_INUSE = MCIERR_BASE + 81 Const MCIERR_SEQ_PORT_NONEXISTENT = MCIERR_BASE + 82 Const MCIERR_SEQ_PORT_MAPNODEVICE = MCIERR_BASE + 83 Const MCIERR_SEQ_PORT_MISCERROR = MCIERR_BASE + 84 Const MCIERR_SEQ_TIMER = MCIERR_BASE + 85 Const MCIERR_SEQ_PORTUNSPECIFIED = MCIERR_BASE + 86 Const MCIERR_SEQ_NOMIDIPRESENT = MCIERR_BASE + 87 Const MCIERR_NO_WINDOW = MCIERR_BASE + 90 Const MCIERR_CREATEWINDOW = MCIERR_BASE + 91 Const MCIERR_FILE_READ = MCIERR_BASE + 92 Const MCIERR_FILE_WRITE = MCIERR_BASE + 93 Const MCIERR_NO_IDENTITY = MCIERR_BASE + 94 Const MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256 Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As DWord, pszText As PSTR, cchText As Long) As BOOL #endif '_INC_MMSYS