Include the msvcrt headers, remove duplicate definitions.
Fixed the signature of a few functions.
Don't use wcs* functions, use *W (from unicode.h) instead.

23 files changed