overlapped |= FILE_FLAG_NO_BUFFERING;
if (!(flags & BDRV_O_CACHE_WB))
overlapped |= FILE_FLAG_WRITE_THROUGH;
- s->hfile = CreateFile(filename, access_flags,
+ s->hfile = CreateFile(g_win32_locale_filename_from_utf8(filename),
+ access_flags,
FILE_SHARE_READ, NULL,
OPEN_EXISTING, overlapped, NULL);
if (s->hfile == INVALID_HANDLE_VALUE) {
overlapped |= FILE_FLAG_NO_BUFFERING;
if (!(flags & BDRV_O_CACHE_WB))
overlapped |= FILE_FLAG_WRITE_THROUGH;
- s->hfile = CreateFile(filename, access_flags,
+ s->hfile = CreateFile(g_win32_locale_filename_from_utf8(filename),
+ access_flags,
FILE_SHARE_READ, NULL,
create_flags, overlapped, NULL);
if (s->hfile == INVALID_HANDLE_VALUE) {
TAPSUFFIX);
handle = CreateFile (
- device_path,
+ g_win32_locale_filename_from_utf8(device_path),
GENERIC_READ | GENERIC_WRITE,
0,
0,
BOOL ret;
memset(&overlap, 0, sizeof(overlap));
- file = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,
+ file = CreateFile(g_win32_locale_filename_from_utf8(filename), GENERIC_WRITE, FILE_SHARE_READ, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (file == INVALID_HANDLE_VALUE) {
goto fail;
}
- s->hcom = CreateFile(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL,
+ s->hcom = CreateFile(g_win32_locale_filename_from_utf8(filename),
+ GENERIC_READ|GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
if (s->hcom == INVALID_HANDLE_VALUE) {
fprintf(stderr, "Failed CreateFile (%lu)\n", GetLastError());
const char *file_out = qemu_opt_get(opts, "path");
HANDLE fd_out;
- fd_out = CreateFile(file_out, GENERIC_WRITE, FILE_SHARE_READ, NULL,
+ fd_out = CreateFile(g_win32_locale_filename_from_utf8(file_out), GENERIC_WRITE, FILE_SHARE_READ, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (fd_out == INVALID_HANDLE_VALUE) {
return -EIO;