Detecting the Devices You Can Use

Just like last chapter, you will need to ensure that you add references to DirectInput in order to use the code that will be discussed in this chapter. You will need to add a reference to Microsoft.DirectX.DirectInput as well as add a using clause for this namespace. Once this is done for the project(s), you are ready to begin.

Unless your computer is a server system, mounted inside a “rack” (a headless system), chances are your computer has at a minimum two input devices: a keyboard and a mouse.

With the multitude of USB devices on the market today, though, you may very well have quite a few input devices. It's not uncommon for a laptop, for example, to have multiple mice attached. You could theoretically have ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.