WinApi TCHAR update and some improvements