DRV_QUERYDEVICEINTERFACE function

The DRV_QUERYDEVICEINTERFACE message queries for the device-interface name of a waveIn, waveOut, midiIn, midiOut, or mixer device.

Syntax

DWORD  xxxMessage(
   UINT      uDeviceID,
   UINT      uMsg,
   DWORD_PTR dwParam1,
   DWORD_PTR dwParam2
);

Parameters

  • uDeviceID
    Specifies the ID of the target device.

  • uMsg
    Caller sets this parameter to DRV_QUERYDEVICEINTERFACE when it calls xxxMessage to process this device message.

  • dwParam1
    Pointer to a caller-allocated buffer into which the function writes a null-terminated Unicode string containing the device-interface name. If the device has no device interface, the string length is zero.

  • dwParam2
    Specifies the buffer size in bytes. This is an input parameter to the function. The caller should specify a size that is greater than or equal to the buffer size retrieved by the DRV_QUERYDEVICEINTERFACESIZE message.

Return value

The xxxMessage function returns MMSYSERR_NOERROR if the message is handled successfully. Otherwise, it returns an appropriate error code.

Remarks

The DRV_QUERYDEVICEINTERFACE message is supported in Windows Me, and Windows 2000 and later. This message is valid only for the waveInMessage, waveOutMessage, midiInMessage, midiOutMessage, and mixerMessage functions. The system intercepts this message and returns the appropriate value without sending the message to the device driver. For general information about system-intercepted xxxMessage functions, see System-Intercepted Device Messages.

The following two message constants are used together for the purpose of obtaining device interface names:

  • DRV_QUERYDEVICEINTERFACESIZE

  • DRV_QUERYDEVICEINTERFACE

The first message obtains the size in bytes of the buffer needed to hold the string containing the device interface name. The second message retrieves the name string in a buffer of the required size.

For more information, see Obtaining a Device Interface Name.

Requirements

Target platform

Desktop

Header

Mmddk.h (include Mmddk.h)

See also

DRV_QUERYDEVICEINTERFACESIZE

midiInMessage

midiOutMessage

mixerMessage

System-Intercepted Device Messages

waveInMessage

waveOutMessage