[wdmaudiodev] Anyone tried using DRV_QUERYDEVICEINTERFACE[SIZE]?

  • From: "Daniel E. Germann" <deg@xxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 21 Oct 2003 18:28:40 -0500

Has anyone tried sending the DRV_QUERYDEVICEINTERFACESIZE message to a wave
device?  I tried using it (and its companion, DRV_QUERYDEVICEINTERFACE) on
two Windows XP systems (one "Gold", one SP1), and they both seem to return
MMSYSERR_NOTSUPPORTED (8).  Both devices queried used WDM Audio drivers; one
driver was signed and one driver was not signed.  I tried both wave in and
wave out devices.

Any ideas?  A fragment from my test program is pasted below.  I am probably
missing something obvious.

Best regards,
-Dan

void CTestDlg::QueryDevice(int dev)
{
    CString                 str;
    HWAVEIN                 hwi;
    MMRESULT                ret;
    ULONG                   ulSize;
    WAVEFORMATEXTENSIBLE    wfx;
    WCHAR                   uszDevInterface[512];

    memset(&wfx, 0, sizeof(wfx));
    wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
    wfx.Format.nChannels = 2;
    wfx.Format.nSamplesPerSec = 44100;
    wfx.Format.wBitsPerSample = 16;
    wfx.Format.nBlockAlign = wfx.Format.wBitsPerSample / 8 *
wfx.Format.nChannels;
    wfx.Format.nAvgBytesPerSec = wfx.Format.nSamplesPerSec *
wfx.Format.nBlockAlign;
    wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
    wfx.Samples.wValidBitsPerSample = wfx.Format.wBitsPerSample;
    wfx.dwChannelMask = 0;
    wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
    ret = waveInOpen(&hwi, dev, (WAVEFORMATEX *) &wfx, 0, 0, CALLBACK_NULL);
    if (ret == MMSYSERR_NOERROR)
    {
        ulSize = 0;
        ret = waveInMessage(hwi, DRV_QUERYDEVICEINTERFACESIZE, (DWORD)
&ulSize, 0);
        // above call fails with MMSYSERR_NOTSUPPORTED
        if (ret == MMSYSERR_NOERROR)
        {
            if (ulSize < sizeof(uszDevInterface))
            {
                ret = waveInMessage(hwi, DRV_QUERYDEVICEINTERFACE, (DWORD)
uszDevInterface, sizeof(uszDevInterface));
                // above call fails with MMSYSERR_NOTSUPPORTED
                if (ret == MMSYSERR_NOERROR)
                {
                    str.Format("Interface: %ls", uszDevInterface);
                    AfxMessageBox(str);
                }
            }
        }
        waveInClose(hwi);
    }
}

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: