Resolved.
------------
I changed the order of the numerous #include lines. I put the #include "windows.h" as first, and now it works.