If you use this define" #define XInputGetState XInputGetState_;" then code like this:
| if (XInputGetState(ControllerIndex, &ControllerState) == ERROR_SUCCESS)
|
expands to code like this:
| if (XInputGetState_;(ControllerIndex, &ControllerState) == ERROR_SUCCESS)
|
Which is a syntax error. Remove the semicolon. Remember that preprocessor is just a text replacement, it's not C statements, just a text.
You should really post exact error message if you are asking for help. Error message would exactly say what is the problem.