Fixed some issues found by winapi_check.

20 files changed