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