Fixed some issues reported by winapi_check.

9 files changed