Number of Devices

WINMM sends a JDD_GETNUMDEVS message to the driver to determine how many devices the driver supports. The lParam1 and lParam2 parameters are not used. In response to the JDD_GETNUMDEVS message, return the maximum number of devices supported by the driver.

The driver should return the number of supported devices, which is not necessarily the same as the number of connected devices. This allows a user to connect a device after the driver has been loaded. The joystick interface provides a JOYERR_UNPLUGGED error value that a driver should return when an application polls an unplugged device.