1 Jul 2005 16:39
Re: errors in file_win.cpp
Arvid Norberg <c99ang <at> cs.umu.se>
2005-07-01 14:39:25 GMT
2005-07-01 14:39:25 GMT
Cory Nelson wrote: > Here are some simple changes to file_win.cpp... > > line 60 should be changed to: > DWORD err = GetLastError(); > > And the rest cause the UNICODE portion to bring up compile errors: > > and line 67: > , 0, err, 0, (LPWSTR)&wbuffer, 0, 0); > > and line 70: > libtorrent::wchar_utf8(wbuffer, tmp_utf8); > > and line 71: > const char* buffer = tmp_utf8.c_str(); > > Also, assuming file_name is always in UTF-8, the non-UNICODE > CreateFile() call on line 135 would be incorrect - CreateFile expects > the name to be in the current locale. It should be converted to > wide-char and then to multi-byte with wcstombs. Thanks, applied and fixed. -- Arvid Norberg ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles,(Continue reading)
RSS Feed