Changeset 31025 in vbox for trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
- Timestamp:
- Jul 22, 2010 11:43:25 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63945
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r31002 r31025 1298 1298 uint32_t cMappings = 64; /* See shflsvc.h for define; should be used later. */ 1299 1299 uint32_t cbMappings = cMappings * sizeof(VBGLR3SHAREDFOLDERMAPPING); 1300 VBGLR3SHAREDFOLDERMAPPING *p Mappings = (VBGLR3SHAREDFOLDERMAPPING*)RTMemAlloc(cbMappings);1301 1302 if (p Mappings)1300 VBGLR3SHAREDFOLDERMAPPING *paMappings = (PVBGLR3SHAREDFOLDERMAPPING)RTMemAlloc(cbMappings); 1301 1302 if (paMappings) 1303 1303 { 1304 1304 rc = VbglR3SharedFolderGetMappings(u32ClientId, fOnlyShowAutoMount, 1305 p Mappings, cbMappings,1305 paMappings, cbMappings, 1306 1306 &cMappings); 1307 1307 if (RT_SUCCESS(rc)) … … 1311 1311 for (uint32_t i = 0; i < cMappings; i++) 1312 1312 { 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); 1317 1315 if (RT_SUCCESS(rc)) 1318 1316 { 1319 RTPrintf("%02u - %s\n", i + 1, p pszName);1320 RTStrFree(p pszName);1317 RTPrintf("%02u - %s\n", i + 1, pszName); 1318 RTStrFree(pszName); 1321 1319 } 1322 1320 else 1323 1321 VBoxControlError("Error while getting the shared folder name for root node = %u, rc = %Rrc\n", 1324 p Mappings[i].u32Root, rc);1322 paMappings[i].u32Root, rc); 1325 1323 } 1326 1324 if (cMappings == 0) … … 1329 1327 else 1330 1328 VBoxControlError("Error while getting the shared folder mappings, rc = %Rrc\n", rc); 1331 RTMemFree(p Mappings);1329 RTMemFree(paMappings); 1332 1330 } 1333 1331 else
Note:
See TracChangeset
for help on using the changeset viewer.