Changeset 40539 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Mar 19, 2012 2:27:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r40525 r40539 1636 1636 1637 1637 return rc; 1638 } 1639 1640 STDMETHODIMP VirtualBox::GetMachineStates(ComSafeArrayIn(IMachine *, aMachines), ComSafeArrayOut(MachineState_T, aStates)) 1641 { 1642 CheckComArgSafeArrayNotNull(aMachines); 1643 CheckComArgOutSafeArrayPointerValid(aStates); 1644 1645 com::SafeIfaceArray<IMachine> saMachines(ComSafeArrayInArg(aMachines)); 1646 com::SafeArray<MachineState_T> saStates(saMachines.size()); 1647 for (size_t i = 0; i < saMachines.size(); i++) 1648 { 1649 ComPtr<IMachine> pMachine = saMachines[i]; 1650 MachineState_T state = MachineState_Null; 1651 if (!pMachine.isNull()) 1652 { 1653 HRESULT rc = pMachine->COMGETTER(State)(&state); 1654 if (rc = E_ACCESSDENIED) 1655 rc = S_OK; 1656 AssertComRC(rc); 1657 } 1658 saStates[i] = state; 1659 } 1660 saStates.detachTo(ComSafeArrayOutArg(aStates)); 1661 1662 return S_OK; 1638 1663 } 1639 1664
Note:
See TracChangeset
for help on using the changeset viewer.