Fixed some issues found by winapi_check.

8 files changed