I experienced the same problem using DXGetErrorMessage()
with Dx9
and found out that MS have provided an additional library to include in the Additional Dependencies
properties page to address this problem. The library name is: legacy_stdio_definitions.lib
Adding this resolved the issue for me.