friend with UNICODE macro on windows

This commit is contained in:
2022-12-07 09:33:46 +03:00
parent 3625627072
commit 0bd45ec49b
8 changed files with 26 additions and 26 deletions

View File

@@ -285,7 +285,7 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
if (dp == separator) {
char letters[1024];
PIFile::FileInfo fi;
DWORD ll = GetLogicalDriveStrings(1023, letters);
DWORD ll = GetLogicalDriveStringsA(1023, letters);
PIString clet;
for (DWORD i = 0; i < ll; ++i) {
if (letters[i] == '\0') {
@@ -298,9 +298,9 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
clet += PIChar(letters[i]);
}
} else {
WIN32_FIND_DATA fd; memset(&fd, 0, sizeof(fd));
WIN32_FIND_DATAA fd; memset(&fd, 0, sizeof(fd));
p += "\\*";
void * hf = FindFirstFile((LPCTSTR)(p.data()), &fd);
void * hf = FindFirstFileA((LPCSTR)(p.data()), &fd);
if (!hf) return l;
bool hdd = false;
do {
@@ -308,7 +308,7 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
if (fn == "..") hdd = true;
l << PIFile::fileInfo(dp + fn);
memset(&fd, 0, sizeof(fd));
} while (FindNextFile(hf, &fd) != 0);
} while (FindNextFileA(hf, &fd) != 0);
FindClose(hf);
l.sort(sort_compare);
if (!hdd) {