Changeset 11079 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 3, 2008 2:34:37 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33990
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r11042 r11079 93 93 94 94 static int handleSetGuestProperty(int argc, char *argv[], 95 ComPtr<IVirtualBox> virtualBox,96 ComPtr<ISession> session)95 ComPtr<IVirtualBox> aVirtualBox, 96 ComPtr<ISession> aSession) 97 97 { 98 98 HRESULT rc = S_OK; … … 133 133 ComPtr<IMachine> machine; 134 134 /* assume it's a UUID */ 135 rc = virtualBox->GetMachine(Guid(argv[0]), machine.asOutParam());135 rc = aVirtualBox->GetMachine(Guid(argv[0]), machine.asOutParam()); 136 136 if (FAILED(rc) || !machine) 137 137 { 138 138 /* must be a name */ 139 CHECK_ERROR( virtualBox, FindMachine(Bstr(argv[0]), machine.asOutParam()));139 CHECK_ERROR(aVirtualBox, FindMachine(Bstr(argv[0]), machine.asOutParam())); 140 140 } 141 141 if (machine) 142 142 { 143 Guid uuid; 144 machine->COMGETTER(Id)(uuid.asOutParam()); 145 146 /* open a session for the VM */ 147 CHECK_ERROR_RET (aVirtualBox, OpenSession(aSession, uuid), 1); 148 149 /* get the mutable session machine */ 150 aSession->COMGETTER(Machine)(machine.asOutParam()); 151 143 152 if ((NULL == pszValue) && (NULL == pszFlags)) 144 153 CHECK_ERROR(machine, SetGuestPropertyValue(Bstr(pszName), NULL)); … … 149 158 else 150 159 CHECK_ERROR(machine, SetGuestProperty(Bstr(pszName), Bstr(pszValue), Bstr(pszFlags))); 160 161 if (SUCCEEDED(rc)) 162 CHECK_ERROR(machine, SaveSettings()); 163 164 aSession->Close(); 151 165 } 152 166 return SUCCEEDED(rc) ? 0 : 1;
Note:
See TracChangeset
for help on using the changeset viewer.