The real question is: is it compiled with the same msvc compiler that ships in the SDK? If so, they don’t even use C99. C89 all the way. That especially means no variable declaration anywhere in the function body.
Here's a community wiki answer on SO: https://stackoverflow.com/posts/47526708/revisions
Extracted portion of relevance:
> The following C99 features are not supported by C++:
>
> * restricted pointers
> * variable length arrays
> * flexible array members
> * static and type qualifiers in parameter array declarators
> * compound literals
> * designated initializersIn C89 you can declare variables in the middle of the function, as long as they're at the beginning of a { block }. The beginning of a function is somewhat of a special-case of this.
Since Visual C++ 2013 it's no longer true.
ISO C support has been improved to the extent required by ISO C++ compatibility requirements to ISO C.