Changeset 29226 in vbox
- Timestamp:
- May 7, 2010 4:08:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r29224 r29226 302 302 int rc; 303 303 HRESULT hrc; 304 BSTR str = NULL; 305 306 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } } while (0) 307 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); STR_FREE(); return rc; } } while (0) 308 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); STR_FREE(); return VERR_GENERAL_FAILURE; } } while (0) 304 Bstr bstr; 305 306 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); return rc; } } while (0) 307 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); return VERR_GENERAL_FAILURE; } } while (0) 309 308 310 309 /* … … 323 322 hrc = pMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam()); H(); 324 323 325 hrc = pMachine->COMGETTER(HardwareUUID)( &str); H();324 hrc = pMachine->COMGETTER(HardwareUUID)(bstr.asOutParam()); H(); 326 325 RTUUID HardwareUuid; 327 rc = RTUuidFromUtf16(&HardwareUuid, str); RC_CHECK(); 328 STR_FREE(); 326 rc = RTUuidFromUtf16(&HardwareUuid, bstr.raw()); RC_CHECK(); 329 327 330 328 ULONG cRamMBs; … … 363 361 * Set the root (and VMM) level values. 364 362 */ 365 hrc = pMachine->COMGETTER(Name)( &str);H();366 rc = CFGMR3InsertStringW(pRoot, "Name", str);RC_CHECK();363 hrc = pMachine->COMGETTER(Name)(bstr.asOutParam()); H(); 364 rc = CFGMR3InsertStringW(pRoot, "Name", bstr.raw()); RC_CHECK(); 367 365 rc = CFGMR3InsertBytes(pRoot, "UUID", &HardwareUuid, sizeof(HardwareUuid)); RC_CHECK(); 368 366 rc = CFGMR3InsertInteger(pRoot, "RamSize", cbRam); RC_CHECK(); … … 377 375 rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled", 1); /* boolean */ RC_CHECK(); 378 376 #endif 379 STR_FREE();380 377 381 378 /* cpuid leaf overrides. */ … … 842 839 char szExtraDataKey[sizeof("CustomVideoModeXX")]; 843 840 RTStrPrintf(szExtraDataKey, sizeof(szExtraDataKey), "CustomVideoMode%u", iMode); 844 hrc = pMachine->GetExtraData(Bstr(szExtraDataKey), &str);H();845 if ( !str || !*str)841 hrc = pMachine->GetExtraData(Bstr(szExtraDataKey), bstr.asOutParam()); H(); 842 if (bstr.isEmpty()) 846 843 break; 847 rc = CFGMR3InsertStringW(pCfg, szExtraDataKey, str); RC_CHECK(); 848 STR_FREE(); 844 rc = CFGMR3InsertStringW(pCfg, szExtraDataKey, bstr.raw()); RC_CHECK(); 849 845 ++cModes; 850 846 } 851 STR_FREE();852 847 rc = CFGMR3InsertInteger(pCfg, "CustomVideoModes", cModes); RC_CHECK(); 853 848 … … 970 965 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiDeviceProps"), deviceProps.asOutParam()); H(); 971 966 /* Get GOP mode settings */ 972 STR_FREE();973 967 uint32_t u32GopMode = UINT32_MAX; 974 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiGopMode"), &str); H(); 975 if (str && *str) 976 { 977 u32GopMode = Utf8Str(str).toUInt32(); 978 } 968 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiGopMode"), bstr.asOutParam()); H(); 969 if (!bstr.isEmpty()) 970 u32GopMode = Utf8Str(bstr).toUInt32(); 971 979 972 /* UGA mode settings */ 980 STR_FREE();981 973 uint32_t u32UgaHorisontal = 0; 982 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaHorizontalResolution"), &str); H(); 983 if (str && *str) 984 { 985 u32UgaHorisontal = Utf8Str(str).toUInt32(); 986 } 987 988 STR_FREE(); 974 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaHorizontalResolution"), bstr.asOutParam()); H(); 975 if (!bstr.isEmpty()) 976 u32UgaHorisontal = Utf8Str(bstr).toUInt32(); 977 989 978 uint32_t u32UgaVertical = 0; 990 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaVerticalResolution"), &str); H(); 991 if (str && *str) 992 { 993 u32UgaVertical = Utf8Str(str).toUInt32(); 994 } 995 STR_FREE(); 979 hrc = pMachine->GetExtraData(Bstr("VBoxInternal2/EfiUgaVerticalResolution"), bstr.asOutParam()); H(); 980 if (!bstr.isEmpty()) 981 u32UgaVertical = Utf8Str(bstr).toUInt32(); 996 982 997 983 /* … … 1492 1478 BOOL fServer; 1493 1479 hrc = serialPort->COMGETTER(Server)(&fServer); H(); 1494 hrc = serialPort->COMGETTER(Path)( &str);H();1480 hrc = serialPort->COMGETTER(Path)(bstr.asOutParam()); H(); 1495 1481 PortMode_T eHostMode; 1496 1482 hrc = serialPort->COMGETTER(HostMode)(&eHostMode); H(); … … 1504 1490 rc = CFGMR3InsertString(pLunL1, "Driver", "NamedPipe"); RC_CHECK(); 1505 1491 rc = CFGMR3InsertNode(pLunL1, "Config", &pLunL2); RC_CHECK(); 1506 rc = CFGMR3InsertStringW(pLunL2, "Location", str);RC_CHECK();1492 rc = CFGMR3InsertStringW(pLunL2, "Location", bstr.raw()); RC_CHECK(); 1507 1493 rc = CFGMR3InsertInteger(pLunL2, "IsServer", fServer); RC_CHECK(); 1508 1494 } … … 1511 1497 rc = CFGMR3InsertString(pLunL0, "Driver", "Host Serial"); RC_CHECK(); 1512 1498 rc = CFGMR3InsertNode(pLunL0, "Config", &pLunL1); RC_CHECK(); 1513 rc = CFGMR3InsertStringW(pLunL1, "DevicePath", str);RC_CHECK();1499 rc = CFGMR3InsertStringW(pLunL1, "DevicePath", bstr.raw()); RC_CHECK(); 1514 1500 } 1515 1501 else if (eHostMode == PortMode_RawFile) … … 1519 1505 rc = CFGMR3InsertString(pLunL1, "Driver", "RawFile"); RC_CHECK(); 1520 1506 rc = CFGMR3InsertNode(pLunL1, "Config", &pLunL2); RC_CHECK(); 1521 rc = CFGMR3InsertStringW(pLunL2, "Location", str); RC_CHECK(); 1522 } 1523 } 1524 STR_FREE(); 1507 rc = CFGMR3InsertStringW(pLunL2, "Location", bstr.raw()); RC_CHECK(); 1508 } 1509 } 1525 1510 } 1526 1511 … … 1553 1538 rc = CFGMR3InsertString(pLunL0, "Driver", "HostParallel"); RC_CHECK(); 1554 1539 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1555 hrc = parallelPort->COMGETTER(Path)(&str); H(); 1556 rc = CFGMR3InsertStringW(pLunL1, "DevicePath", str); RC_CHECK(); 1557 STR_FREE(); 1540 hrc = parallelPort->COMGETTER(Path)(bstr.asOutParam()); H(); 1541 rc = CFGMR3InsertStringW(pLunL1, "DevicePath", bstr.raw()); RC_CHECK(); 1558 1542 } 1559 1543 … … 1726 1710 #endif 1727 1711 } 1728 hrc = pMachine->COMGETTER(Name)(&str); H(); 1729 rc = CFGMR3InsertStringW(pCfg, "StreamName", str); RC_CHECK(); 1730 STR_FREE(); 1712 hrc = pMachine->COMGETTER(Name)(bstr.asOutParam()); H(); 1713 rc = CFGMR3InsertStringW(pCfg, "StreamName", bstr.raw()); RC_CHECK(); 1731 1714 } 1732 1715 … … 2218 2201 } 2219 2202 2220 #undef STR_FREE2221 2203 #undef H 2222 2204 #undef RC_CHECK … … 2270 2252 int rc = VINF_SUCCESS; 2271 2253 HRESULT hrc; 2272 BSTR str = NULL; 2273 2274 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } } while (0) 2275 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); STR_FREE(); return rc; } } while (0) 2276 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); STR_FREE(); return VERR_GENERAL_FAILURE; } } while (0) 2254 Bstr bstr; 2255 2256 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); return rc; } } while (0) 2257 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); return VERR_GENERAL_FAILURE; } } while (0) 2277 2258 2278 2259 LONG lDev; … … 2368 2349 paLedDevType[uLUN] = lType; 2369 2350 2370 #undef STR_FREE2371 2351 #undef H 2372 2352 #undef RC_CHECK … … 2388 2368 int rc = VINF_SUCCESS; 2389 2369 HRESULT hrc; 2390 BSTR str = NULL; 2391 2392 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } } while (0) 2393 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); STR_FREE(); return rc; } } while (0) 2394 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); STR_FREE(); if (phrc) *phrc = hrc; return VERR_GENERAL_FAILURE; } } while (0) 2370 Bstr bstr; 2371 2372 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); return rc; } } while (0) 2373 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); if (phrc) *phrc = hrc; return VERR_GENERAL_FAILURE; } } while (0) 2395 2374 2396 2375 PCFGMNODE pLunL1 = NULL; … … 2411 2390 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 2412 2391 2413 hrc = pMedium->COMGETTER(Location)(&str); H(); 2414 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 2415 STR_FREE(); 2392 hrc = pMedium->COMGETTER(Location)(bstr.asOutParam()); H(); 2393 rc = CFGMR3InsertStringW(pCfg, "Path", bstr.raw()); RC_CHECK(); 2416 2394 2417 2395 rc = CFGMR3InsertInteger(pCfg, "Passthrough", fPassthrough); RC_CHECK(); … … 2422 2400 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 2423 2401 2424 hrc = pMedium->COMGETTER(Location)(&str); H(); 2425 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 2426 STR_FREE(); 2402 hrc = pMedium->COMGETTER(Location)(bstr.asOutParam()); H(); 2403 rc = CFGMR3InsertStringW(pCfg, "Path", bstr.raw()); RC_CHECK(); 2427 2404 } 2428 2405 } … … 2492 2469 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 2493 2470 2494 hrc = pMedium->COMGETTER(Location)(&str); H(); 2495 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 2496 STR_FREE(); 2497 2498 hrc = pMedium->COMGETTER(Format)(&str); H(); 2499 rc = CFGMR3InsertStringW(pCfg, "Format", str); RC_CHECK(); 2500 STR_FREE(); 2471 hrc = pMedium->COMGETTER(Location)(bstr.asOutParam()); H(); 2472 rc = CFGMR3InsertStringW(pCfg, "Path", bstr.raw()); RC_CHECK(); 2473 2474 hrc = pMedium->COMGETTER(Format)(bstr.asOutParam()); H(); 2475 rc = CFGMR3InsertStringW(pCfg, "Format", bstr.raw()); RC_CHECK(); 2501 2476 2502 2477 /* DVDs are always readonly */ … … 2575 2550 PCFGMNODE pCur; 2576 2551 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK(); 2577 hrc = pMedium->COMGETTER(Location)(&str); H(); 2578 rc = CFGMR3InsertStringW(pCur, "Path", str); RC_CHECK(); 2579 STR_FREE(); 2580 2581 hrc = pMedium->COMGETTER(Format)(&str); H(); 2582 rc = CFGMR3InsertStringW(pCur, "Format", str); RC_CHECK(); 2583 STR_FREE(); 2552 hrc = pMedium->COMGETTER(Location)(bstr.asOutParam()); H(); 2553 rc = CFGMR3InsertStringW(pCur, "Path", bstr.raw()); RC_CHECK(); 2554 2555 hrc = pMedium->COMGETTER(Format)(bstr.asOutParam()); H(); 2556 rc = CFGMR3InsertStringW(pCur, "Format", bstr.raw()); RC_CHECK(); 2584 2557 2585 2558 if (fSetupMerge) … … 2634 2607 } 2635 2608 2636 #undef STR_FREE2637 2609 #undef H 2638 2610 #undef RC_CHECK … … 2669 2641 int rc = VINF_SUCCESS; 2670 2642 HRESULT hrc; 2671 BSTR str = NULL; 2672 2673 #define STR_FREE() do { if (str) { SysFreeString(str); str = NULL; } } while (0) 2674 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); STR_FREE(); return rc; } } while (0) 2675 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); STR_FREE(); return VERR_GENERAL_FAILURE; } } while (0) 2643 Bstr bstr; 2644 2645 #define RC_CHECK() do { if (RT_FAILURE(rc)) { AssertMsgFailed(("rc=%Rrc\n", rc)); return rc; } } while (0) 2646 #define H() do { if (FAILED(hrc)) { AssertMsgFailed(("hrc=%Rhrc\n", hrc)); return VERR_GENERAL_FAILURE; } } while (0) 2676 2647 2677 2648 /* … … 2725 2696 rc = CFGMR3InsertString(pLunL0, "Driver", "NetSniffer"); RC_CHECK(); 2726 2697 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 2727 hrc = aNetworkAdapter->COMGETTER(TraceFile)(&str); H(); 2728 if (str) /* check convention for indicating default file. */ 2729 { 2730 rc = CFGMR3InsertStringW(pCfg, "File", str); RC_CHECK(); 2731 } 2732 STR_FREE(); 2698 hrc = aNetworkAdapter->COMGETTER(TraceFile)(bstr.asOutParam()); H(); 2699 if (!bstr.isEmpty()) /* check convention for indicating default file. */ 2700 { 2701 rc = CFGMR3InsertStringW(pCfg, "File", bstr.raw()); RC_CHECK(); 2702 } 2733 2703 } 2734 2704 } … … 2749 2719 rc = CFGMR3InsertString(pLunL0, "Driver", "NetSniffer"); RC_CHECK(); 2750 2720 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 2751 hrc = aNetworkAdapter->COMGETTER(TraceFile)(&str); H(); 2752 if (str) /* check convention for indicating default file. */ 2753 { 2754 rc = CFGMR3InsertStringW(pCfg, "File", str); RC_CHECK(); 2755 } 2756 STR_FREE(); 2721 hrc = aNetworkAdapter->COMGETTER(TraceFile)(bstr.asOutParam()); H(); 2722 if (!bstr.isEmpty()) /* check convention for indicating default file. */ 2723 { 2724 rc = CFGMR3InsertStringW(pCfg, "File", bstr.raw()); RC_CHECK(); 2725 } 2757 2726 } 2758 2727 … … 2781 2750 2782 2751 /* Configure TFTP prefix and boot filename. */ 2783 hrc = virtualBox->COMGETTER(HomeFolder)(&str); H(); 2784 if (str && *str) 2785 { 2786 rc = CFGMR3InsertStringF(pCfg, "TFTPPrefix", "%ls%c%s", str, RTPATH_DELIMITER, "TFTP"); RC_CHECK(); 2787 } 2788 STR_FREE(); 2789 hrc = pMachine->COMGETTER(Name)(&str); H(); 2790 rc = CFGMR3InsertStringF(pCfg, "BootFile", "%ls.pxe", str); RC_CHECK(); 2791 STR_FREE(); 2792 2793 hrc = natDriver->COMGETTER(Network)(&str); H(); 2794 if (str) 2795 { 2796 rc = CFGMR3InsertStringW(pCfg, "Network", str); RC_CHECK(); 2752 hrc = virtualBox->COMGETTER(HomeFolder)(bstr.asOutParam()); H(); 2753 if (!bstr.isEmpty()) 2754 { 2755 rc = CFGMR3InsertStringF(pCfg, "TFTPPrefix", "%ls%c%s", bstr.raw(), RTPATH_DELIMITER, "TFTP"); RC_CHECK(); 2756 } 2757 hrc = pMachine->COMGETTER(Name)(bstr.asOutParam()); H(); 2758 rc = CFGMR3InsertStringF(pCfg, "BootFile", "%ls.pxe", bstr.raw()); RC_CHECK(); 2759 2760 hrc = natDriver->COMGETTER(Network)(bstr.asOutParam()); H(); 2761 if (!bstr.isEmpty()) 2762 { 2763 rc = CFGMR3InsertStringW(pCfg, "Network", bstr.raw()); RC_CHECK(); 2797 2764 } 2798 2765 else … … 2802 2769 rc = CFGMR3InsertStringF(pCfg, "Network", "10.0.%d.0/24", uSlot+2); RC_CHECK(); 2803 2770 } 2804 STR_FREE(); 2805 hrc = natDriver->COMGETTER(HostIP)(&str); H(); 2806 if (str) 2807 { 2808 rc = CFGMR3InsertStringW(pCfg, "BindIP", str); RC_CHECK(); 2809 } 2810 STR_FREE(); 2771 hrc = natDriver->COMGETTER(HostIP)(bstr.asOutParam()); H(); 2772 if (!bstr.isEmpty()) 2773 { 2774 rc = CFGMR3InsertStringW(pCfg, "BindIP", bstr.raw()); RC_CHECK(); 2775 } 2811 2776 ULONG mtu = 0; 2812 2777 ULONG sockSnd = 0; … … 2835 2800 rc = CFGMR3InsertInteger(pCfg, "TcpSnd", tcpSnd); RC_CHECK(); 2836 2801 } 2837 STR_FREE(); 2838 hrc = natDriver->COMGETTER(TftpPrefix)(&str); H(); 2839 if (str) 2802 hrc = natDriver->COMGETTER(TftpPrefix)(bstr.asOutParam()); H(); 2803 if (!bstr.isEmpty()) 2840 2804 { 2841 2805 rc = CFGMR3RemoveValue(pCfg, "TFTPPrefix"); RC_CHECK(); 2842 rc = CFGMR3InsertStringW(pCfg, "TFTPPrefix", str); RC_CHECK(); 2843 } 2844 STR_FREE(); 2845 hrc = natDriver->COMGETTER(TftpBootFile)(&str); H(); 2846 if (str) 2806 rc = CFGMR3InsertStringW(pCfg, "TFTPPrefix", bstr); RC_CHECK(); 2807 } 2808 hrc = natDriver->COMGETTER(TftpBootFile)(bstr.asOutParam()); H(); 2809 if (!bstr.isEmpty()) 2847 2810 { 2848 2811 rc = CFGMR3RemoveValue(pCfg, "BootFile"); RC_CHECK(); 2849 rc = CFGMR3InsertStringW(pCfg, "BootFile", str); RC_CHECK(); 2850 } 2851 STR_FREE(); 2852 hrc = natDriver->COMGETTER(TftpNextServer)(&str); H(); 2853 if (str) 2854 { 2855 rc = CFGMR3InsertStringW(pCfg, "NextServer", str); RC_CHECK(); 2812 rc = CFGMR3InsertStringW(pCfg, "BootFile", bstr); RC_CHECK(); 2813 } 2814 hrc = natDriver->COMGETTER(TftpNextServer)(bstr.asOutParam()); H(); 2815 if (!bstr.isEmpty()) 2816 { 2817 rc = CFGMR3InsertStringW(pCfg, "NextServer", bstr); RC_CHECK(); 2856 2818 } 2857 2819 BOOL fDnsFlag; … … 3079 3041 } 3080 3042 3081 hrc = hostInterface->COMGETTER(Id)( &str);3043 hrc = hostInterface->COMGETTER(Id)(bstr.asOutParam()); 3082 3044 if (FAILED(hrc)) 3083 3045 { … … 3085 3047 H(); 3086 3048 } 3087 Guid hostIFGuid(str); 3088 STR_FREE(); 3049 Guid hostIFGuid(bstr); 3089 3050 3090 3051 INetCfg *pNc; … … 3390 3351 case NetworkAttachmentType_Internal: 3391 3352 { 3392 hrc = aNetworkAdapter->COMGETTER(InternalNetwork)( &str); H();3393 if ( str && *str)3353 hrc = aNetworkAdapter->COMGETTER(InternalNetwork)(bstr.asOutParam()); H(); 3354 if (!bstr.isEmpty()) 3394 3355 { 3395 3356 if (fSniffer) … … 3405 3366 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); RC_CHECK(); 3406 3367 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 3407 rc = CFGMR3InsertStringW(pCfg, "Network", str); RC_CHECK();3368 rc = CFGMR3InsertStringW(pCfg, "Network", bstr); RC_CHECK(); 3408 3369 rc = CFGMR3InsertInteger(pCfg, "TrunkType", kIntNetTrunkType_WhateverNone); RC_CHECK(); 3409 networkName = str;3370 networkName = bstr; 3410 3371 trunkType = Bstr(TRUNKTYPE_WHATEVER); 3411 3372 } 3412 STR_FREE();3413 3373 break; 3414 3374 } … … 3474 3434 HifName.raw()); 3475 3435 3476 hrc = hostInterface->COMGETTER(Id)( &str);3436 hrc = hostInterface->COMGETTER(Id)(bstr.asOutParam()); 3477 3437 if (FAILED(hrc)) 3478 3438 { … … 3480 3440 H(); 3481 3441 } 3482 Guid hostIFGuid(str); 3483 STR_FREE(); 3442 Guid hostIFGuid(bstr); 3484 3443 3485 3444 INetCfg *pNc; … … 3617 3576 case NetworkAttachmentType_VDE: 3618 3577 { 3619 hrc = aNetworkAdapter->COMGETTER(VDENetwork)( &str); H();3578 hrc = aNetworkAdapter->COMGETTER(VDENetwork)(bstr.asOutParam()); H(); 3620 3579 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 3621 3580 rc = CFGMR3InsertString(pLunL0, "Driver", "VDE"); RC_CHECK(); 3622 3581 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 3623 if (str && *str) 3624 { 3625 rc = CFGMR3InsertStringW(pCfg, "Network", str); RC_CHECK(); 3626 networkName = str; 3627 } 3628 STR_FREE(); 3582 if (!bstr.isEmpty()) 3583 { 3584 rc = CFGMR3InsertStringW(pCfg, "Network", bstr); RC_CHECK(); 3585 networkName = bstr; 3586 } 3629 3587 break; 3630 3588 } … … 3706 3664 meAttachmentType[uInstance] = eAttachmentType; 3707 3665 3708 #undef STR_FREE3709 3666 #undef H 3710 3667 #undef RC_CHECK
Note:
See TracChangeset
for help on using the changeset viewer.