Win32OperatingSystem.st
changeset 23150 047b878c8123
parent 23149 a98c7a9eac95
child 23257 7aaf6920019d
--- a/Win32OperatingSystem.st	Thu Jun 28 15:28:10 2018 +0200
+++ b/Win32OperatingSystem.st	Thu Jun 28 15:31:15 2018 +0200
@@ -6148,7 +6148,7 @@
     //    GetSystemWow64DirectoryW(&fileTime);
     // can be called directly.
     {
-	typedef VOID (WINAPI *P_GetSystemWow64DirectoryW)(LPTSTR, unsigned int);
+	typedef unsigned int (WINAPI *P_GetSystemWow64DirectoryW)(LPTSTR, unsigned int);
 	static P_GetSystemWow64DirectoryW pGetSystemWow64DirectoryW = NULL;
 	static int didCheck = 0;
 
@@ -6163,15 +6163,17 @@
 	    }
 	}
 
-	__rslt = (*pGetSystemWow64DirectoryW)(buffer, MAXPATHLEN);
+	if (pGetSystemWow64DirectoryW != NULL) {
+	    __rslt = nil;
+	} else {
+	    __rslt = (*pGetSystemWow64DirectoryW)(buffer, MAXPATHLEN);
+	}
     }
 #else
     __rslt = GetSystemWow64DirectoryW(buffer, MAXPATHLEN);
 #endif
-    if (__rslt == TRUE) {
+    if (__rslt != nil) {
 	rslt = __mkStringOrU16String_maxlen(buffer, MAXPATHLEN);
-    } else {
-	rslt = false;
     }
 %}.
     ^ rslt