support unicode compiling
This commit is contained in:
@@ -60,7 +60,7 @@ namespace
|
|||||||
{
|
{
|
||||||
char *buffer=0;
|
char *buffer=0;
|
||||||
int err = GetLastError();
|
int err = GetLastError();
|
||||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, 0, err, 0, (LPSTR)&buffer, 0, 0);
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, 0, err, 0, (LPWSTR)(LPCSTR)&buffer, 0, 0);
|
||||||
|
|
||||||
auto_LocalFree auto_free(buffer); // needed for exception safety
|
auto_LocalFree auto_free(buffer); // needed for exception safety
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
@@ -107,7 +107,7 @@ namespace libtorrent
|
|||||||
assert(access_mask & (GENERIC_READ | GENERIC_WRITE));
|
assert(access_mask & (GENERIC_READ | GENERIC_WRITE));
|
||||||
|
|
||||||
HANDLE new_handle = CreateFile(
|
HANDLE new_handle = CreateFile(
|
||||||
file_name
|
(LPCWSTR)file_name
|
||||||
, access_mask
|
, access_mask
|
||||||
, FILE_SHARE_READ
|
, FILE_SHARE_READ
|
||||||
, 0
|
, 0
|
||||||
|
Reference in New Issue
Block a user