Changeset 49761 in vbox
- Timestamp:
- Dec 3, 2013 6:34:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r49760 r49761 509 509 //////////////////////////////////////////////////////////////////////////////// 510 510 // 511 // I Snapshot public methods511 // IHost public methods 512 512 // 513 513 //////////////////////////////////////////////////////////////////////////////// … … 516 516 * Returns a list of host DVD drives. 517 517 * 518 * @returns status code518 * @returns COM status code 519 519 * @param drives address of result pointer 520 520 */ … … 542 542 * Returns a list of host floppy drives. 543 543 * 544 * @returns status code544 * @returns COM status code 545 545 * @param drives address of result pointer 546 546 */ … … 572 572 INetCfgComponent *pncc) 573 573 { 574 LPWSTR 575 GUID 574 LPWSTR lpszName; 575 GUID IfGuid; 576 576 HRESULT hr; 577 577 int rc = VERR_GENERAL_FAILURE; … … 612 612 * Returns a list of host network interfaces. 613 613 * 614 * @returns status code614 * @returns COM status code 615 615 * @param drives address of result pointer 616 616 */ … … 618 618 { 619 619 aNetworkInterfaces.resize(0); 620 #if defined(RT_OS_WINDOWS) || 620 #if defined(RT_OS_WINDOWS) || defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/ 621 621 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 622 622 # ifdef VBOX_WITH_HOSTNETIF_API … … 809 809 for (size_t i = 0; i < resultArr.size(); ++i) 810 810 { 811 ComObjPtr<IHostUSBDevice> iHu = static_cast<IHostUSBDevice *>(resultArr[i]);811 ComObjPtr<IHostUSBDevice> iHu = resultArr[i]; 812 812 iHu.queryInterfaceTo(aUSBDevices[i].asOutParam()); 813 813 } … … 913 913 * Returns the number of installed logical processors 914 914 * 915 * @returns status code915 * @returns COM status code 916 916 * @param count address of result variable 917 917 */ … … 928 928 * Returns the number of online logical processors 929 929 * 930 * @returns status code930 * @returns COM status code 931 931 * @param count address of result variable 932 932 */ … … 942 942 * Returns the number of installed physical processor cores. 943 943 * 944 * @returns status code944 * @returns COM status code 945 945 * @param count address of result variable 946 946 */ … … 956 956 * Returns the number of installed physical processor cores. 957 957 * 958 * @returns status code958 * @returns COM status code 959 959 * @param count address of result variable 960 960 */ … … 970 970 * Returns the (approximate) maximum speed of the given host CPU in MHz 971 971 * 972 * @returns status code972 * @returns COM status code 973 973 * @param cpu id to get info for. 974 974 * @param speed address of result variable, speed is 0 if unknown or aCpuId is invalid. … … 986 986 * Returns a description string for the host CPU 987 987 * 988 * @returns status code988 * @returns COM status code 989 989 * @param cpu id to get info for. 990 990 * @param description address of result variable, empty string if not known or aCpuId is invalid. 991 991 */ 992 HRESULT 992 HRESULT Host::getProcessorDescription(ULONG aCpuId, com::Utf8Str &aDescription) 993 993 { 994 994 // no locking required … … 1006 1006 * Returns whether a host processor feature is supported or not 1007 1007 * 1008 * @returns status code1008 * @returns COM status code 1009 1009 * @param Feature to query. 1010 1010 * @param address of supported bool result variable 1011 1011 */ 1012 HRESULT 1012 HRESULT Host::getProcessorFeature(ProcessorFeature_T aFeature, BOOL *aSupported) 1013 1013 { 1014 1014 /* Validate input. */ … … 1092 1092 * Returns the specific CPUID leaf. 1093 1093 * 1094 * @returns status code1094 * @returns COM status code 1095 1095 * @param aCpuId The CPU number. Mostly ignored. 1096 1096 * @param aLeaf The leaf number. … … 1126 1126 * Returns the amount of installed system memory in megabytes 1127 1127 * 1128 * @returns status code1128 * @returns COM status code 1129 1129 * @param size address of result variable 1130 1130 */ … … 1144 1144 * Returns the current system memory free space in megabytes 1145 1145 * 1146 * @returns status code1146 * @returns COM status code 1147 1147 * @param available address of result variable 1148 1148 */ … … 1162 1162 * Returns the name string of the host operating system 1163 1163 * 1164 * @returns status code1164 * @returns COM status code 1165 1165 * @param os address of result variable 1166 1166 */ … … 1180 1180 * Returns the version string of the host operating system 1181 1181 * 1182 * @returns status code1182 * @returns COM status code 1183 1183 * @param os address of result variable 1184 1184 */ … … 1215 1215 * Returns the current host time in milliseconds since 1970-01-01 UTC. 1216 1216 * 1217 * @returns status code1217 * @returns COM status code 1218 1218 * @param time address of result variable 1219 1219 */ … … 1265 1265 /* No need to lock anything. If there ever will - watch out, the function 1266 1266 * called below grabs the VirtualBox lock. */ 1267 IHostNetworkInterface *iHn = static_cast<IHostNetworkInterface *>(aHostInterface);1268 IProgress *iHn2 = static_cast<IProgress *>(aProgress);1267 IHostNetworkInterface *iHn = aHostInterface; 1268 IProgress *iHn2 = aProgress; 1269 1269 1270 1270 int r = NetIfCreateHostOnlyNetworkInterface(m->pParent, &iHn, &iHn2); … … 1324 1324 { 1325 1325 ComPtr<IHostNetworkInterface> iface; 1326 rc 1326 rc = findHostNetworkInterfaceById(aId, iface); 1327 1327 if (FAILED(rc)) 1328 1328 return setError(VBOX_E_OBJECT_NOT_FOUND, … … 1333 1333 } 1334 1334 1335 IProgress *iPr = static_cast<IProgress *>(aProgress);1335 IProgress *iPr = aProgress; 1336 1336 1337 1337 int r = NetIfRemoveHostOnlyNetworkInterface(m->pParent, Guid(aId).ref(), &iPr); … … 1539 1539 { 1540 1540 Bstr n; 1541 (*it)->COMGETTER(Name) 1541 (*it)->COMGETTER(Name)(n.asOutParam()); 1542 1542 if (n == aName) 1543 1543 found = *it; … … 1576 1576 { 1577 1577 Bstr g; 1578 (*it)->COMGETTER(Id) 1578 (*it)->COMGETTER(Id)(g.asOutParam()); 1579 1579 if (Guid(g) == aId) 1580 1580 found = *it; … … 1631 1631 aDevice = NULL; 1632 1632 SafeIfaceArray<IHostUSBDevice> devsvec; 1633 HRESULT rc = COMGETTER(USBDevices) 1633 HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec)); 1634 1634 if (FAILED(rc)) return rc; 1635 1635 … … 1637 1637 { 1638 1638 Bstr address; 1639 rc = devsvec[i]->COMGETTER(Address) 1639 rc = devsvec[i]->COMGETTER(Address)(address.asOutParam()); 1640 1640 if (FAILED(rc)) return rc; 1641 1641 if (address == aName) 1642 1642 { 1643 return (ComObjPtr<IHostUSBDevice> 1643 return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam())); 1644 1644 } 1645 1645 } … … 1665 1665 1666 1666 SafeIfaceArray<IHostUSBDevice> devsvec; 1667 HRESULT rc = COMGETTER(USBDevices) 1667 HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec)); 1668 1668 if (FAILED(rc)) return rc; 1669 1669 … … 1671 1671 { 1672 1672 Bstr id; 1673 rc = devsvec[i]->COMGETTER(Id) 1673 rc = devsvec[i]->COMGETTER(Id)(id.asOutParam()); 1674 1674 if (FAILED(rc)) return rc; 1675 1675 if (Guid(id) == aId) 1676 1676 { 1677 return (ComObjPtr<IHostUSBDevice> 1677 return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam())); 1678 1678 } 1679 1679 } … … 1699 1699 * Returns a list of host video capture devices (webcams, etc). 1700 1700 * 1701 * @returns status code1701 * @returns COM status code 1702 1702 * @param aVideoInputDevices Array of interface pointers to be filled. 1703 1703 */ … … 1802 1802 * @param fRefresh Whether to refresh the host drives list even if this is not the first call. 1803 1803 * @param pll Caller's pointer which gets set to the static list of host drives. 1804 * @return 1804 * @returns COM status code 1805 1805 */ 1806 1806 HRESULT Host::i_getDrives(DeviceType_T mediumType, … … 2986 2986 bool fGone = true; 2987 2987 Bstr nameOld; 2988 (*itOld)->COMGETTER(Name) 2988 (*itOld)->COMGETTER(Name)(nameOld.asOutParam()); 2989 2989 for (itNew = listCopy.begin(); itNew != listCopy.end(); ++itNew) 2990 2990 { 2991 2991 Bstr nameNew; 2992 (*itNew)->COMGETTER(Name) 2992 (*itNew)->COMGETTER(Name)(nameNew.asOutParam()); 2993 2993 if (nameNew == nameOld) 2994 2994 { … … 3019 3019 { 3020 3020 Bstr n; 3021 (*itNew)->COMGETTER(Name) 3021 (*itNew)->COMGETTER(Name)(n.asOutParam()); 3022 3022 LogRel(("Host::updateNetIfList: failed to get interface type for %ls\n", n.raw())); 3023 3023 }
Note:
See TracChangeset
for help on using the changeset viewer.