Changeset 33294 in vbox for trunk/src/VBox/Frontends/VBoxHeadless
- Timestamp:
- Oct 21, 2010 10:45:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r33004 r33294 793 793 ComPtr<IMachine> m; 794 794 795 /* find ID by name */ 796 if (id.isEmpty()) 797 { 798 rc = virtualBox->FindMachine(Bstr(name).raw(), m.asOutParam()); 799 if (FAILED(rc)) 800 { 801 LogError("Invalid machine name!\n", rc); 802 break; 803 } 804 m->COMGETTER(Id)(id.asOutParam()); 805 AssertComRC(rc); 806 if (FAILED(rc)) 807 break; 808 } 809 else 810 { 811 /* Use the GUID. */ 812 rc = virtualBox->GetMachine(id.raw(), m.asOutParam()); 813 if (FAILED(rc)) 814 { 815 LogError("Invalid machine uid!\n", rc); 816 break; 817 } 818 } 795 rc = virtualBox->FindMachine(Bstr(name).raw(), m.asOutParam()); 796 if (FAILED(rc)) 797 { 798 LogError("Invalid machine name or UUID!\n", rc); 799 break; 800 } 801 m->COMGETTER(Id)(id.asOutParam()); 802 AssertComRC(rc); 803 if (FAILED(rc)) 804 break; 819 805 820 806 Log(("VBoxHeadless: Opening a session with machine (id={%s})...\n",
Note:
See TracChangeset
for help on using the changeset viewer.