Changeset 26286 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Feb 5, 2010 1:50:13 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57355
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r24998 r26286 1757 1757 } 1758 1758 1759 int CmdTestSession(HandlerArg *a) 1760 { 1761 HRESULT rc; 1762 1763 if (a->argc != 2) 1764 { 1765 RTPrintf("Must specify VM name!\n"); 1766 return E_FAIL; 1767 } 1768 1769 do 1770 { 1771 ComPtr<IMachine> pMachine; 1772 CHECK_ERROR_BREAK(a->virtualBox, FindMachine(Bstr(a->argv[1]), pMachine.asOutParam())); 1773 1774 Bstr bstrMachineID; 1775 CHECK_ERROR_BREAK(pMachine, COMGETTER(Id)(bstrMachineID.asOutParam())); 1776 1777 CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, bstrMachineID)); 1778 1779 RTPrintf("Session is open, press any key to terminate!\n"); 1780 1781 RTStrmGetCh(g_pStdIn); 1782 1783 RTPrintf("Closing session...\n"); 1784 1785 CHECK_ERROR_BREAK(a->session, Close()); 1786 1787 } while (0); 1788 1789 return rc; 1790 } 1791 1759 1792 /** 1760 1793 * Wrapper for handling internal commands … … 1796 1829 return CmdModUninstall(); 1797 1830 1831 if (!strcmp(pszCmd, "testsession")) 1832 return CmdTestSession(a); 1833 1798 1834 /* default: */ 1799 1835 return errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(a->argv[0]).raw());
Note:
See TracChangeset
for help on using the changeset viewer.