Changeset 31008 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Jul 22, 2010 3:24:27 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63924
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r30871 r31008 1316 1316 const CLSID sessionID = CLSID_Session; 1317 1317 1318 ComPtr<IMachine> pMachine; 1319 1318 1320 rc = virtualBox.createLocalObject(CLSID_VirtualBox); 1319 1321 if (FAILED(rc)) … … 1339 1341 if (vmName && uuidVM.isEmpty()) 1340 1342 { 1341 ComPtr<IMachine> aMachine;1342 1343 Bstr bstrVMName = vmName; 1343 rc = virtualBox->FindMachine(bstrVMName, aMachine.asOutParam());1344 if ((rc == S_OK) && aMachine)1344 rc = virtualBox->FindMachine(bstrVMName, pMachine.asOutParam()); 1345 if ((rc == S_OK) && pMachine) 1345 1346 { 1346 1347 Bstr id; 1347 aMachine->COMGETTER(Id)(id.asOutParam());1348 pMachine->COMGETTER(Id)(id.asOutParam()); 1348 1349 uuidVM = Guid(id); 1349 1350 } … … 1364 1365 AssertReleaseRC(vrc); 1365 1366 1366 rc = virtualBox->OpenSession(session, uuidVM.toUtf16());1367 rc = pMachine->LockForSession(session, false /* fPermitShared */, NULL); 1367 1368 if (FAILED(rc)) 1368 1369 { … … 1379 1380 } 1380 1381 sessionOpened = true; 1381 // get the VM we're dealing with1382 // get the mutable VM we're dealing with 1382 1383 session->COMGETTER(Machine)(gMachine.asOutParam()); 1383 1384 if (!gMachine)
Note:
See TracChangeset
for help on using the changeset viewer.