Changeset 85265 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 12, 2020 1:01:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r84344 r85265 46 46 #include "ProgressImpl.h" 47 47 #include "VirtualBoxImpl.h" 48 #include "Global.h" 48 49 #include "netif.h" 49 50 #include "ThreadTask.h" … … 1154 1155 /* create a progress object */ 1155 1156 ComObjPtr<Progress> progress; 1156 progress.createObject(); 1157 HRESULT hrc = progress.createObject(); 1158 AssertComRCReturn(hrc, Global::vboxStatusCodeFromCOM(hrc)); 1157 1159 1158 1160 ComPtr<IHost> host; 1159 HRESULT rc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1160 if (SUCCEEDED(rc)) 1161 { 1162 rc = progress->init(pVirtualBox, host, 1163 Bstr(_T("Creating host only network interface")).raw(), 1164 FALSE /* aCancelable */); 1165 if (SUCCEEDED(rc)) 1166 { 1167 if (FAILED(rc)) return rc; 1161 hrc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1162 if (SUCCEEDED(hrc)) 1163 { 1164 hrc = progress->init(pVirtualBox, host, 1165 Bstr(_T("Creating host only network interface")).raw(), 1166 FALSE /* aCancelable */); 1167 if (SUCCEEDED(hrc)) 1168 { 1168 1169 progress.queryInterfaceTo(aProgress); 1169 1170 … … 1181 1182 d->ptrVBox = pVirtualBox; 1182 1183 1183 rc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1184 netIfNetworkInterfaceHelperClient,1185 static_cast<void *>(d),1186 progress);1184 hrc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1185 netIfNetworkInterfaceHelperClient, 1186 static_cast<void *>(d), 1187 progress); 1187 1188 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1188 1189 … … 1190 1191 } 1191 1192 1192 return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_GENERAL_FAILURE;1193 return Global::vboxStatusCodeFromCOM(hrc); 1193 1194 #endif 1194 1195 } … … 1202 1203 /* create a progress object */ 1203 1204 ComObjPtr<Progress> progress; 1204 progress.createObject(); 1205 HRESULT hrc = progress.createObject(); 1206 AssertComRCReturn(hrc, Global::vboxStatusCodeFromCOM(hrc)); 1207 1205 1208 ComPtr<IHost> host; 1206 HRESULT rc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1207 if (SUCCEEDED(rc)) 1208 { 1209 rc = progress->init(pVirtualBox, host, 1210 Bstr(_T("Removing host network interface")).raw(), 1211 FALSE /* aCancelable */); 1212 if (SUCCEEDED(rc)) 1213 { 1214 if (FAILED(rc)) return rc; 1209 hrc = pVirtualBox->COMGETTER(Host)(host.asOutParam()); 1210 if (SUCCEEDED(hrc)) 1211 { 1212 hrc = progress->init(pVirtualBox, host, 1213 Bstr(_T("Removing host network interface")).raw(), 1214 FALSE /* aCancelable */); 1215 if (SUCCEEDED(hrc)) 1216 { 1215 1217 progress.queryInterfaceTo(aProgress); 1216 1218 … … 1221 1223 d->guid = aId; 1222 1224 1223 rc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1224 netIfNetworkInterfaceHelperClient,1225 static_cast<void *>(d),1226 progress);1225 hrc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1226 netIfNetworkInterfaceHelperClient, 1227 static_cast<void *>(d), 1228 progress); 1227 1229 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1228 1230 … … 1230 1232 } 1231 1233 1232 return SUCCEEDED(rc) ? VINF_SUCCESS : VERR_GENERAL_FAILURE;1234 return Global::vboxStatusCodeFromCOM(hrc); 1233 1235 #endif 1234 1236 }
Note:
See TracChangeset
for help on using the changeset viewer.