Win32 changes to compile with master

I made these changes in preparation to giving training to the Danish Geodata Agency.  Most changes were required by MSVC compiler, in regards to how variables were declared.  Please review all changes.