DRV_QUERYDEVICEINTERFACESIZE function

The DRV_QUERYDEVICEINTERFACESIZE message queries for the size of the buffer required to hold the device-interface name.

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_QUERYDEVICEINTERFACESIZE when it calls xxxMessage to process this device message.

dwParam1

Pointer to buffer size. This parameter points to a ULONG variable into which the function writes the required buffer size in bytes. The size includes storage space for the name string's terminating null. The size is zero if the device ID identifies a device that has no device interface.

dwParam2

Unused. Set this parameter to zero.

Return value

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

Remarks

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 buffer size retrieved by this message is expressed as a byte count. It specifies the size of the buffer needed to hold the null-terminated Unicode string that contains the device-interface name. The caller allocates a buffer of the specified size and uses the DRV_QUERYDEVICEINTERFACE message to retrieve the device-interface name string.

For more information, see Obtaining a Device Interface Name.

Requirements

Target platform

Version

Supported in Microsoft Windows Me and Windows 2000 and later operating systems.

Header

Mmddk.h (include Mmddk.h)

See also

DRV_QUERYDEVICEINTERFACE
midiInMessage
midiOutMessage
mixerMessage
Obtaining a Device Interface Name
System-Intercepted Device Messages
waveInMessage
waveOutMessage

 

 

Send comments about this topic to Microsoft

Show: