Fixed some issues found by winapi_check.

7 files changed