Changeset 40539 in vbox
- Timestamp:
- Mar 19, 2012 2:27:50 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76928
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r40429 r40539 3 3 <!-- 4 4 5 Copyright (C) 2006-201 1Oracle Corporation5 Copyright (C) 2006-2012 Oracle Corporation 6 6 7 7 This file is part of VirtualBox Open Source Edition (OSE), as … … 1398 1398 <interface 1399 1399 name="IVirtualBox" extends="$unknown" 1400 uuid=" c28be65f-1a8f-43b4-81f1-eb60cb516e66"1400 uuid="8bf22775-a3c1-4f81-80d3-138584474fb3" 1401 1401 wsmap="managed" 1402 1402 > … … 1784 1784 <param name="machine" type="IMachine" dir="return"> 1785 1785 <desc>Machine object, if found.</desc> 1786 </param> 1787 </method> 1788 1789 <method name="getMachineStates"> 1790 <desc> 1791 Gets the state of several machines in a single operation. 1792 </desc> 1793 <param name="machines" type="IMachine" dir="in" safearray="yes"> 1794 <desc>Array with the machine references.</desc> 1795 </param> 1796 <param name="states" type="MachineState" dir="return" safearray="yes"> 1797 <desc>Machine states, corresponding to the machines.</desc> 1786 1798 </param> 1787 1799 </method> -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r40524 r40539 134 134 STDMETHOD(RegisterMachine)(IMachine *aMachine); 135 135 STDMETHOD(FindMachine)(IN_BSTR aNameOrId, IMachine **aMachine); 136 STDMETHOD(GetMachineStates)(ComSafeArrayIn(IMachine *, aMachines), ComSafeArrayOut(MachineState_T, aStates)); 136 137 STDMETHOD(CreateAppliance)(IAppliance **anAppliance); 137 138 -
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.