该函数功能在waveOutOpen中也有,下面的声明功能是一样的
MMRESULT IsFormatSupported(LPWAVEFORMATEX pwfx, UINT uDeviceID) 
MMRESULT waveOutOpen( 
        NULL,                 // ptr can be NULL for query 
        uDeviceID,            // the device identifier 
        pwfx,                 // defines requested format 
        NULL,                 // no callback 
        NULL,                 // no instance data 
        WAVE_FORMAT_QUERY)  // query only, do not open device 

解决方案 »

  1.   

    Private Declare Function waveOutOpen Lib "winmm.dll" Alias "waveOutOpen" (lphWaveOut As Long, ByVal uDeviceID As Long, lpFormat As WAVEFORMATEX, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
    Private Type WAVEFORMAT
            wFormatTag As Integer
            nChannels As Integer
            nSamplesPerSec As Long
            nAvgBytesPerSec As Long
            nBlockAlign As Integer
            wBitsPerSample As Integer 
            cbSize As Integer
    End Type
      

  2.   

    Private Const WAVE_FORMAT_QUERY = &H1