UINT joyGetNumDevs(VOID);
Queries the joystick driver for the number of joysticks it supports.
·Returns the number of joysticks the driver supports, or 0 if no driver is present.
The joyGetPosEx function is used to determine whether a given joystick is physically attached to the computer.