Fixed some issues reported by winapi_check.

35 files changed