Changeset 9482 for trunk/src


Ignore:
Timestamp:
Dec 10, 2002, 7:52:16 PM (23 years ago)
Author:
sandervl
Message:

Closing a root key should just return success

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/registry.cpp

    r8762 r9482  
    1 /* $Id: registry.cpp,v 1.18 2002-06-25 10:27:00 sandervl Exp $ */
     1/* $Id: registry.cpp,v 1.19 2002-12-10 18:52:16 sandervl Exp $ */
    22
    33/*
     
    112112LONG WIN32API RegCloseKey(HKEY hKey)
    113113{
    114   return O32_RegCloseKey(ConvertKey(hKey));
     114    switch(hKey)
     115    {//Closing a root key should just return success (matters for custom builds)
     116    case HKEY_CLASSES_ROOT:
     117    case HKEY_CURRENT_USER:
     118    case HKEY_LOCAL_MACHINE:
     119    case HKEY_USERS:
     120        return 0;
     121    }
     122    return O32_RegCloseKey(ConvertKey(hKey));
    115123}
    116124
     
    842850            free(astring2);
    843851    }
     852  }
     853
     854  if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) &&
     855     lpszValue == NULL && pcbValue)
     856  {
     857      *pcbValue = *pcbValue * sizeof(WCHAR); //size in bytes!!
    844858  }
    845859 
     
    971985      }
    972986  }
    973  
     987
     988  if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) &&
     989     lpbData == NULL && lpcbData)
     990  {
     991      switch(*lpdwType) {
     992      case REG_SZ:
     993      case REG_EXPAND_SZ:
     994      case REG_MULTI_SZ:
     995      case REG_LINK: //???
     996          *lpcbData = *lpcbData * sizeof(WCHAR); //size in bytes!!
     997          break;
     998      }
     999  }
     1000
    9741001  if (NULL != astring)
    9751002    FreeAsciiString(astring);
Note: See TracChangeset for help on using the changeset viewer.