VirtualBox

Ignore:
Timestamp:
Sep 23, 2010 12:57:52 PM (14 years ago)
Author:
vboxsync
Message:

com/string: Remove bool conversion operator and other convenience error operators. They are hiding programming errors (like incorrect empty string checks, and in one case a free of the wrong pointer).

Location:
trunk/src/VBox/Frontends/VBoxHeadless
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r31974 r32718  
    162162                            {
    163163                                Bstr value1;
    164                                 hrc = machine->GetExtraData(Bstr("VRDP/DisconnectOnGuestLogout"), value1.asOutParam());
     164                                hrc = machine->GetExtraData(Bstr("VRDP/DisconnectOnGuestLogout").raw(),
     165                                                            value1.asOutParam());
    165166                                if (SUCCEEDED(hrc) && value1 == "1")
    166167                                {
     
    798799        if (id.isEmpty())
    799800        {
    800             rc = virtualBox->FindMachine(Bstr(name), m.asOutParam());
     801            rc = virtualBox->FindMachine(Bstr(name).raw(), m.asOutParam());
    801802            if (FAILED(rc))
    802803            {
     
    812813        {
    813814            /* Use the GUID. */
    814             rc = virtualBox->GetMachine(id, m.asOutParam());
     815            rc = virtualBox->GetMachine(id.raw(), m.asOutParam());
    815816            if (FAILED(rc))
    816817            {
     
    10541055            {
    10551056                Bstr bstr = vrdpPort;
    1056                 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(bstr));
     1057                CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(bstr.raw()));
    10571058            }
    10581059            /* set VRDP address if requested by the user */
    10591060            if (vrdpAddress != NULL)
    10601061            {
    1061                 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(NetAddress)(Bstr(vrdpAddress)));
     1062                CHECK_ERROR_BREAK(vrdpServer, COMSETTER(NetAddress)(Bstr(vrdpAddress).raw()));
    10621063            }
    10631064            /* enable VRDP server (only if currently disabled) */
  • trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp

    r31070 r32718  
    115115
    116116        // find ID by name
    117         CHECK_ERROR_BREAK(virtualBox, FindMachine(Bstr(name), m.asOutParam()));
     117        CHECK_ERROR_BREAK(virtualBox, FindMachine(Bstr(name).raw(),
     118                                                  m.asOutParam()));
    118119
    119120        if (!strcmp(operation, "on"))
     
    122123            RTPrintf ("Opening a new (remote) session...\n");
    123124            CHECK_ERROR_BREAK (m,
    124                                LaunchVMProcess(session, Bstr("vrdp"),
     125                               LaunchVMProcess(session, Bstr("vrdp").raw(),
    125126                                               NULL, progress.asOutParam()));
    126127
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette