VirtualBox

Ignore:
Timestamp:
Oct 9, 2009 12:23:32 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53341
Message:

VRDP port range API.

File:
1 edited

Legend:

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

    r23223 r23643  
    199199    }
    200200
     201    STDMETHOD(OnRemoteDisplayInfoChange)()
     202    {
     203#ifdef VBOX_WITH_VRDP
     204        if (gConsole)
     205        {
     206            ComPtr<IRemoteDisplayInfo> info;
     207            gConsole->COMGETTER(RemoteDisplayInfo)(info.asOutParam());
     208            if (info)
     209            {
     210                LONG port;
     211                info->COMGETTER(Port)(&port);
     212                if (port != 0)
     213                    RTPrintf("Listening on port %d\n", port);
     214                else
     215                    RTPrintf("VRDP server failed to start\n");
     216            }
     217        }
     218#endif
     219        return S_OK;
     220    }
     221
    201222    STDMETHOD(OnUSBControllerChange)()
    202223    {
     
    398419{
    399420#ifdef VBOX_WITH_VRDP
    400     ULONG vrdpPort = ~0U;
     421    const char *vrdpPort = NULL;
    401422    const char *vrdpAddress = NULL;
    402423    const char *vrdpEnabled = NULL;
     
    505526#ifdef VBOX_WITH_VRDP
    506527            case 'p':
    507                 vrdpPort = ValueUnion.u32;
     528                vrdpPort = ValueUnion.psz;
    508529                break;
    509530            case 'a':
     
    850871
    851872            /* set VRDP port if requested by the user */
    852             if (vrdpPort != ~0U)
    853                 CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Port)(vrdpPort));
    854             else
    855                 CHECK_ERROR_BREAK(vrdpServer, COMGETTER(Port)(&vrdpPort));
     873            if (vrdpPort != NULL)
     874            {
     875                Bstr bstr = vrdpPort;
     876                CHECK_ERROR_BREAK(vrdpServer, COMSETTER(Ports)(bstr));
     877            }
    856878            /* set VRDP address if requested by the user */
    857879            if (vrdpAddress != NULL)
     
    875897#endif
    876898        Log (("VBoxHeadless: Powering up the machine...\n"));
    877 #ifdef VBOX_WITH_VRDP
    878         if (fVRDPEnable)
    879             RTPrintf("Listening on port %d\n", !vrdpPort ? VRDP_DEFAULT_PORT : vrdpPort);
    880 #endif
    881899
    882900        ComPtr <IProgress> progress;
Note: See TracChangeset for help on using the changeset viewer.

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