Changeset 79420 in vbox for trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
- Timestamp:
- Jun 28, 2019 7:05:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
r77804 r79420 256 256 Bstr name; 257 257 ComObjPtr<HostNetworkInterface> iface; 258 ComObjPtr<VirtualBox> vBox;258 ComObjPtr<VirtualBox> ptrVBox; 259 259 /* for SVCHlpMsg::RemoveHostOnlyNetworkInterface */ 260 260 Guid guid; … … 333 333 if (SUCCEEDED(rc)) 334 334 { 335 rc = d->iface->i_setVirtualBox(d-> vBox);335 rc = d->iface->i_setVirtualBox(d->ptrVBox); 336 336 if (SUCCEEDED(rc)) 337 337 { … … 1180 1180 d->name = aName; 1181 1181 d->iface = iface; 1182 d-> vBox = pVirtualBox;1182 d->ptrVBox = pVirtualBox; 1183 1183 1184 1184 rc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, … … 1235 1235 } 1236 1236 1237 int NetIfEnableStaticIpConfig(VirtualBox * vBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask)1237 int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask) 1238 1238 { 1239 1239 RT_NOREF(aOldIp); … … 1245 1245 if (SUCCEEDED(rc)) 1246 1246 { 1247 // ComPtr<VirtualBox> vBox;1248 // rc = pIf->getVirtualBox( vBox.asOutParam());1247 // ComPtr<VirtualBox> pVBox; 1248 // rc = pIf->getVirtualBox(pVBox.asOutParam()); 1249 1249 // if (SUCCEEDED(rc)) 1250 1250 { … … 1253 1253 progress.createObject(); 1254 1254 // ComPtr<IHost> host; 1255 // HRESULT rc = vBox->COMGETTER(Host)(host.asOutParam());1255 // HRESULT rc = pVBox->COMGETTER(Host)(host.asOutParam()); 1256 1256 // if (SUCCEEDED(rc)) 1257 1257 { 1258 rc = progress->init( vBox, (IHostNetworkInterface*)pIf,1258 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1259 1259 Bstr("Enabling Dynamic Ip Configuration").raw(), 1260 1260 FALSE /* aCancelable */); … … 1273 1273 d->u.StaticIP.IPNetMask = mask; 1274 1274 1275 rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1276 netIfNetworkInterfaceHelperClient,1277 static_cast<void *>(d),1278 progress);1275 rc = pVBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1276 netIfNetworkInterfaceHelperClient, 1277 static_cast<void *>(d), 1278 progress); 1279 1279 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1280 1280 … … 1292 1292 } 1293 1293 1294 int NetIfEnableStaticIpConfigV6(VirtualBox * vBox, HostNetworkInterface * pIf, const Utf8Str &aOldIPV6Address,1294 int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, const Utf8Str &aOldIPV6Address, 1295 1295 const Utf8Str &aIPV6Address, ULONG aIPV6MaskPrefixLength) 1296 1296 { … … 1303 1303 if (SUCCEEDED(rc)) 1304 1304 { 1305 // ComPtr<VirtualBox> vBox;1306 // rc = pIf->getVirtualBox( vBox.asOutParam());1305 // ComPtr<VirtualBox> pVBox; 1306 // rc = pIf->getVirtualBox(pVBox.asOutParam()); 1307 1307 // if (SUCCEEDED(rc)) 1308 1308 { … … 1311 1311 progress.createObject(); 1312 1312 // ComPtr<IHost> host; 1313 // HRESULT rc = vBox->COMGETTER(Host)(host.asOutParam());1313 // HRESULT rc = pVBox->COMGETTER(Host)(host.asOutParam()); 1314 1314 // if (SUCCEEDED(rc)) 1315 1315 { 1316 rc = progress->init( vBox, (IHostNetworkInterface*)pIf,1316 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1317 1317 Bstr("Enabling Dynamic Ip Configuration").raw(), 1318 1318 FALSE /* aCancelable */); … … 1331 1331 d->u.StaticIPV6.IPV6NetMaskLength = aIPV6MaskPrefixLength; 1332 1332 1333 rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1334 netIfNetworkInterfaceHelperClient,1335 static_cast<void *>(d),1336 progress);1333 rc = pVBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1334 netIfNetworkInterfaceHelperClient, 1335 static_cast<void *>(d), 1336 progress); 1337 1337 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1338 1338 … … 1350 1350 } 1351 1351 1352 int NetIfEnableDynamicIpConfig(VirtualBox * vBox, HostNetworkInterface * pIf)1352 int NetIfEnableDynamicIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf) 1353 1353 { 1354 1354 #ifndef VBOX_WITH_NETFLT … … 1360 1360 if (SUCCEEDED(rc)) 1361 1361 { 1362 // ComPtr<VirtualBox> vBox;1363 // rc = pIf->getVirtualBox( vBox.asOutParam());1362 // ComPtr<VirtualBox> pVBox; 1363 // rc = pIf->getVirtualBox(pVBox.asOutParam()); 1364 1364 // if (SUCCEEDED(rc)) 1365 1365 { … … 1368 1368 progress.createObject(); 1369 1369 // ComPtr<IHost> host; 1370 // HRESULT rc = vBox->COMGETTER(Host)(host.asOutParam());1370 // HRESULT rc = pVBox->COMGETTER(Host)(host.asOutParam()); 1371 1371 // if (SUCCEEDED(rc)) 1372 1372 { 1373 rc = progress->init( vBox, (IHostNetworkInterface*)pIf,1373 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1374 1374 Bstr("Enabling Dynamic Ip Configuration").raw(), 1375 1375 FALSE /* aCancelable */); … … 1386 1386 d->iface = pIf; 1387 1387 1388 rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1389 netIfNetworkInterfaceHelperClient,1390 static_cast<void *>(d),1391 progress);1388 rc = pVBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1389 netIfNetworkInterfaceHelperClient, 1390 static_cast<void *>(d), 1391 progress); 1392 1392 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1393 1393 … … 1405 1405 } 1406 1406 1407 int NetIfDhcpRediscover(VirtualBox * vBox, HostNetworkInterface * pIf)1407 int NetIfDhcpRediscover(VirtualBox *pVBox, HostNetworkInterface * pIf) 1408 1408 { 1409 1409 #ifndef VBOX_WITH_NETFLT … … 1415 1415 if (SUCCEEDED(rc)) 1416 1416 { 1417 // ComPtr<VirtualBox> vBox;1418 // rc = pIf->getVirtualBox( vBox.asOutParam());1417 // ComPtr<VirtualBox> pVBox; 1418 // rc = pIf->getVirtualBox(pVBox.asOutParam()); 1419 1419 // if (SUCCEEDED(rc)) 1420 1420 { … … 1423 1423 progress.createObject(); 1424 1424 // ComPtr<IHost> host; 1425 // HRESULT rc = vBox->COMGETTER(Host)(host.asOutParam());1425 // HRESULT rc = pVBox->COMGETTER(Host)(host.asOutParam()); 1426 1426 // if (SUCCEEDED(rc)) 1427 1427 { 1428 rc = progress->init( vBox, (IHostNetworkInterface*)pIf,1428 rc = progress->init(pVBox, (IHostNetworkInterface*)pIf, 1429 1429 Bstr("Enabling Dynamic Ip Configuration").raw(), 1430 1430 FALSE /* aCancelable */); … … 1441 1441 d->iface = pIf; 1442 1442 1443 rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,1444 netIfNetworkInterfaceHelperClient,1445 static_cast<void *>(d),1446 progress);1443 rc = pVBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */, 1444 netIfNetworkInterfaceHelperClient, 1445 static_cast<void *>(d), 1446 progress); 1447 1447 /* d is now owned by netIfNetworkInterfaceHelperClient(), no need to delete one here */ 1448 1448
Note:
See TracChangeset
for help on using the changeset viewer.