Changeset 27677 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 24, 2010 5:21:51 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r27607 r27677 6 6 7 7 /* 8 * Copyright (C) 2008-20 09Sun Microsystems, Inc.8 * Copyright (C) 2008-2010 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1233 1233 const Utf8Str &strNameVBox = vsdeName.front()->strVbox; 1234 1234 rc = mVirtualBox->CreateMachine(Bstr(strNameVBox), Bstr(strOsTypeVBox), 1235 Bstr(), Bstr(), 1235 Bstr(), Bstr(), FALSE, 1236 1236 pNewMachine.asOutParam()); 1237 1237 if (FAILED(rc)) throw rc; -
trunk/src/VBox/Main/MachineImpl.cpp
r27644 r27677 266 266 * (ignored otherwise) 267 267 * @param aOsType OS Type of this machine 268 * @param aOverride |TRUE| to override VM config file existence checks. 269 * |FALSE| refuses to overwrite existing VM configs. 268 270 * @param aNameSync |TRUE| to automatically sync settings dir and file 269 271 * name with the machine name. |FALSE| is used for legacy … … 284 286 CBSTR aName /* = NULL */, 285 287 GuestOSType *aOsType /* = NULL */, 288 BOOL aOverride /* = FALSE */, 286 289 BOOL aNameSync /* = TRUE */, 287 290 const Guid *aId /* = NULL */) … … 347 350 RTFILE f = NIL_RTFILE; 348 351 int vrc = RTFileOpen(&f, mData->m_strConfigFileFull.c_str(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); 349 if ( RT_SUCCESS(vrc)352 if ( (RT_SUCCESS(vrc) && !aOverride) 350 353 || vrc == VERR_SHARING_VIOLATION 351 354 ) -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r27668 r27677 6 6 7 7 /* 8 * Copyright (C) 2006-20 09Sun Microsystems, Inc.8 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1031 1031 IN_BSTR aBaseFolder, 1032 1032 IN_BSTR aId, 1033 BOOL aOverride, 1033 1034 IMachine **aMachine) 1034 1035 { … … 1084 1085 aName, 1085 1086 osType, 1087 aOverride, 1086 1088 TRUE /* aNameSync */, 1087 1089 &id); … … 1139 1141 aName, 1140 1142 osType, 1143 FALSE /* aOverride */, 1141 1144 FALSE /* aNameSync */, 1142 1145 &id); … … 4309 4312 AssertReturn(pvUser, VERR_INVALID_POINTER); 4310 4313 4314 com::Initialize(); 4315 4311 4316 // create an event queue for the current thread 4312 4317 EventQueue *eventQ = new EventQueue(); … … 4327 4332 4328 4333 delete eventQ; 4334 4335 com::Shutdown(); 4329 4336 4330 4337 LogFlowFuncLeave(); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r27642 r27677 1690 1690 <interface 1691 1691 name="IVirtualBox" extends="$dispatched" 1692 uuid=" 2158464a-f706-414b-a8c4-fb589dfc6b62"1692 uuid="3f36e024-7fed-4f20-a02c-9158a82b44e6" 1693 1693 wsmap="managed" 1694 1694 > … … 1919 1919 <param name="id" type="uuid" mod="string" dir="in"> 1920 1920 <desc>Machine UUID (optional).</desc> 1921 </param> 1922 <param name="override" type="boolean" dir="in"> 1923 <desc>Create the VM even if there are conflicting files.</desc> 1921 1924 </param> 1922 1925 <param name="machine" type="IMachine" dir="return"> -
trunk/src/VBox/Main/include/MachineImpl.h
r27644 r27677 354 354 CBSTR aName = NULL, 355 355 GuestOSType *aOsType = NULL, 356 BOOL aOverride = FALSE, 356 357 BOOL aNameSync = TRUE, 357 358 const Guid *aId = NULL); -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r27668 r27677 7 7 8 8 /* 9 * Copyright (C) 2006-20 09Sun Microsystems, Inc.9 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 125 125 126 126 STDMETHOD(CreateMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aBaseFolder, 127 IN_BSTR aId, IMachine **aMachine);127 IN_BSTR aId, BOOL aOverride, IMachine **aMachine); 128 128 STDMETHOD(CreateLegacyMachine) (IN_BSTR aName, IN_BSTR aOsTypeId, IN_BSTR aSettingsFile, 129 129 IN_BSTR aId, IMachine **aMachine); -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r26177 r27677 5 5 6 6 /* 7 * Copyright (C) 2006-20 09Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 742 742 RTPrintf ("Creating a new machine object (base dir '%ls', name '%ls')...\n", 743 743 baseDir.raw(), name.raw()); 744 CHECK_ERROR_BREAK (virtualBox, CreateMachine (baseDir, name, 744 CHECK_ERROR_BREAK (virtualBox, CreateMachine (name, L"", baseDir, L"", 745 false, 745 746 machine.asOutParam())); 746 747 -
trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp
r26186 r27677 8 8 9 9 /* 10 * Copyright (C) 2006-20 07Sun Microsystems, Inc.10 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 11 11 * 12 12 * This file is part of VirtualBox Open Source Edition (OSE), as … … 195 195 nsCOMPtr <IMachine> machine; 196 196 rc = virtualBox->CreateMachine(NS_LITERAL_STRING("A brand new name").get(), 197 nsnull, nsnull, nsnull, getter_AddRefs(machine));197 nsnull, nsnull, nsnull, false, getter_AddRefs(machine)); 198 198 if (NS_FAILED(rc)) 199 199 {
Note:
See TracChangeset
for help on using the changeset viewer.