home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_refer / desadecs / mmdecs.txt < prev    next >
Text File  |  1992-12-01  |  28KB  |  719 lines

  1. ' ------------------------------------------------------------------------
  2. '
  3. '     MMDECS.TXT -- Windows 3.1 Multimedia type and function Declarations for Visual Basic
  4. '
  5. '                       Copyright (C) 1992 Desaware
  6. '
  7. '  You have a royalty-free right to use, modify, reproduce and distribute
  8. '  this file (and/or any modified version) in any way you find useful,
  9. '  provided that you agree that Desaware and Ziff-Davis Press has no 
  10. '  warranty, obligation or liability for its contents.  
  11. '  Refer to the Ziff-Davis Visual Basic Programmer's Guide to the 
  12. '  Windows API for further information.
  13. '
  14. '****************************************************************************
  15. '
  16. '                    General constants and data types
  17. '
  18. '****************************************************************************/
  19.  
  20. ' RECT copies from winapi
  21. ' You will need to uncomment this type if this file is not used
  22. ' in conjunction with ApiDecs.Bas
  23.  
  24. 'Type RECT   '8 Bytes
  25. '    left As Integer
  26. '    top As Integer
  27. '    right As Integer
  28. '    bottom As Integer
  29. 'End Type
  30.  
  31.  
  32. type MMTIME
  33.    wType As Integer
  34.  
  35.    ' The following 6 byte structure is one of the following:
  36.    ' A Long representing milliseconds, sample, byte count or a songpointer
  37.    '     followed by 2 unused bytes.
  38.    ' A 6 byte field containing Hours, minutes, seconds, frames, fps, pad
  39.    struct1 As String * 6   ' Hours, minutes, seconds, frames, fps, pad
  40. End Type
  41.  
  42. ' The following structure provides an alternative way to access the
  43. ' mmtime_tag structure
  44.  
  45. type MMTIME2
  46.    wType As Integer
  47.    longfield As Long
  48.    unused As Integer
  49. End Type
  50.  
  51.  
  52.  
  53. '****************************************************************************
  54. '
  55. ''                        Installable driver support
  56. '
  57. '****************************************************************************/
  58.  
  59. ' LPARAM of DRV_CONFIGURE message
  60. Type DRVCONFIGINFO
  61.    dwDCISize As Long
  62.    lpszDCISectionName As Long
  63.    lpszDCIAliasName As Long
  64. End Type
  65.  
  66.  
  67. ' installable driver function prototypes
  68. Declare Function DrvClose& Lib "MMSYSTEM.DLL" (ByVal hDriver%, ByVal lParam1&, ByVal lParam2&)
  69. Declare Function DrvOpen% Lib "MMSYSTEM.DLL" (ByVal szDriverName$, ByVal szSectionName$, ByVal lParam2&)
  70. Declare Function DrvSendMessageClose& Lib "MMSYSTEM.DLL" (ByVal hDriver%, ByVal uMessage%, ByVal lParam1&, ByVal lParam2&)
  71. Declare Function DrvGetModuleHandle% Lib "MMSYSTEM.DLL" (ByVal hDriver%)
  72. Declare Function DrvDefDriverProc& Lib "MMSYSTEM.DLL" (ByVal dwDriverId&, ByVal driverID, ByVal uMessage%, ByVal lParam1&, ByVal lParam2&)
  73.  
  74.  
  75.  
  76.  
  77. '****************************************************************************
  78. '
  79. ''                    General MMSYSTEM support
  80. '
  81. '****************************************************************************/
  82.  
  83. Declare Function mmsystemGetVersion% Lib "MMSYSTEM.DLL" ()
  84. Declare Sub OutputDebugStr Lib "MMSYSTEM.DLL" (ByVal strout$)
  85.  
  86.  
  87. '****************************************************************************
  88. '
  89. ''                            Sound support
  90. '
  91. '****************************************************************************/
  92.  
  93. Declare Function sndPlaySound% Lib "MMSYSTEM.DLL" (ByVal lpszSoundName$, ByVal uFlags%)
  94.  
  95.  
  96. ' wave data block header 
  97. Type WAVEHDR
  98.     lpData As Long               ' pointer to locked data buffer 
  99.     dwBufferLength As Long       ' length of data buffer 
  100.     dwBytesRecorded As Long      ' used for input only 
  101.     dwUser As Long               ' for client's use 
  102.     dwFlags As Long              ' assorted flags (see defines) 
  103.     dwLoops As Long      ' loop control counter 
  104.     lpNext As Long               ' reserved for driver 
  105.     reserved As Long             ' reserved for driver 
  106. End Type
  107.  
  108.  
  109. ' waveform output device capabilities structure 
  110. Type WAVEOUTCAPS
  111.     wMid As Integer                 ' manufacturer ID 
  112.     wPid As Integer                 ' product ID 
  113.     vDriverVersion As Integer       ' version of the driver 
  114.     szPname As String *32           ' product name (NULL terminated string) 
  115.     dwFormats As Long               ' formats supported 
  116.     wChannels As Integer            ' number of sources supported 
  117.     dwSupport As Long               ' functionality supported by driver 
  118. End Type
  119.  
  120. ' waveform input device capabilities structure 
  121. Type WAVEINCAPS
  122.     wMid As Integer                  ' manufacturer ID 
  123.     wPid As Integer                  ' product ID 
  124.     vDriverVersion As Integer        ' version of the driver 
  125.     szPname As String *32            ' product name (NULL terminated string) 
  126.     dwFormats As Long                ' formats supported 
  127.     wChannels As Integer             ' number of channels supported 
  128. End Type
  129.  
  130.  
  131. ' general waveform format structure (information common to all formats) 
  132. Type WAVEFORMAT
  133.     wFormatTag As Integer           ' format type 
  134.     nChannels As Integer            ' number of channels (i.e. mono, stereo, etc.) 
  135.     nSamplesPerSec As Long          ' sample rate 
  136.     nAvgBytesPerSec As Long         ' for buffer estimation 
  137.     nBlockAlign As Integer          ' block size of data 
  138. End Type
  139.  
  140. ' specific waveform format structure for PCM data 
  141. Type PCWAVEFORMAT
  142.     wf As WAVEFORMAT
  143.     wBitsPerSample As Integer
  144. End Type
  145.  
  146. ' waveform audio function prototypes 
  147. Declare Function waveOutGetNumDevs% Lib "MMSYSTEM.DLL" ()
  148. Declare Function waveOutGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpCaps As WAVEOUTCAPS, ByVal uSize%)
  149. Declare Function waveOutGetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpdwVolume&)
  150. Declare Function waveOutSetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, ByVal dwVolume&)
  151. Declare Function waveOutGetErrorText% Lib "MMSYSTEM.DLL" (ByVal uError%, ByVal lpText$, ByVal uSize%)
  152. Declare Function waveOutOpen% Lib "MMSYSTEM.DLL" (lphWaveOut%, ByVal uDeviceID%, lpFormat As WAVEFORMAT, ByVal dwCallback&, ByVal dwInstance&, ByVal dwFlags&)
  153. Declare Function waveOutClose% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%)
  154. Declare Function waveOutPrepareHeader% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpWaveOutHdr As WAVEHDR, ByVal uSize%)
  155. Declare Function waveOutUnprepareHeader% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpWaveOutHdr As WAVEHDR, ByVal uSize%)
  156. Declare Function waveOutWrite% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpWaveOutHdr As WAVEHDR, ByVal uSize%)
  157. Declare Function waveOutPause% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%)
  158. Declare Function waveOutRestart% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%)
  159. Declare Function waveOutReset% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%)
  160. Declare Function waveOutBreakLoop% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%)
  161. Declare Function waveOutGetPosition% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpInfo As MMTIME, ByVal uSize%)
  162. Declare Function waveOutGetPitch% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpdwPitch&)
  163. Declare Function waveOutSetPitch% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, ByVal dwPitch&)
  164. Declare Function waveOutGetPlaybackRate% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpdwRate&)
  165. Declare Function waveOutSetPlaybackRate% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, ByVal dwRate&)
  166. Declare Function waveOutGetID% Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, lpuDeviceID%)
  167.  
  168. Declare Function waveOutMessage& Lib "MMSYSTEM.DLL" (ByVal hWaveOut%, ByVal uMessage%, ByVal dw1&, ByVal dw2&)
  169.  
  170. Declare Function waveInGetNumDevs% Lib "MMSYSTEM.DLL" ()
  171. Declare Function waveInGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpCaps As WAVEINCAPS, ByVal uSize%)
  172. Declare Function waveInGetErrorText% Lib "MMSYSTEM.DLL" (ByVal uError%, ByVal lpText$, ByVal uSize%)
  173. Declare Function waveInOpen% Lib "MMSYSTEM.DLL" (lphWaveIn%, ByVal uDeviceID%, lpFormat As WAVEFORMAT, ByVal dwCallback&, ByVal dwInstance&, ByVal dwFlags&)
  174. Declare Function waveInClose% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%)
  175. Declare Function waveInPrepareHeader% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, lpWaveInHdr As WAVEHDR, ByVal uSize%)
  176. Declare Function waveInUnprepareHeader% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, lpWaveInHdr As WAVEHDR, ByVal uSize%)
  177. Declare Function waveInAddBuffer% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, lpWaveInHdr As WAVEHDR, ByVal uSize%)
  178. Declare Function waveInStart% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%)
  179. Declare Function waveInStop% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%)
  180. Declare Function waveInReset% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%)
  181. Declare Function waveInGetPosition% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, lpInfo As MMTIME, ByVal uSize%)
  182. Declare Function waveInGetID% Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, lpuDeviceID%)
  183.  
  184. Declare Function waveInMessage& Lib "MMSYSTEM.DLL" (ByVal hWaveIn%, ByVal uMessage%, ByVal dw1&, ByVal dw2&)
  185.  
  186. '****************************************************************************
  187. '
  188. ''                            MIDI audio support
  189. '
  190. '****************************************************************************/
  191.  
  192.  
  193. ' MIDI output device capabilities structure 
  194. Type MIDIOUTCAPS
  195.     wMid As Integer                ' manufacturer ID 
  196.     wPid As Integer                ' product ID 
  197.     vDriverVersion As Integer      ' version of the driver 
  198.     szPname As String *32          ' product name (NULL terminated string) 
  199.     wTechnology As Integer         ' type of device 
  200.     wVoices As Integer             ' # of voices (internal synth only) 
  201.     wNotes As Integer              ' max # of notes (internal synth only) 
  202.     wChannelMask As Integer        ' channels used (internal synth only) 
  203.     dwSupport As Long              ' functionality supported by driver 
  204. End Type
  205.  
  206.  
  207. ' MIDI output device capabilities structure 
  208. Type MIDIINCAPS
  209.     wMid As Integer                ' manufacturer ID 
  210.     wPid As Integer                ' product ID 
  211.     vDriverVersion As Integer      ' version of the driver 
  212.     szPname As String *32          ' product name (NULL terminated string) 
  213. End Type
  214.  
  215. ' MIDI data block header 
  216. Type MIDIHDR
  217.     lpData As Long                    ' pointer to locked data block 
  218.     dwBufferLength As Long            ' length of data in data block 
  219.     dwBytesRecorded As Long           ' used for input only 
  220.     dwUser As Long                    ' for client's use 
  221.     dwFlags As Long                   ' assorted flags (see defines) 
  222.     lpNext As Long                    ' reserved for driver 
  223.     reserved As Long                  ' reserved for driver 
  224. End Type
  225.  
  226.  
  227. ' MIDI function prototypes 
  228. Declare Function midiOutGetNumDevs% Lib "MMSYSTEM.DLL" ()
  229. Declare Function midiOutGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpCaps As MIDIOUTCAPS, ByVal uSize%)
  230. Declare Function midiOutGetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpdwVolume&)
  231. Declare Function midiOutSetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, ByVal dwVolume&)
  232. Declare Function midiOutGetErrorText% Lib "MMSYSTEM.DLL" (ByVal uError%, ByVal lpText$, ByVal uSize%)
  233. Declare Function midiOutOpen% Lib "MMSYSTEM.DLL" (lphMidiOut&, ByVal uDeviceID%, ByVal dwCallback&, ByVal dwInstance&, ByVal dwFlags&)
  234. Declare Function midiOutClose% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%)
  235. Declare Function midiOutPrepareHeader% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, lpMidiOutHdr As MIDIHDR, ByVal uSize%)
  236. Declare Function midiOutUnprepareHeader% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, lpMidiOutHdr As MIDIHDR, ByVal uSize%)
  237. Declare Function midiOutShortMsg% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, ByVal dwMsg&)
  238. Declare Function midiOutLongMsg% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, lpMidiOutHdr As MIDIHDR, ByVal uSize%)
  239. Declare Function midiOutReset% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%)
  240. Declare Function midiOutCachePatches% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, ByVal uBank%, lpwPatchArray%, ByVal uFlags%)
  241. Declare Function midiOutCacheDrumPatches% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, ByVal uPatch%, lpwKeyArray%, ByVal uFlags%)
  242. Declare Function midiOutGetID% Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, lpuDeviceID%)
  243.  
  244. Declare Function midiOutMessage& Lib "MMSYSTEM.DLL" (ByVal hMidiOut%, ByVal uMessage%, ByVal dw1&, ByVal dw2&)
  245.  
  246. Declare Function midiInGetNumDevs% Lib "MMSYSTEM.DLL" ()
  247. Declare Function midiInGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpCaps As MIDIINCAPS, ByVal uSize%)
  248. Declare Function midiInGetErrorText% Lib "MMSYSTEM.DLL" (ByVal uError%, ByVal lpText$, ByVal uSize%)
  249. Declare Function midiInOpen% Lib "MMSYSTEM.DLL" (lphMidiIn%, ByVal uDeviceID%, ByVal dwCallback&, ByVal dwInstance&, ByVal dwFlags&)
  250. Declare Function midiInClose% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%)
  251. Declare Function midiInPrepareHeader% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%, lpMidiInHdr As MIDIHDR, ByVal uSize%)
  252. Declare Function midiInUnprepareHeader% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%, lpMidiInHdr As MIDIHDR, ByVal uSize%)
  253. Declare Function midiInAddBuffer% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%, lpMidiInHdr As MIDIHDR, ByVal uSize%)
  254. Declare Function midiInStart% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%)
  255. Declare Function midiInStop% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%)
  256. Declare Function midiInReset% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%)
  257. Declare Function midiInGetID% Lib "MMSYSTEM.DLL" (ByVal hMidiIn%, lpuDeviceID%)
  258.  
  259. Declare Function midiInMessage& Lib "MMSYSTEM.DLL" (ByVal hMidiIn%, ByVal uMessage%, ByVal dw1&, ByVal dw2&)
  260.  
  261. '****************************************************************************
  262. '
  263. ''                        Auxiliary audio support
  264. '
  265. '****************************************************************************/
  266.  
  267.  
  268. ' Auxiliary audio device capabilities structure 
  269. Type AUXCAPS
  270.     wMid As Integer                ' manufacturer ID 
  271.     wPid As Integer                ' product ID 
  272.     vDriverVersion As Integer      ' version of the driver 
  273.     szPname As String *32          ' product name (NULL terminated string) 
  274.     wTechnology As Integer         ' type of device 
  275.     dwSupport As Long              ' functionality supported by driver 
  276. End Type
  277.  
  278.  
  279. ' auxiliary audio function prototypes 
  280. Declare Function auxGetNumDevs% Lib "MMSYSTEM.DLL" ()
  281. Declare Function auxGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpCaps As AUXCAPS, ByVal uSize%)
  282. Declare Function auxSetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, ByVal dwVolume&)
  283. Declare Function auxGetVolume% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpdwVolume&)
  284.  
  285. Declare Function auxOutMessage& Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, ByVal uMessage%, ByVal dw1&, ByVal dw2&)
  286.  
  287. '****************************************************************************
  288. '
  289. ''                            Timer support
  290. '
  291. '****************************************************************************/
  292.  
  293.  
  294. ' timer device capabilities data structure 
  295. Type TIMECAPS
  296.     wPeriodMin As Integer     ' minimum period supported  
  297.     wPeriodMax As Integer     ' maximum period supported  
  298. End Type
  299.  
  300. ' timer function prototypes 
  301. Declare Function timeGetSystemTime% Lib "MMSYSTEM.DLL" (lpTime As MMTIME, ByVal uSize%)
  302. Declare Function timeGetTime& Lib "MMSYSTEM.DLL" ()
  303. Declare Function timeSetEvent% Lib "MMSYSTEM.DLL" (ByVal uDelay%, ByVal uResolution%, ByVal lpFunction&, ByVal dwUser&, ByVal uFlags%)
  304. Declare Function timeKillEvent% Lib "MMSYSTEM.DLL" (ByVal uTimerID%)
  305. Declare Function timeGetDevCaps% Lib "MMSYSTEM.DLL" (lpTimeCaps As TIMECAPS, ByVal uSize%)
  306. Declare Function timeBeginPeriod% Lib "MMSYSTEM.DLL" (ByVal uPeriod%)
  307. Declare Function timeEndPeriod% Lib "MMSYSTEM.DLL" (ByVal uPeriod%)
  308.  
  309. '****************************************************************************
  310. '
  311. ''                            Joystick support
  312. '
  313. '****************************************************************************/
  314.  
  315.  
  316. ' joystick device capabilities data structure 
  317. Type JOYCAPS
  318.     wMid As Integer             ' manufacturer ID 
  319.     wPid As Integer             ' product ID 
  320.     szPname As String *32       ' product name (NULL terminated string) 
  321.     wXmin As Integer            ' minimum x position value 
  322.     wXmax As Integer            ' maximum x position value 
  323.     wYmin As Integer            ' minimum y position value 
  324.     wYmax As Integer            ' maximum y position value 
  325.     wZmin As Integer            ' minimum z position value 
  326.     wZmax As Integer            ' maximum z position value 
  327.     wNumButtons As Integer      ' number of buttons 
  328.     wPeriodMin As Integer       ' minimum message period when captured 
  329.     wPeriodMax As Integer       ' maximum message period when captured 
  330. End Type
  331.  
  332. ' joystick information data structure 
  333. Type JOYINFO
  334.     wXpos As Integer            ' x position 
  335.     wYpos As Integer            ' y position 
  336.     wZpos As Integer            ' z position 
  337.     wButtons As Integer         ' button states 
  338. End Type
  339.  
  340. ' joystick function prototypes 
  341. Declare Function joyGetDevCaps% Lib "MMSYSTEM.DLL" (ByVal uJoyID%, lpCaps As JOYCAPS, ByVal uSize%)
  342. Declare Function joyGetNumDevs% Lib "MMSYSTEM.DLL" ()
  343. Declare Function joyGetPos% Lib "MMSYSTEM.DLL" (ByVal uJoyID%, lpInfo As JOYINFO)
  344. Declare Function joyGetThreshold% Lib "MMSYSTEM.DLL" (ByVal uJoyID%, lpuThreshold%)
  345. Declare Function joyReleaseCapture% Lib "MMSYSTEM.DLL" (ByVal uJoyID%)
  346. Declare Function joySetCapture% Lib "MMSYSTEM.DLL" (ByVal hwnd%, ByVal uJoyID%, ByVal uPeriod%, ByVal bChanged%)
  347. Declare Function joySetThreshold% Lib "MMSYSTEM.DLL" (ByVal uJoyID%, ByVal uThreshold%)
  348.  
  349. '****************************************************************************
  350. '
  351. ''                        Multimedia File I/O support
  352. '
  353. '****************************************************************************/
  354.  
  355.  
  356. ' general MMIO information data structure 
  357. Type MMIOINFO
  358.         ' general fields 
  359.         dwFlags As Long                 ' general status flags 
  360.         fccIOProc As Long               ' pointer to I/O procedure 
  361.         pIOProc As Long                 ' pointer to I/O procedure 
  362.         wErrorRet As Integer            ' place for error to be returned 
  363.         htask As Integer                ' alternate local task 
  364.  
  365.         ' fields maintained by MMIO functions during buffered I/O 
  366.         cchBuffer As Long               ' size of I/O buffer (or 0L) 
  367.         pchBuffer As Long               ' start of I/O buffer (or NULL) 
  368.         pchNext As Long                 ' pointer to next byte to read/write 
  369.         pchEndRead As Long              ' pointer to last valid byte to read 
  370.         pchEndWrite As Long             ' pointer to last byte to write 
  371.         lBufOffset As Long              ' disk offset of start of buffer 
  372.  
  373.         ' fields maintained by I/O procedure 
  374.         lDiskOffset As Long             ' disk offset of next read or write 
  375.         adwInfo(3) As Long              ' data specific to type of MMIOPROC 
  376.  
  377.         ' other fields maintained by MMIO 
  378.         dwReserved1 As Long             ' reserved for MMIO use 
  379.         dwReserved2 As Long             ' reserved for MMIO use 
  380.         hmmio As Integer                ' handle to open file 
  381. End Type
  382.  
  383. ' RIFF chunk information data structure 
  384. Type MMCKINFO
  385.         ckid As Long    ' chunk ID 
  386.         cksize As Long  ' chunk size 
  387.         fccType As Long ' form type or list type 
  388.         dwDataOffset As Long   ' offset of data portion of chunk 
  389.         dwFlags As Long ' flags used by MMIO functions 
  390. End Type
  391.  
  392.  
  393. ' MMIO function prototypes 
  394. Declare Function mmioStringToFOURCC& Lib "MMSYSTEM.DLL" (ByVal sz$, ByVal uFlags%)
  395. Declare Function mmioInstallIOProc& Lib "MMSYSTEM.DLL" (ByVal fccIOProc&, ByVal pIOProc&, ByVal dwFlags&)
  396. Declare Function mmioOpen% Lib "MMSYSTEM.DLL" (ByVal szFileName$, lpmmioinfo As MMIOINFO, ByVal dwOpenFlags&)
  397.  
  398. Declare Function mmioRename% Lib "MMSYSTEM.DLL" (ByVal szFileName$, ByVal szNewFileName$, lpmmioinfo As MMIOINFO, ByVal dwRenameFlags&)
  399. Declare Function mmioClose% Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal uFlags%)
  400. Declare Function mmioRead& Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal pch$, ByVal cch&)
  401. Declare Function mmioWrite& Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal pch$, ByVal cch&)
  402. Declare Function mmioSeek& Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal lOffset&, ByVal iOrigin%)
  403. Declare Function mmioGetInfo% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpmmioinfo As MMIOINFO, ByVal uFlags%)
  404. Declare Function mmioSetInfo% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpmmioinfo As MMIOINFO, ByVal uFlags%)
  405. Declare Function mmioSetBuffer% Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal pchBuffer$, ByVal cchBuffer&, ByVal uFlags%)
  406. Declare Function mmioFlush% Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal uFlags%)
  407. Declare Function mmioAdvance% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpmmioinfo As MMIOINFO, ByVal uFlags%)
  408. Declare Function mmioSendMessage& Lib "MMSYSTEM.DLL" (ByVal hmmio%, ByVal uMessage%, ByVal lParam1&, ByVal lParam2&)
  409. Declare Function mmioDescend% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpck As MMCKINFO, lpckParent As MMCKINFO, ByVal uFlags%)
  410. Declare Function mmioAscend% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpck As MMCKINFO, ByVal uFlags%)
  411. Declare Function mmioCreateChunk% Lib "MMSYSTEM.DLL" (ByVal hmmio%, lpck As MMCKINFO, ByVal uFlags%)
  412.  
  413. '****************************************************************************
  414. '
  415. ''                            MCI support
  416. '
  417. '****************************************************************************/
  418.  
  419.  
  420. ' MCI function prototypes 
  421. Declare Function mciSendCommand& Lib "MMSYSTEM.DLL"  (ByVal uDeviceID%, ByVal uMessage%, ByVal dwParam1&, ByVal dwParam2&)
  422. Declare Function mciSendString& Lib "MMSYSTEM.DLL"  (ByVal lpstrCommand$, ByVal lpstrReturnString$, ByVal uReturnLength%, ByVal hwndCallback%)
  423. Declare Function mciSendStringAny& Lib "MMSYSTEM.DLL"  Alias "mciSendString" (ByVal lpstrCommand$, ByVal lpstrReturnString As Any, ByVal uReturnLength%, ByVal hwndCallback%)
  424. Declare Function mciGetDeviceID% Lib "MMSYSTEM.DLL" (ByVal lpstrName$)
  425. Declare Function mciGetDeviceIDFromElementID% Lib "MMSYSTEM.DLL" (ByVal dwElementID&, ByVal lpstrType$)
  426. Declare Function mciGetErrorString% Lib "MMSYSTEM.DLL"  (ByVal wError&, ByVal lpstrBuffer$, ByVal uLength%)
  427. Declare Function mciSetYieldProc% Lib "MMSYSTEM.DLL"  (ByVal uDeviceID%, ByVal fpYieldProc&, ByVal dwYieldData&)
  428.  
  429. Declare Function mciGetCreatorTask% Lib "MMSYSTEM.DLL" (ByVal uDeviceID%)
  430. Declare Function mciGetYieldProc& Lib "MMSYSTEM.DLL" (ByVal uDeviceID%, lpdwYieldData&)
  431. Declare Function mciExecute% Lib "MMSYSTEM.DLL"  (ByVal lpstrCommand$)
  432.  
  433.  
  434.  
  435. ' generic parameter block for MCI command messages with no special parameters 
  436. Type MCI_GENERIC_PARMS
  437.     dwCallback As Long
  438. End Type
  439.  
  440. ' parameter block for MCI_OPEN command message 
  441. Type MCI_OPEN_PARMS
  442.     dwCallback As Long
  443.     wDeviceID As Integer
  444.     wReserved0 As Integer
  445.     ByVal As Long
  446.     lpstrElementName As Long
  447.     lpstrAlias As Long
  448. End Type
  449.  
  450. ' parameter block for MCI_PLAY command message 
  451. Type MCI_PLAY_PARMS
  452.     dwCallback As Long
  453.     dwFrom As Long
  454.     dwTo As Long
  455. End Type
  456.  
  457.  
  458. ' parameter block for MCI_SEEK command message 
  459. Type MCI_SEEK_PARMS
  460.     dwCallback As Long
  461.     dwTo As Long
  462. End Type
  463.  
  464.  
  465. ' parameter block for MCI_STATUS command message 
  466. Type MCI_STATUS_PARMS
  467.     dwCallback As Long
  468.     dwReturn As Long
  469.     dwItem As Long
  470.     dwTrack As Long
  471. End Type
  472.  
  473.  
  474. ' parameter block for MCI_INFO command message 
  475. Type MCI_INFO_PARMS
  476.     dwCallback As Long
  477.     lpstrReturn As Long
  478.     dwRetSize As Long
  479. End Type
  480.  
  481. ' parameter block for MCI_GETDEVCAPS command message 
  482. Type MCI_GETDEVCAPS_PARMS
  483.     dwCallback As Long
  484.     dwReturn As Long
  485.     dwItem As Long
  486. End Type
  487.  
  488. ' parameter block for MCI_SYSINFO command message 
  489. Type MCI_SYSINFO_PARMS
  490.     dwCallback As Long
  491.     lpstrReturn As Long
  492.     dwRetSize As Long
  493.     dwNumber As Long
  494.     wDeviceType As Integer
  495.     wReserved0 As Integer
  496. End Type    
  497.  
  498. ' parameter block for MCI_SET command message 
  499. Type MCI_SET_PARMS
  500.     dwCallback As Long
  501.     dwTimeFormat As Long
  502.     dwAudio As Long
  503. End Type
  504.  
  505. ' parameter block for MCI_BREAK command message 
  506. Type MCI_BREAK_PARMS
  507.     dwCallback As Long
  508.     nVirtKey As Integer
  509.     wReserved0 As Integer
  510.     hwndBreak As Integer
  511.     wReserved1 As Integer
  512. End Type
  513.  
  514.  
  515. ' parameter block for MCI_SOUND command message 
  516. Type MCI_SOUND_PARMS
  517.     dwCallback As Long
  518.     lpstrSoundName As Long
  519. End Type
  520.  
  521.  
  522. ' parameter block for MCI_SAVE command message 
  523. Type MCI_SAVE_PARMS
  524.     dwCallback As Long
  525.     lpfilename As Long
  526. End Type
  527.  
  528. ' parameter block for MCI_LOAD command message 
  529. Type MCI_LOAD_PARMS
  530.     dwCallback As Long
  531.     lpfilename As Long
  532. End Type
  533.  
  534.  
  535. ' parameter block for MCI_RECORD command message 
  536. Type MCI_RECORD_PARMS
  537.     dwCallback As Long
  538.     dwFrom As Long
  539.     dwTo As Long
  540. End Type
  541.  
  542.  
  543.  
  544. ' parameter block for MCI_PLAY command message 
  545. Type MCI_VD_PLAY_PARMS
  546.     dwCallback As Long
  547.     dwFrom As Long
  548.     dwTo As Long
  549.     dwSpeed As Long
  550. End Type
  551.  
  552. ' parameter block for MCI_STEP command message 
  553. Type MCI_VD_STEP_PARMS
  554.     dwCallback As Long
  555.     dwFrames As Long
  556. End Type
  557.  
  558. ' parameter block for MCI_ESCAPE command message 
  559. Type MCI_VD_ESCAPE_PARMS
  560.     dwCallback As Long
  561.     lpstrCommand As Long
  562. End Type
  563.  
  564.  
  565. ' parameter block for MCI_OPEN command message 
  566. Type MCI_WAVE_OPEN_PARMS
  567.     dwCallback As Long
  568.     wDeviceID As Integer
  569.     wReserved0 As Integer
  570.     lpstrDeviceType As Long
  571.     lpstrElementName As Long
  572.     lpstrAlias As Long
  573.     dwBufferSeconds As Long
  574. End Type
  575.  
  576.  
  577. ' parameter block for MCI_DELETE command message 
  578. Type MCI_WAVE_DELETE_PARMS
  579.     dwCallback As Long
  580.     dwFrom As Long
  581.     dwTo As Long
  582. End Type
  583.  
  584. ' parameter block for MCI_SET command message 
  585. Type MCI_WAVE_SET_PARMS
  586.     dwCallback As Long
  587.     dwTimeFormat As Long
  588.     dwAudio As Long
  589.     wInput As Integer
  590.     wReserved0 As Integer
  591.     wOutput As Integer
  592.     wReserved1 As Integer
  593.     wFormatTag As Integer
  594.     wReserved2 As Integer
  595.     nChannels As Integer
  596.     wReserved3 As Integer
  597.     nSamplesPerSec As Long
  598.     nAvgBytesPerSec As Long
  599.     nBlockAlign As Integer
  600.     wReserved4 As Integer
  601.     wBitsPerSample As Integer
  602.     wReserved5 As Integer
  603. End Type
  604.  
  605.  
  606.  
  607.  
  608. ' parameter block for MCI_SET command message 
  609. Type MCI_SEQ_SET_PARMS
  610.     dwCallback As Long
  611.     dwTimeFormat As Long
  612.     dwAudio As Long
  613.     dwTempo As Long
  614.     dwPort As Long
  615.     dwSlave As Long
  616.     dwMaster As Long
  617.     dwOffset As Long
  618. End Type
  619.  
  620.  
  621.  
  622. ' parameter block for MCI_OPEN command message 
  623. Type MCI_ANIM_OPEN_PARMS
  624.     dwCallback As Long
  625.     wDeviceID As Integer
  626.     wReserved0 As Integer
  627.     lpstrDeviceType As Long
  628.     lpstrElementName As Long
  629.     lpstrAlias As Long
  630.     dwStyle As Long
  631.     hWndParent As Integer
  632.     wReserved1 As Integer
  633. End Type
  634.  
  635. ' parameter block for MCI_PLAY command message 
  636. Type MCI_ANIM_PLAY_PARMS
  637.     dwCallback As Long
  638.     dwFrom As Long
  639.     dwTo As Long
  640.     dwSpeed As Long
  641. End Type
  642.  
  643.  
  644. ' parameter block for MCI_STEP command message 
  645. Type MCI_ANIM_STEP_PARMS
  646.     dwCallback As Long
  647.     dwFrames As Long
  648. End Type
  649.  
  650.  
  651. ' parameter block for MCI_WINDOW command message 
  652. Type MCI_ANIM_WINDOW_PARMS
  653.     dwCallback As Long
  654.     hWnd As Integer
  655.     wReserved1 As Integer
  656.     nCmdShow As Integer
  657.     wReserved2 As Integer
  658.     lpstrText As Long
  659. End Type
  660.  
  661. ' parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages 
  662. Type MCI_ANIM_RECT_PARMS
  663.     dwCallback As Long
  664.     rc As RECT
  665. End Type
  666.  
  667. ' parameter block for MCI_UPDATE PARMS 
  668. Type MCI_ANIM_UPDATE_PARMS
  669.     dwCallback As Long
  670.     rc As RECT
  671.     hDC As Integer
  672. End Type
  673.  
  674.  
  675. ' parameter block for MCI_OPEN command message 
  676. Type MCI_OVLY_OPEN_PARMS
  677.     dwCallback As Long
  678.     wDeviceID As Integer
  679.     wReserved0 As Integer
  680.     lpstrDeviceType As Long
  681.     lpstrElementName As Long
  682.     lpstrAlias As Long
  683.     dwStyle As Long
  684.     hWndParent As Integer
  685.     wReserved1 As Integer
  686. End Type
  687.  
  688. ' parameter block for MCI_WINDOW command message 
  689. Type MCI_OVLY_WINDOW_PARMS
  690.     dwCallback As Long
  691.     hWnd As Integer
  692.     wReserved1 As Integer
  693.     nCmdShow As Integer
  694.     wReserved2 As Integer
  695.     lpstrText As Long
  696. End Type
  697.  
  698. ' parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages 
  699. Type MCI_OVLY_RECT_PARMS
  700.     dwCallback As Long
  701.     rc As RECT
  702. End Type
  703.  
  704. ' parameter block for MCI_SAVE command message 
  705. Type MCI_OVLY_SAVE_PARMS
  706.     dwCallback As Long
  707.     lpfilename As Long
  708.     rc As RECT
  709. End Type
  710.  
  711. ' parameter block for MCI_LOAD command message 
  712. Type MCI_OVLY_LOAD_PARMS
  713.     dwCallback As Long
  714.     lpfilename As Long
  715.     rc As RECT
  716. End Type
  717.  
  718.  
  719.