VirtualBox

Changeset 23836 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Oct 16, 2009 10:36:52 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53594
Message:

VBoxClient/VBoxTray/VBgl: Windows build fixes.

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHostVersion.cpp

    r23835 r23836  
    3030int VBoxCheckHostVersion ()
    3131{
    32         int rc;
    33         char *pszHostVersion;
    34         char *pszGuestVersion;
    35         rc = VbglR3HostVersionCheckForUpdate(&pszHostVersion, &pszGuestVersion);
    36         if (RT_SUCCESS(rc))
    37         {
    38                 char szMsg[256]; /* Sizes according to MSDN. */
    39                 char szTitle[64];
     32    int rc;
     33    char *pszHostVersion;
     34    char *pszGuestVersion;
     35    rc = VbglR3HostVersionCheckForUpdate(&pszHostVersion, &pszGuestVersion);
     36    if (RT_SUCCESS(rc))
     37    {
     38        char szMsg[256]; /* Sizes according to MSDN. */
     39        char szTitle[64];
    4040
    41                 /** @todo add some translation macros here */
    42                 _snprintf(szTitle, sizeof(szTitle), "VirtualBox Guest Additions update available!");
    43                 _snprintf(szMsg, sizeof(szMsg), "Your guest is currently running the Guest Additions version %s. "
    44                                                                                 "We recommend updating to the latest version (%s) by choosing the "
    45                                                                                 "install option from the Devices menu.", pszGuestVersion, pszHostVersion);
     41        /** @todo add some translation macros here */
     42        _snprintf(szTitle, sizeof(szTitle), "VirtualBox Guest Additions update available!");
     43        _snprintf(szMsg, sizeof(szMsg), "Your guest is currently running the Guest Additions version %s. "
     44                                        "We recommend updating to the latest version (%s) by choosing the "
     45                                        "install option from the Devices menu.", pszGuestVersion, pszHostVersion);
    4646
    47                 rc = showBalloonTip(gInstance, gToolWindow, ID_TRAYICON, szMsg, szTitle, 5000, 0);
     47        rc = showBalloonTip(gInstance, gToolWindow, ID_TRAYICON, szMsg, szTitle, 5000, 0);
    4848        if (RT_FAILURE(rc))
    4949            Log(("VBoxTray: Could not show version notifier balloon tooltip! rc = %d\n", rc));
    5050
    51                 VbglR3GuestPropReadValueFree(pszHostVersion);
    52                 VbglR3GuestPropReadValueFree(pszGuestVersion);
    53         }
     51        VbglR3GuestPropReadValueFree(pszHostVersion);
     52        VbglR3GuestPropReadValueFree(pszGuestVersion);
     53    }
    5454
    5555    /* If we didn't have to check for the host version then this is not an error */
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r23835 r23836  
    2626#include <iprt/mem.h>
    2727#include <VBox/log.h>
    28 #ifdef RT_OS_WINDOWS
    29  #define WIN32_LEAN_AND_MEAN
    30  #include <windows.h>
    31 #endif
    32 
    3328#include "VBGLR3Internal.h"
    3429
     
    233228    {
    234229        /* Version. */
    235         dwSize = 32;
    236         pszVer = (char*)RTMemAlloc(dwSize);
     230        DWORD dwType;
     231        DWORD dwSize = 32;
     232        ppszVer = (char*)RTMemAlloc(dwSize);
    237233        rc = RegQueryValueEx(hKey, "Version", NULL, &dwType, (BYTE*)(LPCTSTR)*ppszVer, &dwSize);
    238234        /* Revision. */
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