Changeset 88086 in vbox
- Timestamp:
- Mar 11, 2021 12:50:12 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r85780 r88086 221 221 /* VBoxManageControlVM.cpp */ 222 222 RTEXITCODE handleControlVM(HandlerArg *a); 223 #ifndef VBOX_ONLY_DOCS224 unsigned int getMaxNics(IVirtualBox* vbox, IMachine* mach);225 #endif226 223 227 224 /* VBoxManageModifyVM.cpp */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r88079 r88086 62 62 return (unsigned)u32; 63 63 errorArgument("Invalid %s number '%s'", name, psz); 64 return 0;65 }66 67 unsigned int getMaxNics(IVirtualBox* vbox, IMachine* mach)68 {69 ComPtr<ISystemProperties> info;70 ChipsetType_T aChipset;71 ULONG NetworkAdapterCount = 0;72 HRESULT rc;73 74 do {75 CHECK_ERROR_BREAK(vbox, COMGETTER(SystemProperties)(info.asOutParam()));76 CHECK_ERROR_BREAK(mach, COMGETTER(ChipsetType)(&aChipset));77 CHECK_ERROR_BREAK(info, GetMaxNetworkAdapters(aChipset, &NetworkAdapterCount));78 79 return (unsigned int)NetworkAdapterCount;80 } while (0);81 82 64 return 0; 83 65 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r87851 r88086 44 44 45 45 #include "VBoxManage.h" 46 #include "VBoxManageUtils.h" 47 46 48 using namespace com; 47 49 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.cpp
r88079 r88086 23 23 24 24 #include <VBox/com/array.h> 25 #include <VBox/com/errorprint.h> 25 26 #include <VBox/com/string.h> 26 27 27 28 using namespace com; 29 30 31 32 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox, 33 const ComPtr<IMachine> &pMachine) 34 { 35 ComPtr<ISystemProperties> info; 36 ChipsetType_T aChipset; 37 ULONG NetworkAdapterCount = 0; 38 HRESULT rc; 39 40 do { 41 CHECK_ERROR_BREAK(pVirtualBox, COMGETTER(SystemProperties)(info.asOutParam())); 42 CHECK_ERROR_BREAK(pMachine, COMGETTER(ChipsetType)(&aChipset)); 43 CHECK_ERROR_BREAK(info, GetMaxNetworkAdapters(aChipset, &NetworkAdapterCount)); 44 45 return (unsigned int)NetworkAdapterCount; 46 } while (0); 47 48 return 0; 49 } 28 50 29 51 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.h
r88079 r88086 28 28 #endif 29 29 30 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox, 31 const ComPtr<IMachine> &pMachine); 32 30 33 void verifyHostNetworkInterfaceName(const ComPtr<IVirtualBox> &pVirtualBox, 31 34 const char *pszTargetName,
Note:
See TracChangeset
for help on using the changeset viewer.