Fixed compiler warnings

HIDWORD, _s for string APIs, and GetVersionEx is deprecated.