Changeset 86509 in vbox for trunk/src/VBox
- Timestamp:
- Oct 9, 2020 5:37:05 PM (4 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r85283 r86509 131 131 */ 132 132 bool i_isApplianceIdle(); 133 HRESULT i_searchUniqueVMName(Utf8Str &aName) const;133 HRESULT i_searchUniqueVMName(Utf8Str &aName) const; 134 134 HRESULT i_ensureUniqueImageFilePath(const Utf8Str &aMachineFolder, 135 135 DeviceType_T aDeviceType, … … 211 211 void i_importMachineGeneric(const ovf::VirtualSystem &vsysThis, 212 212 ComObjPtr<VirtualSystemDescription> &vsdescThis, 213 ComPtr<IMachine> &pNewMachine ,213 ComPtr<IMachine> &pNewMachineRet, 214 214 ImportStack &stack); 215 215 void i_importVBoxMachine(ComObjPtr<VirtualSystemDescription> &vsdescThis, -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r85363 r86509 966 966 } 967 967 968 HRESULT Appliance::i_searchUniqueVMName(Utf8Str &aName) const969 { 970 IMachine *machine = NULL;968 HRESULT Appliance::i_searchUniqueVMName(Utf8Str &aName) const 969 { 970 ComPtr<IMachine> ptrMachine; 971 971 char *tmpName = RTStrDup(aName.c_str()); 972 972 int i = 1; 973 while (mVirtualBox->FindMachine(Bstr(tmpName).raw(), &machine) != VBOX_E_OBJECT_NOT_FOUND)973 while (mVirtualBox->FindMachine(Bstr(tmpName).raw(), ptrMachine.asOutParam()) != VBOX_E_OBJECT_NOT_FOUND) 974 974 { 975 975 RTStrFree(tmpName); -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r85283 r86509 4316 4316 * about what needs cleaning up (to support rollback). 4317 4317 * 4318 * @param vsysThis OVF virtual system (machine) to import. 4319 * @param vsdescThis Matching virtual system description (machine) to import. 4320 * @param pNewMachine out: Newly created machine. 4321 * @param stack Cleanup stack for when this throws. 4318 * @param vsysThis OVF virtual system (machine) to import. 4319 * @param vsdescThis Matching virtual system description (machine) to import. 4320 * @param[out] pNewMachineRet Newly created machine. 4321 * @param stack Cleanup stack for when this throws. 4322 * 4323 * @throws HRESULT 4322 4324 */ 4323 4325 void Appliance::i_importMachineGeneric(const ovf::VirtualSystem &vsysThis, 4324 4326 ComObjPtr<VirtualSystemDescription> &vsdescThis, 4325 ComPtr<IMachine> &pNewMachine ,4327 ComPtr<IMachine> &pNewMachineRet, 4326 4328 ImportStack &stack) 4327 4329 { … … 4339 4341 if (!stack.strPrimaryGroup.isEmpty() && stack.strPrimaryGroup != "/") 4340 4342 Bstr(stack.strPrimaryGroup).detachTo(groups.appendedRaw()); 4343 ComPtr<IMachine> pNewMachine; 4341 4344 rc = mVirtualBox->CreateMachine(Bstr(stack.strSettingsFilename).raw(), 4342 4345 Bstr(stack.strNameVBox).raw(), … … 4346 4349 pNewMachine.asOutParam()); 4347 4350 if (FAILED(rc)) throw rc; 4351 pNewMachineRet = pNewMachine; 4348 4352 4349 4353 // set the description … … 5619 5623 ComObjPtr<VirtualSystemDescription> vsdescThis = (*it1); 5620 5624 5621 ComPtr<IMachine> pNewMachine;5622 5623 5625 // there are two ways in which we can create a vbox machine from OVF: 5624 5626 // -- either this OVF was written by vbox 3.2 or later, in which case there is a <vbox:Machine> element … … 5737 5739 5738 5740 // import vbox:machine or OVF now 5741 ComPtr<IMachine> pNewMachine; /** @todo pointless */ 5739 5742 if (vsdescThis->m->pConfig) 5740 5743 // vbox:Machine config
Note:
See TracChangeset
for help on using the changeset viewer.