first see a code:
#ifdef UNICODE
#define FormatMessage FormatMessageW
#else
#define FormatMessage FormatMessageA
#endif // !UNICODE
so,where UNICODE is set?
here:
1.configuration Properties->c/c++->Preprocessor
Preprocessor Definitions;
2.Configuration Properties->General->Character Set
Use Unicode Character Set/Use Multi-Byte Character Set/Not Set