Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/kernel32/registry.cpp

    r21302 r21916  
    7979}
    8080
     81extern "C" {
     82
    8183void WIN32API SetRegistryRootKey(HKEY hRootkey, HKEY hKey)
    8284{
    8385  switch((DWORD)hRootkey)
    8486  {
    85     case HKEY_CLASSES_ROOT:   
     87    case HKEY_CLASSES_ROOT:
    8688        hKeyClassesRoot = hKey;
    8789        break;
     
    112114LONG WIN32API RegCloseKey(HKEY hKey)
    113115{
    114     switch(hKey) 
     116    switch(hKey)
    115117    {//Closing a root key should just return success (matters for custom builds)
    116118    case HKEY_CLASSES_ROOT:
     
    166168                        astring,
    167169                        phkResult);
    168  
     170
    169171  if (NULL != astring)
    170172    FreeAsciiString(astring);
    171  
     173
    172174  return(rc);
    173175}
     
    247249                          phkResult,
    248250                          lpdwDisposition);
    249  
     251
    250252  if (NULL != astring1)
    251253    FreeAsciiString(astring1);
    252  
     254
    253255  if (NULL != astring2)
    254256    FreeAsciiString(astring2);
    255  
     257
    256258  return(rc);
    257259}
     
    278280  rc = O32_RegDeleteKey(ConvertKey(hKey),
    279281                        astring);
    280  
     282
    281283  if (NULL != astring)
    282284    FreeAsciiString(astring);
    283  
     285
    284286  return(rc);
    285287}
     
    317319 *****************************************************************************/
    318320
    319 LONG WIN32API RegDeleteValueA(HKEY hKey, LPSTR lpszValue)
     321LONG WIN32API RegDeleteValueA(HKEY hKey, LPCSTR lpszValue)
    320322{
    321323  return O32_RegDeleteValue(ConvertKey(hKey),
     
    336338 *****************************************************************************/
    337339
    338 LONG WIN32API RegDeleteValueW(HKEY hKey, LPWSTR lpszValue)
     340LONG WIN32API RegDeleteValueW(HKEY hKey, LPCWSTR lpszValue)
    339341{
    340342  char *astring = UnicodeToAsciiString(lpszValue);
     
    343345  rc = O32_RegDeleteValue(ConvertKey(hKey),
    344346                          astring);
    345  
     347
    346348  if (NULL != astring)
    347349    FreeAsciiString(astring);
    348  
     350
    349351  return(rc);
    350352}
     
    385387 *****************************************************************************/
    386388
    387 LONG WIN32API RegEnumKeyW(HKEY  hKey, DWORD  iSubKey, LPWSTR lpszName,                         
     389LONG WIN32API RegEnumKeyW(HKEY  hKey, DWORD  iSubKey, LPWSTR lpszName,
    388390                          DWORD cchName)
    389391{
     
    529531 * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
    530532 *****************************************************************************/
    531  
     533
    532534LONG WIN32API RegEnumValueW(HKEY    hkey,
    533535                            DWORD   iValue,
     
    638640  if(rc)
    639641    *arg3 = 0;
    640  
     642
    641643  if (NULL != astring)
    642644    FreeAsciiString(astring);
    643  
     645
    644646  return(rc);
    645647}
     
    705707  if(rc)
    706708    *arg5 = 0;
    707  
     709
    708710  if (NULL != astring)
    709711    FreeAsciiString(astring);
    710  
     712
    711713  return(rc);
    712714}
     
    741743                               lpcchClass, lpdwReserved, lpcSubKeys,
    742744                               lpcchMaxSubKey, lpcchMaxClass, lpcValues,
    743                                lpcchMaxValueName, lpcbMaxValueData, 
     745                               lpcchMaxValueName, lpcbMaxValueData,
    744746                               lpcbSecurityDescriptor,lpftLastWriteTime);
    745747}
     
    776778                             lpcchClass, lpdwReserved, lpcSubKeys,
    777779                             lpcchMaxSubKey, lpcchMaxClass, lpcValues,
    778                              lpcchMaxValueName, lpcbMaxValueData, 
     780                             lpcchMaxValueName, lpcbMaxValueData,
    779781                             lpcbSecurityDescriptor,lpftLastWriteTime);
    780782    if(rc == ERROR_SUCCESS)
     
    786788            free(astring);
    787789        }
    788         else 
     790        else
    789791        if(lpszClass) *lpszClass = 0;
    790792    }
     
    852854  }
    853855
    854   if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 
    855      pcbValue) 
     856  if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) &&
     857     pcbValue)
    856858  {
    857859      *pcbValue = *pcbValue * sizeof(WCHAR); //size in bytes!!
    858860  }
    859  
     861
    860862  if (NULL != astring1)
    861863    FreeAsciiString(astring1);
    862  
     864
    863865  return(rc);
    864866}
     
    986988  }
    987989
    988   if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 
    989      lpcbData) 
     990  if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) &&
     991     lpcbData)
    990992  {
    991993      switch(*lpdwType) {
     
    10011003  if (NULL != astring)
    10021004    FreeAsciiString(astring);
    1003  
     1005
    10041006  if(akeydata)
    10051007    free(akeydata);
     
    10731075
    10741076  rc = RegSetValueA(hkey, astring1, dwType, astring2, cbData);
    1075  
     1077
    10761078  if (NULL != astring1)
    10771079    FreeAsciiString(astring1);
    1078  
     1080
    10791081  if (NULL != astring2)
    10801082    FreeAsciiString(astring2);
    1081  
     1083
    10821084  return(rc);
    10831085}
     
    11001102                             DWORD  dwReserved,
    11011103                             DWORD  fdwType,
    1102                              BYTE*  lpbData,
     1104                             const BYTE *lpbData,
    11031105                             DWORD  cbData)
    11041106{
     
    11651167                             DWORD  dwReserved,
    11661168                             DWORD  fdwType,
    1167                              BYTE*  lpbData,
     1169                             const BYTE *lpbData,
    11681170                             DWORD  cbData)
    11691171{
     
    11841186  }
    11851187  rc = RegSetValueExA(hkey, astring, dwReserved, fdwType, lpbData, cbData);
    1186  
     1188
    11871189  if(akeydata)
    11881190    FreeAsciiString(akeydata);
    1189  
     1191
    11901192  if (NULL != astring)
    11911193    FreeAsciiString(astring);
    1192  
     1194
    11931195  return(rc);
    11941196}
     
    17151717}
    17161718
     1719} // extern "C"
     1720
Note: See TracChangeset for help on using the changeset viewer.