DEVTOOLS: Fix create_project compilation on Windows with UNICODE defined
This commit is contained in:
parent
339eb080aa
commit
99773ee204
1 changed files with 6 additions and 6 deletions
|
@ -1244,13 +1244,13 @@ int getInstalledMSVC() {
|
|||
// Use the registry to get the latest version
|
||||
if (latest == 0) {
|
||||
HKEY key;
|
||||
LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7", 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &key);
|
||||
LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7"), 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &key);
|
||||
if (err == ERROR_SUCCESS && key != NULL) {
|
||||
const MSVCList msvc = getAllMSVCVersions();
|
||||
for (MSVCList::const_reverse_iterator i = msvc.rbegin(); i != msvc.rend(); ++i) {
|
||||
std::ostringstream version;
|
||||
version << i->version << ".0";
|
||||
err = RegQueryValueEx(key, version.str().c_str(), NULL, NULL, NULL, NULL);
|
||||
err = RegQueryValueExA(key, version.str().c_str(), NULL, NULL, NULL, NULL);
|
||||
if (err == ERROR_SUCCESS) {
|
||||
latest = i->version;
|
||||
break;
|
||||
|
@ -1406,8 +1406,8 @@ bool compareNodes(const FileNode *l, const FileNode *r) {
|
|||
FileList listDirectory(const std::string &dir) {
|
||||
FileList result;
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
WIN32_FIND_DATA fileInformation;
|
||||
HANDLE fileHandle = FindFirstFile((dir + "/*").c_str(), &fileInformation);
|
||||
WIN32_FIND_DATAA fileInformation;
|
||||
HANDLE fileHandle = FindFirstFileA((dir + "/*").c_str(), &fileInformation);
|
||||
|
||||
if (fileHandle == INVALID_HANDLE_VALUE)
|
||||
return result;
|
||||
|
@ -1417,7 +1417,7 @@ FileList listDirectory(const std::string &dir) {
|
|||
continue;
|
||||
|
||||
result.push_back(FSNode(fileInformation.cFileName, (fileInformation.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0));
|
||||
} while (FindNextFile(fileHandle, &fileInformation) == TRUE);
|
||||
} while (FindNextFileA(fileHandle, &fileInformation) == TRUE);
|
||||
|
||||
FindClose(fileHandle);
|
||||
#else
|
||||
|
@ -1445,7 +1445,7 @@ FileList listDirectory(const std::string &dir) {
|
|||
|
||||
void createDirectory(const std::string &dir) {
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
if (!CreateDirectory(dir.c_str(), NULL)) {
|
||||
if (!CreateDirectoryA(dir.c_str(), NULL)) {
|
||||
if (GetLastError() != ERROR_ALREADY_EXISTS) {
|
||||
error("Could not create folder \"" + dir + "\"");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue