Use WideCharToMultiByte() correctly.