Fixed some issues reported by winapi_check.

14 files changed