Build fix for Qt win platforms when UNICODE defaults to wide chars.

This commit is contained in:
harry 2024-02-24 14:00:31 -05:00
parent f63ac15aa2
commit c14dd99efc
1 changed files with 2 additions and 2 deletions

View File

@ -397,7 +397,7 @@ protected:
// Open file with buffering so the exact byte size can be set // Open file with buffering so the exact byte size can be set
tgtOffs.QuadPart = fileOffs + buffOffs; tgtOffs.QuadPart = fileOffs + buffOffs;
file = CreateFile(fileName.c_str(), GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr); file = CreateFileA(fileName.c_str(), GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_EXISTING, 0, nullptr);
if (file != INVALID_HANDLE_VALUE) if (file != INVALID_HANDLE_VALUE)
{ {
if (!SetFilePointerEx(file, tgtOffs, &newOffs, FILE_BEGIN) if (!SetFilePointerEx(file, tgtOffs, &newOffs, FILE_BEGIN)
@ -410,7 +410,7 @@ protected:
lastErr = GetLastError(); lastErr = GetLastError();
// Finally, reopen the file in original mode // Finally, reopen the file in original mode
file = CreateFile(fileName.c_str(), GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_EXISTING, file = CreateFileA(fileName.c_str(), GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_EXISTING,
FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, nullptr); FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, nullptr);
if (file == INVALID_HANDLE_VALUE || lastErr) if (file == INVALID_HANDLE_VALUE || lastErr)
break; break;