VirtualBox

Changeset 23575 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 6, 2009 8:23:38 AM (15 years ago)
Author:
vboxsync
Message:

VBoxService: Fixed GEN_IO_FAILURE, naming cleanup.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp

    r23248 r23575  
    137137    void   *pvBuf = NULL;
    138138    int     rc;
    139 
    140139    *ppszValue = NULL;
     140
     141    char *pszPropNameUTF8;
     142    rc = RTStrCurrentCPToUtf8(&pszPropNameUTF8, pszPropName);
     143    if (RT_FAILURE(rc))
     144    {
     145        VBoxServiceError("Exec: Failed to convert property name \"%s\" to UTF-8!\n", pszPropName);
     146        return rc;
     147    }
    141148
    142149    for (unsigned cTries = 0; cTries < 10; cTries++)
     
    156163        char    *pszFlags;
    157164        uint64_t uTimestamp;
    158         rc = VbglR3GuestPropRead(g_uExecGuestPropSvcClientID, pszPropName,
     165        rc = VbglR3GuestPropRead(g_uExecGuestPropSvcClientID, pszPropNameUTF8,
    159166                                 pvBuf, cbBuf,
    160167                                 &pszValue, &uTimestamp, &pszFlags, NULL);
     
    200207        break; /* done */
    201208    }
    202 
    203209    RTMemFree(pvBuf);
     210    RTStrFree(pszPropNameUTF8);
    204211    return rc;
    205212}
     
    399406                                     * Store the result in Set return value so the host knows what happend.
    400407                                     */
    401                                     rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID,
    402                                                                     "/VirtualBox/HostGuest/SysprepRet",
    403                                                                     "%d", Status.iStatus);
     408                                    rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID,
     409                                                               "/VirtualBox/HostGuest/SysprepRet",
     410                                                               "%d", Status.iStatus);
    404411                                    if (RT_FAILURE(rc))
    405412                                        VBoxServiceError("Exec: Failed to write SysprepRet: rc=%Rrc\n", rc);
     
    446453            if (rc != VERR_NOT_FOUND)
    447454            {
    448                 rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc);
     455                rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc);
    449456                if (RT_FAILURE(rc))
    450457                    VBoxServiceError("Exec: Failed to write SysprepVBoxRC: rc=%Rrc\n", rc);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceInternal.h

    r22744 r23575  
    148148#ifdef VBOX_WITH_GUEST_PROPS
    149149/** Detects wheter a user is logged on based on the enumerated processes. */
    150 extern BOOL VboxServiceVMInfoWinIsLoggedIn(VBOXSERVICEVMINFOUSER* a_pUserInfo,
     150extern BOOL VBoxServiceVMInfoWinIsLoggedIn(VBOXSERVICEVMINFOUSER* a_pUserInfo,
    151151                                           PLUID a_pSession,
    152152                                           PLUID a_pLuid,
    153153                                           DWORD a_dwNumOfProcLUIDs);
    154154/** Gets logon user IDs from enumerated processes. */
    155 extern DWORD VboxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid);
     155extern DWORD VBoxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid);
    156156#endif /* VBOX_WITH_GUEST_PROPS */
    157157#endif /* RT_OS_WINDOWS */
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp

    r22728 r23575  
    3737
    3838#ifdef VBOX_WITH_GUEST_PROPS
    39 int VboxServiceWriteProp(uint32_t uiClientID, const char *pszKey, const char *pszValue)
    40 {
    41     int rc = VINF_SUCCESS;
    42     Assert(pszKey);
    43     /* Not checking for a valid pszValue is intentional. */
    44 
    45     char szKeyTemp [FILENAME_MAX] = {0};
    46     char *pszValueTemp = NULL;
    47 
    48     /* Append base path. */
    49     RTStrPrintf(szKeyTemp, sizeof(szKeyTemp), "/VirtualBox/%s", pszKey); /** @todo r=bird: Why didn't you hardcode this into the strings before calling this function? */
    50 
    51     if (pszValue != NULL)
    52     {
    53         rc = RTStrCurrentCPToUtf8(&pszValueTemp, pszValue);
    54         if (!RT_SUCCESS(rc))
    55         {
    56             VBoxServiceError("vboxVMInfoThread: Failed to convert the value name \"%s\" to Utf8! Error: %Rrc\n", pszValue, rc);
    57             goto cleanup;
    58         }
    59     }
    60 
    61     rc = VbglR3GuestPropWriteValue(uiClientID, szKeyTemp, ((pszValue == NULL) || (0 == strlen(pszValue))) ? NULL : pszValueTemp);
    62     if (!RT_SUCCESS(rc))
    63     {
    64         VBoxServiceError("Failed to store the property \"%s\"=\"%s\"! ClientID: %d, Error: %Rrc\n", szKeyTemp, pszValueTemp, uiClientID, rc);
    65         goto cleanup;
    66     }
    67 
    68     if ((pszValueTemp != NULL) && (strlen(pszValueTemp) > 0))
    69         VBoxServiceVerbose(3, "Property written: %s = %s\n", szKeyTemp, pszValueTemp);
    70     else
    71         VBoxServiceVerbose(3, "Property deleted: %s\n", szKeyTemp);
    72 
    73 cleanup:
    74 
    75     RTStrFree(pszValueTemp);
     39int VBoxServiceWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...)
     40{
     41    char *pszNameUTF8;
     42    int rc = RTStrCurrentCPToUtf8(&pszNameUTF8, pszName);
     43    if (RT_SUCCESS(rc))
     44    {
     45        if (pszValueFormat != NULL)
     46        {
     47            va_list va;
     48            va_start(va, pszValueFormat);
     49            VBoxServiceVerbose(3, "Writing guest property \"%s\"=\"%s\"\n", pszNameUTF8, pszValueFormat);
     50            rc = VbglR3GuestPropWriteValueV(u32ClientId, pszNameUTF8, pszValueFormat, va);
     51            if(RT_FAILURE(rc))
     52                 VBoxServiceError("Error writing guest property \"%s\"=\"%s\" (rc=%Rrc)\n", pszNameUTF8, pszValueFormat, rc);
     53            va_end(va);
     54        }
     55        else
     56            rc = VbglR3GuestPropWriteValue(u32ClientId, pszNameUTF8, NULL);
     57        RTStrFree(pszNameUTF8);
     58    }
    7659    return rc;
    7760}
    78 
    79 
    80 int VboxServiceWritePropInt(uint32_t uiClientID, const char *pszKey, int32_t iValue)
    81 {
    82     Assert(pszKey);
    83 
    84     char szBuffer[32] = {0};
    85     RTStrPrintf(szBuffer, sizeof(szBuffer), "%ld", iValue);
    86     return VboxServiceWriteProp(uiClientID, pszKey, szBuffer);
    87 }
    8861#endif /* VBOX_WITH_GUEST_PROPS */
    8962
    9063
    9164#ifdef RT_OS_WINDOWS
    92 BOOL VboxServiceGetFileString(const char* pszFileName,
     65BOOL VBoxServiceGetFileString(const char* pszFileName,
    9366                              char* pszBlock,
    9467                              char* pszString,
     
    146119
    147120
    148 BOOL VboxServiceGetFileVersion(const char* pszFileName,
     121BOOL VBoxServiceGetFileVersion(const char* pszFileName,
    149122                               DWORD* pdwMajor,
    150123                               DWORD* pdwMinor,
     
    174147    int r = 0;
    175148
    176     bRet = VboxServiceGetFileString(pszFileName, "\\StringFileInfo\\040904b0\\FileVersion", szValue, &uiSize);
     149    bRet = VBoxServiceGetFileString(pszFileName, "\\StringFileInfo\\040904b0\\FileVersion", szValue, &uiSize);
    177150    if (bRet)
    178151    {
     
    208181
    209182
    210 BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize)
     183BOOL VBoxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize)
    211184{
    212185    BOOL bRet = FALSE;
     
    219192    DWORD dwMajor, dwMinor, dwBuild, dwRev;
    220193
    221     bRet = VboxServiceGetFileVersion(szFullPath, &dwMajor, &dwMinor, &dwBuild, &dwRev);
     194    bRet = VBoxServiceGetFileVersion(szFullPath, &dwMajor, &dwMinor, &dwBuild, &dwRev);
    222195    if (bRet)
    223196        RTStrPrintf(pszVersion, uiSize, "%ld.%ld.%ldr%ld", dwMajor, dwMinor, dwBuild, dwRev);
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.h

    r22728 r23575  
    2626
    2727#ifdef VBOX_WITH_GUEST_PROPS
    28 int VboxServiceWritePropInt(uint32_t uiClientID, const char *pszKey, int iValue);
    29 int VboxServiceWriteProp(uint32_t uiClientID, const char *pszKey, const char *pszValue);
     28int VBoxServiceWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...);
    3029#endif
    3130#ifdef RT_OS_WINDOWS
    3231/** Gets a pre-formatted version string from the VS_FIXEDFILEINFO table. */
    33 BOOL VboxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize);
     32BOOL VBoxServiceGetFileVersionString(const char* pszPath, const char* pszFileName, char* pszVersion, UINT uiSize);
    3433#endif
    3534
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp

    r22840 r23575  
    5454#ifndef TARGET_NT4
    5555/* Function GetLUIDsFromProcesses() written by Stefan Kuhr. */
    56 DWORD VboxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid)
     56DWORD VBoxServiceVMInfoWinGetLUIDsFromProcesses(PLUID *ppLuid)
    5757{
    5858    DWORD dwSize, dwSize2, dwIndex ;
     
    166166}
    167167
    168 BOOL VboxServiceVMInfoWinIsLoggedIn(VBOXSERVICEVMINFOUSER* a_pUserInfo,
     168BOOL VBoxServiceVMInfoWinIsLoggedIn(VBOXSERVICEVMINFOUSER* a_pUserInfo,
    169169                                    PLUID a_pSession,
    170170                                    PLUID a_pLuid,
     
    330330#endif /* TARGET_NT4 */
    331331
    332 int VboxServiceWinGetAddsVersion(uint32_t uiClientID)
     332int VBoxServiceWinGetAddsVersion(uint32_t uiClientID)
    333333{
    334334    char szInstDir[_MAX_PATH] = {0};
     
    401401
    402402    /* Write information to host. */
    403     VboxServiceWriteProp(uiClientID, "GuestAdd/InstallDir", szInstDir);
    404     VboxServiceWriteProp(uiClientID, "GuestAdd/Revision", szRev);
    405     VboxServiceWriteProp(uiClientID, "GuestAdd/Version", szVer);
     403    rc = VBoxServiceWritePropF(uiClientID, "/VirtualBox/GuestAdd/InstallDir", szInstDir);
     404    rc = VBoxServiceWritePropF(uiClientID, "/VirtualBox/GuestAdd/Revision", szRev);
     405    rc = VBoxServiceWritePropF(uiClientID, "/VirtualBox/GuestAdd/Version", szVer);
    406406
    407407    if (NULL != hKey)
     
    411411}
    412412
    413 int VboxServiceWinGetComponentVersions(uint32_t uiClientID)
     413int VBoxServiceWinGetComponentVersions(uint32_t uiClientID)
    414414{
    415415    int rc;
     
    492492    while (pTable->pszFileName)
    493493    {
    494         rc = VboxServiceGetFileVersionString(pTable->pszFilePath, pTable->pszFileName, szVer, sizeof(szVer));
    495         RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestAdd/Components/%s", pTable->pszFileName);
    496         VboxServiceWriteProp(uiClientID, szPropPath, szVer);
     494        rc = VBoxServiceGetFileVersionString(pTable->pszFilePath, pTable->pszFileName, szVer, sizeof(szVer));
     495        RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestAdd/Components/%s", pTable->pszFileName);
     496        rc = VBoxServiceWritePropF(uiClientID, szPropPath, szVer);
    497497        pTable++;
    498498    }
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp

    r22728 r23575  
    7373fnWTSGetActiveConsoleSessionId g_pfnWTSGetActiveConsoleSessionId = NULL;
    7474/** External functions. */
    75 extern int VboxServiceWinGetAddsVersion(uint32_t uiClientID);
    76 extern int VboxServiceWinGetComponentVersions(uint32_t uiClientID);
     75extern int VBoxServiceWinGetAddsVersion(uint32_t uiClientID);
     76extern int VBoxServiceWinGetComponentVersions(uint32_t uiClientID);
    7777#endif
    7878
     
    159159    char szInfo[256] = {0};
    160160    rc = RTSystemQueryOSInfo(RTSYSOSINFO_PRODUCT, szInfo, sizeof(szInfo));
    161     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/Product", szInfo);
     161    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Product", szInfo);
    162162
    163163    rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo));
    164     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/Release", szInfo);
     164    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Release", szInfo);
    165165
    166166    rc = RTSystemQueryOSInfo(RTSYSOSINFO_VERSION, szInfo, sizeof(szInfo));
    167     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/Version", szInfo);
     167    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/Version", szInfo);
    168168
    169169    rc = RTSystemQueryOSInfo(RTSYSOSINFO_SERVICE_PACK, szInfo, sizeof(szInfo));
    170     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/ServicePack", szInfo);
     170    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/ServicePack", szInfo);
    171171
    172172    /* Retrieve version information about Guest Additions and installed files (components). */
    173173#ifdef RT_OS_WINDOWS
    174     rc = VboxServiceWinGetAddsVersion(g_VMInfoGuestPropSvcClientID);
    175     rc = VboxServiceWinGetComponentVersions(g_VMInfoGuestPropSvcClientID);
    176 #else
    177     /* VboxServiceGetAddsVersion !RT_OS_WINDOWS */
    178     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestAdd/Version", VBOX_VERSION_STRING);
     174    rc = VBoxServiceWinGetAddsVersion(g_VMInfoGuestPropSvcClientID);
     175    rc = VBoxServiceWinGetComponentVersions(g_VMInfoGuestPropSvcClientID);
     176#else
     177    /* VBoxServiceGetAddsVersion !RT_OS_WINDOWS */
     178    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Version", VBOX_VERSION_STRING);
    179179
    180180    char szRevision[32];
    181181    RTStrPrintf(szRevision, sizeof(szRevision), "%u", VBOX_SVN_REV);
    182     VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestAdd/Revision", szRevision);
     182    VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestAdd/Revision", szRevision);
    183183#endif
    184184
     
    211211
    212212        PLUID pLuid = NULL;
    213         DWORD dwNumOfProcLUIDs = VboxServiceVMInfoWinGetLUIDsFromProcesses(&pLuid);
     213        DWORD dwNumOfProcLUIDs = VBoxServiceVMInfoWinGetLUIDsFromProcesses(&pLuid);
    214214
    215215        VBOXSERVICEVMINFOUSER userInfo;
     
    218218        for (int i = 0; i<(int)ulCount; i++)
    219219        {
    220             if (VboxServiceVMInfoWinIsLoggedIn(&userInfo, &pSessions[i], pLuid, dwNumOfProcLUIDs))
     220            if (VBoxServiceVMInfoWinIsLoggedIn(&userInfo, &pSessions[i], pLuid, dwNumOfProcLUIDs))
    221221            {
    222222                if (uiUserCount > 0)
     
    263263#endif /* !RT_OS_WINDOWS */
    264264
    265         VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsersList", (uiUserCount > 0) ? szUserList : NULL);
    266         VboxServiceWritePropInt(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsers", uiUserCount);
     265        VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsersList", (uiUserCount > 0) ? szUserList : NULL);
     266        VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsers", "%u", uiUserCount);
    267267        if (g_VMInfoLoggedInUsers != uiUserCount || g_VMInfoLoggedInUsers == UINT32_MAX)
    268268        {
     
    272272             * settings even if the VM aborted previously. */
    273273            if (uiUserCount == 0)
    274                 VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/NoLoggedInUsers", "true");
     274                VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "true");
    275275            else if (g_VMInfoLoggedInUsers == 0)
    276                 VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/NoLoggedInUsers", "false");
     276                VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "false");
    277277        }
    278278        g_VMInfoLoggedInUsers = uiUserCount;
     
    327327        nNumInterfaces = ifcfg.ifc_len / sizeof(ifreq);
    328328#endif
    329         char szPropPath [FILENAME_MAX] = {0};
    330         char szTemp [FILENAME_MAX] = {0};
     329        char szPropPath [FILENAME_MAX];
     330        char szTemp [FILENAME_MAX];
    331331        int iCurIface = 0;
    332332
    333         RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/Count");
    334         VboxServiceWritePropInt(g_VMInfoGuestPropSvcClientID, szPropPath, (nNumInterfaces > 1 ? nNumInterfaces-1 : 0));
     333        VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/Net/Count", "%d", (nNumInterfaces > 1 ? nNumInterfaces-1 : 0));
    335334
    336335        /** @todo Use GetAdaptersInfo() and GetAdapterAddresses (IPv4 + IPv6) for more information. */
     
    356355#endif
    357356            Assert(pAddress);
    358             RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/IP", iCurIface);
    359             VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, szPropPath, inet_ntoa(pAddress->sin_addr));
     357            RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/IP", iCurIface);
     358            VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, "%s", inet_ntoa(pAddress->sin_addr));
    360359
    361360#ifdef RT_OS_WINDOWS
     
    369368            pAddress = (sockaddr_in *)&ifrequest[i].ifr_broadaddr;
    370369#endif
    371             RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/Broadcast", iCurIface);
    372             VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, szPropPath, inet_ntoa(pAddress->sin_addr));
     370            RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/Broadcast", iCurIface);
     371            VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, inet_ntoa(pAddress->sin_addr));
    373372
    374373#ifdef RT_OS_WINDOWS
     
    387386
    388387#endif
    389             RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/Netmask", iCurIface);
    390             VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, szPropPath, inet_ntoa(pAddress->sin_addr));
     388            RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/V4/Netmask", iCurIface);
     389            VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, inet_ntoa(pAddress->sin_addr));
    391390
    392391             if (nFlags & IFF_UP)
     
    395394                RTStrPrintf(szTemp, sizeof(szTemp), "Down");
    396395
    397             RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/Status", iCurIface);
    398             VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, szPropPath, szTemp);
     396            RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%d/Status", iCurIface);
     397            VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, szPropPath, szTemp);
    399398
    400399            iCurIface++;
     
    456455         *        a more formal way of shutting down the service for that to work.
    457456         */
    458         rc = VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsersList", NULL);
    459         rc = VboxServiceWritePropInt(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/LoggedInUsers", 0);
     457        rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsersList", NULL);
     458        rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/LoggedInUsers", "%d", 0);
    460459        if (g_VMInfoLoggedInUsers > 0)
    461             VboxServiceWriteProp(g_VMInfoGuestPropSvcClientID, "GuestInfo/OS/NoLoggedInUsers", "true");
     460            VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/OS/NoLoggedInUsers", "true");
    462461
    463462        const char *apszPat[1] = { "/VirtualBox/GuestInfo/Net/*" };
    464463        rc = VbglR3GuestPropDelSet(g_VMInfoGuestPropSvcClientID, &apszPat[0], RT_ELEMENTS(apszPat));
    465         rc = VboxServiceWritePropInt(g_VMInfoGuestPropSvcClientID, "GuestInfo/Net/Count", 0);
     464        rc = VBoxServiceWritePropF(g_VMInfoGuestPropSvcClientID, "/VirtualBox/GuestInfo/Net/Count", "%d", 0);
    466465
    467466        /* Disconnect from guest properties service. */
Note: See TracChangeset for help on using the changeset viewer.

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