Fixed some issues found by winapi_check.

11 files changed