WINDOWS: make most WinAPI calls Unicode-safe