Fix error code in Windows-specific code.
Add missing include file for Windows.