www.mvps.org/directx/faq/directx_general_issues.htm#dinputcreate
Q. When attempting to compile under the DirectX 8 SDK, I recieve a compiler error stating that DirectInputCreateEx or DirectInputCreate is an undeclared identifier.
Compiling code for previous versions of DirectInput under DirectX 8, you must define a constant specifying the required version support prior to including dinput.h. DefineDIRECTINPUT_VERSIONto be equal to0x300,0x0500, or0x0700, like this:
#define DIRECTINPUT_VERSION 0x0700
#include <dinput.h>