Win32OperatingSystem.st
changeset 13780 2f055d86569e
parent 13778 8e34483d10dd
child 13786 c7b1422f915d
--- a/Win32OperatingSystem.st	Fri Oct 07 18:36:52 2011 +0200
+++ b/Win32OperatingSystem.st	Fri Oct 07 18:38:05 2011 +0200
@@ -5094,10 +5094,10 @@
 #ifdef DO_WRAP_CALLS
      do {
 	 __threadErrno = 0;
-	 ret = STX_API_NOINT_CALL3( "GetLongPathNameW", GetLongPathNameW, _aPathName, _aPathName, MAXPATHLEN+1);
+	 ret = STX_API_NOINT_CALL3( "GetLongPathNameW", GetLongPathNameW, _aPathName, _aPathName, MAXPATHLEN);
      } while ((ret == 0) && (__threadErrno == EINTR));
 #else
-     ret = GetLongPathNameW(_aPathName, _aPathName, MAXPATHLEN+1);
+     ret = GetLongPathNameW(_aPathName, _aPathName, MAXPATHLEN);
      if (ret == 0) {
 	 __threadErrno = __WIN32_ERR(GetLastError());
      }
@@ -5152,10 +5152,10 @@
 #ifdef DO_WRAP_CALLS
      do {
 	 __threadErrno = 0;
-	 ret = STX_API_NOINT_CALL3( "GetShortPathNameW", GetShortPathNameW, _aPathName, _aPathName, MAXPATHLEN+1);
+	 ret = STX_API_NOINT_CALL3( "GetShortPathNameW", GetShortPathNameW, _aPathName, _aPathName, MAXPATHLEN);
      } while ((ret == 0) && (__threadErrno == EINTR));
 #else
-     ret = GetShortPathNameW(_aPathName, _aPathName, MAXPATHLEN+1);
+     ret = GetShortPathNameW(_aPathName, _aPathName, MAXPATHLEN);
      if (ret == 0) {
 	 __threadErrno = __WIN32_ERR(GetLastError());
      }
@@ -8302,7 +8302,7 @@
      On non-windows systems, nil is returned."
 
 %{
-    char buffer[MAXPATHLEN];
+    char buffer[MAXPATHLEN+1];
 
     if (GetWindowsDirectory(buffer, MAXPATHLEN)) {
 	RETURN (__MKSTRING(buffer));
@@ -8323,7 +8323,7 @@
      On non-windows systems, nil is returned."
 
 %{
-    char buffer[MAXPATHLEN];
+    char buffer[MAXPATHLEN+1];
 
     if (GetSystemDirectory(buffer, MAXPATHLEN)) {
 	RETURN (__MKSTRING(buffer));
@@ -14056,7 +14056,7 @@
     if (__isExternalAddressLike(__INST(handle))
      && __isStringLike(subKeyString)) {
 	myKey = (HKEY)__externalAddressVal(__INST(handle));
-	if ((_retVal = RegCreateKey(myKey, __stringVal(subKeyString), &subKey)) == ERROR_SUCCESS) {
+	if ((_retVal = RegCreateKeyA(myKey, __stringVal(subKeyString), &subKey)) == ERROR_SUCCESS) {
 	    subHandle = __MKEXTERNALADDRESS(subKey);
 	} else {
 	    if ((_retVal != ERROR_PATH_NOT_FOUND)
@@ -14099,7 +14099,7 @@
     if (__isExternalAddressLike(__INST(handle))
      && __isStringLike(subKeyString)) {
 	myKey = (HKEY)__externalAddressVal(__INST(handle));
-	if ((_retVal = RegDeleteKey(myKey, __stringVal(subKeyString))) == ERROR_SUCCESS) {
+	if ((_retVal = RegDeleteKeyA(myKey, __stringVal(subKeyString))) == ERROR_SUCCESS) {
 	    RETURN (true);
 	}
 	if ((_retVal != ERROR_PATH_NOT_FOUND)
@@ -14245,7 +14245,7 @@
     if (__isExternalAddressLike(__INST(handle))
      && __isStringLike(subKeyString)) {
 	myKey = (HKEY)__externalAddressVal(__INST(handle));
-	_retVal = RegOpenKey(myKey, __stringVal(subKeyString), &subKey);
+	_retVal = RegOpenKeyA(myKey, __stringVal(subKeyString), &subKey);
 	if (_retVal == ERROR_SUCCESS) {
 	    subHandle = __MKEXTERNALADDRESS(subKey);
 	} else {
@@ -14333,7 +14333,7 @@
     if (__isExternalAddressLike(__INST(handle))
      && __isStringLike(aValueName)) {
 	myKey = (HKEY)__externalAddressVal(__INST(handle));
-	if ((_retVal = RegDeleteValue(myKey, __stringVal(aValueName))) == ERROR_SUCCESS) {
+	if ((_retVal = RegDeleteValueA(myKey, __stringVal(aValueName))) == ERROR_SUCCESS) {
 	    RETURN (true);
 	}
 	if ((_retVal != ERROR_PATH_NOT_FOUND)
@@ -16432,12 +16432,12 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.428 2011-10-07 13:57:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.429 2011-10-07 16:38:05 cg Exp $'
 !
 
 version_CVS
 
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.428 2011-10-07 13:57:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.429 2011-10-07 16:38:05 cg Exp $'
 !
 
 version_SVN