WIDM_GETNUMDEVS

The WIDM_GETNUMDEVS message requests a waveform input driver to return the number of device instances that it supports.

Parameters

uDeviceId

Device identifier (0, 1, 2, and so on) for the target device.

uMsg

WIDM_GETNUMDEVS

dwUser

Device instance identifier.

dwParam1

Not used.

dwParam2

Not used.

Return Value

The driver returns the number of waveform input device instances it supports.

Comments

A client sends the WIDM_GETNUMDEVS message by calling the user-mode driver’s widMessage entry point, passing the specified parameters.

The driver should return the number of logical waveform input devices that can be supported. Typically, for each physical device, a kernel-mode driver can support one or more logical devices of various types. For example, for each Creative Labs Sound Blasterä card, there are MIDI, waveform, mixer, and auxiliary audio devices. Kernel-mode drivers store logical device names and types in the registry under the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DriverName\Parameters\DeviceNumber\Devices. To correctly return the number of logical devices, the user-mode driver should examine the \Devices subkey for each of the driver’s \DeviceNumber keys, looking for logical devices of the desired type. (Code in drvlib.lib provides this capability.)