VirtualBox

Changeset 23839 in vbox


Ignore:
Timestamp:
Oct 17, 2009 8:21:39 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53597
Message:

VBoxClient/VBoxTray/VBgl: Windows build fixes.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk

    r23835 r23839  
    9898        VBoxGuestR3Lib.cpp \
    9999        VBoxGuestR3LibGR.cpp \
    100         $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.cpp,) \
     100        $(if $(VBOX_WITH_GUEST_PROPS), \
     101                VBoxGuestR3LibGuestProp.cpp \
     102                VBoxGuestR3LibHostVersion.cpp,) \
    101103        VBoxGuestR3LibMisc.cpp \
    102104        VBoxGuestR3LibTime.cpp
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostVersion.cpp

    r23837 r23839  
    4141 * @returns 0 if equal, 1 if Ver1 is greater, 2 if Ver2 is greater.
    4242 *
    43  * @param   pszVer1             First version string to compare.
     43 * @param   pszVer1     First version string to compare.
    4444 * @param   pszVer2     First version string to compare.
    4545 *
     
    146146                    LogFlow(("Update found."));
    147147                }
    148                 else rc = VERR_VERSION_MISMATCH; /* No update found. */
     148                else rc = VERR_VERSION_MISMATCH; /* No update found */
    149149            }
    150150        }
     
    153153    if (RT_FAILURE(rc))
    154154    {
    155         if (*ppszHostVersion)
    156             VbglR3GuestPropReadValueFree(*ppszHostVersion);
    157         if (*ppszGuestVersion)
    158             VbglR3GuestPropReadValueFree(*ppszGuestVersion);
     155        if (*ppszHostVersion)
     156            VbglR3GuestPropReadValueFree(*ppszHostVersion);
     157        if (*ppszGuestVersion)
     158            VbglR3GuestPropReadValueFree(*ppszGuestVersion);
    159159    }
    160160    return rc == VINF_SUCCESS ? true : false;
     
    171171    if (RT_FAILURE(rc))
    172172    {
    173     LogFlow(("Failed to connect to the guest property service! Error: %d\n", rc));
     173        LogFlow(("Failed to connect to the guest property service! Error: %d\n", rc));
    174174    }
    175175    else
    176176    {
    177177#ifdef RT_OS_WINDOWS
    178         HKEY hKey;
    179         long lRet;
    180         lRet = RegCreateKeyEx (HKEY_LOCAL_MACHINE,
    181                                                    "SOFTWARE\\Sun\\VirtualBox Guest Additions",
    182                                                    0,           /* Reserved */
    183                                                    NULL,        /* lpClass [in, optional] */
    184                                                    0,           /* dwOptions [in] */
    185                                                    KEY_WRITE,
    186                                                    NULL,        /* lpSecurityAttributes [in, optional] */
    187                                                    &hKey,
    188                                                    NULL);       /* lpdwDisposition [out, optional] */
    189         if (lRet == ERROR_SUCCESS)
    190         {
    191             lRet = RegSetValueEx(hKey, "HostVerLastChecked", 0, REG_SZ, (BYTE*)pszVBoxHostVer, (DWORD)(strlen(pszVBoxHostVer)*sizeof(char)));
    192             if (lRet != ERROR_SUCCESS)
    193                     LogFlow(("Could not write HostVerLastChecked! Error = %ld\n", lRet));
    194             RegCloseKey(hKey);
    195         }
    196         else
    197             LogFlow(("Could not open registry key! Error = %ld\n", lRet));
    198 
    199         if (lRet != ERROR_SUCCESS)
    200             rc = RTErrConvertFromWin32(lRet);
     178        HKEY hKey;
     179        long lRet;
     180        lRet = RegCreateKeyEx (HKEY_LOCAL_MACHINE,
     181                               "SOFTWARE\\Sun\\VirtualBox Guest Additions",
     182                               0,           /* Reserved */
     183                               NULL,        /* lpClass [in, optional] */
     184                               0,           /* dwOptions [in] */
     185                               KEY_WRITE,
     186                               NULL,        /* lpSecurityAttributes [in, optional] */
     187                               &hKey,
     188                               NULL);       /* lpdwDisposition [out, optional] */
     189        if (lRet == ERROR_SUCCESS)
     190        {
     191            lRet = RegSetValueEx(hKey, "HostVerLastChecked", 0, REG_SZ, (BYTE*)pszVer, (DWORD)(strlen(pszVer)*sizeof(char)));
     192            if (lRet != ERROR_SUCCESS)
     193                LogFlow(("Could not write HostVerLastChecked! Error = %ld\n", lRet));
     194            RegCloseKey(hKey);
     195        }
     196        else
     197            LogFlow(("Could not open registry key! Error = %ld\n", lRet));
     198   
     199        if (lRet != ERROR_SUCCESS)
     200            rc = RTErrConvertFromWin32(lRet);
    201201#else
    202202#endif
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r23838 r23839  
    235235        {
    236236            if (ERROR_SUCCESS == RegQueryValueEx(hKey, "Version", NULL, &dwType, (BYTE*)(LPCTSTR)pszVer, &dwSize))
    237                 ppszVer = pszVer;
     237                *ppszVer = pszVer;
    238238        }
    239239        /* Revision. */
     
    241241        {
    242242            dwSize = 32;
    243             char pszRev = (char*)RTMemAlloc(dwSize);
     243            char *pszRev = (char*)RTMemAlloc(dwSize);
    244244            if (ERROR_SUCCESS == RegQueryValueEx(hKey, "Revision", NULL, &dwType, (BYTE*)(LPCTSTR)pszRev, &dwSize))
    245                 ppszRev = pszRev;
     245                *ppszRev = pszRev;
    246246        }
    247247    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette