VirtualBox

Ignore:
Timestamp:
Jul 22, 2010 11:43:25 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63945
Message:

Quick VbglR3SharedFolder* api review.

File:
1 edited

Legend:

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

    r31002 r31025  
    12981298        uint32_t cMappings = 64; /* See shflsvc.h for define; should be used later. */
    12991299        uint32_t cbMappings = cMappings * sizeof(VBGLR3SHAREDFOLDERMAPPING);
    1300         VBGLR3SHAREDFOLDERMAPPING *pMappings = (VBGLR3SHAREDFOLDERMAPPING*)RTMemAlloc(cbMappings);
    1301 
    1302         if (pMappings)
     1300        VBGLR3SHAREDFOLDERMAPPING *paMappings = (PVBGLR3SHAREDFOLDERMAPPING)RTMemAlloc(cbMappings);
     1301
     1302        if (paMappings)
    13031303        {
    13041304            rc = VbglR3SharedFolderGetMappings(u32ClientId, fOnlyShowAutoMount,
    1305                                                pMappings, cbMappings,
     1305                                               paMappings, cbMappings,
    13061306                                               &cMappings);
    13071307            if (RT_SUCCESS(rc))
     
    13111311                for (uint32_t i = 0; i < cMappings; i++)
    13121312                {
    1313                     char *ppszName = NULL;
    1314                     uint32_t pcbLen = 0;
    1315                     rc = VbglR3SharedFolderGetName(u32ClientId, pMappings[i].u32Root,
    1316                                                    &ppszName, &pcbLen);
     1313                    char *pszName;
     1314                    rc = VbglR3SharedFolderGetName(u32ClientId, paMappings[i].u32Root, &pszName);
    13171315                    if (RT_SUCCESS(rc))
    13181316                    {
    1319                         RTPrintf("%02u - %s\n", i + 1, ppszName);
    1320                         RTStrFree(ppszName);
     1317                        RTPrintf("%02u - %s\n", i + 1, pszName);
     1318                        RTStrFree(pszName);
    13211319                    }
    13221320                    else
    13231321                        VBoxControlError("Error while getting the shared folder name for root node = %u, rc = %Rrc\n",
    1324                                          pMappings[i].u32Root, rc);
     1322                                         paMappings[i].u32Root, rc);
    13251323                }
    13261324                if (cMappings == 0)
     
    13291327            else
    13301328                VBoxControlError("Error while getting the shared folder mappings, rc = %Rrc\n", rc);
    1331             RTMemFree(pMappings);
     1329            RTMemFree(paMappings);
    13321330        }
    13331331        else
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