VirtualBox

Changeset 33590 in vbox


Ignore:
Timestamp:
Oct 29, 2010 8:55:09 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67200
Message:

VRDE: removed VBOX_WITH_VRDP from source code, also some obsolete code removed.

Location:
trunk
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r33572 r33590  
    440440# The headless frontend.
    441441VBOX_WITH_HEADLESS = 1
    442 # Enable the VRDP server.
     442# Enable the build of VRDP server.
    443443VBOX_WITH_VRDP = 1
    444444# Enable support for video redirection VRDP channel.
     
    963963#
    964964ifndef VBOX_WITH_MAIN
    965  VBOX_WITH_VRDP=
    966965 VBOX_WITH_VBOXSDL=
    967966 VBOX_WITH_QTGUI=
  • trunk/src/VBox/Devices/Makefile.kmk

    r33567 r33590  
    10831083 Drivers_DEFS         += VBOX_WITH_USB
    10841084
    1085  ifdef VBOX_WITH_VRDP
    1086   Drivers_DEFS        += VBOX_WITH_VRDP
    1087   Drivers_SOURCES     += \
    1088         USB/vrdp/USBProxyDevice-vrdp.cpp
    1089  endif
     1085 Drivers_SOURCES     += \
     1086       USB/vrdp/USBProxyDevice-vrdp.cpp
    10901087
    10911088 Drivers_DEFS.darwin  += VUSB_HAVE_USBPROXY_DEVICE
  • trunk/src/VBox/Devices/USB/USBProxyDevice.cpp

    r33540 r33590  
    781781        pThis->pOps = &g_USBProxyDeviceHost;
    782782    else
    783 #ifdef VBOX_WITH_VRDP
    784783        pThis->pOps = &g_USBProxyDeviceVRDP;
    785 #else
    786         return VERR_NOT_SUPPORTED;
    787 #endif
    788784    rc = pThis->pOps->pfnOpen(pThis, szAddress, pvBackend);
    789785    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/USB/USBProxyDevice.h

    r33540 r33590  
    140140/** The Host backend. */
    141141extern const USBPROXYBACK g_USBProxyDeviceHost;
    142 #ifdef VBOX_WITH_VRDP
    143 /** The VRDP backend. */
     142/** The remote desktop backend. */
    144143extern const USBPROXYBACK g_USBProxyDeviceVRDP;
    145 #endif /* VBOX_WITH_VRDP */
    146144
    147145#ifdef RDESKTOP
     
    211209        RTFILE File;
    212210        int fd;
    213 #ifdef VBOX_WITH_VRDP
    214211        struct vrdp_priv
    215212        {
     
    217214            void *pDevice;
    218215        } vrdp;
    219 #endif /* VBOX_WITH_VRDP */
    220216    } Backend;
    221217} USBPROXYDEV;
  • trunk/src/VBox/Frontends/VBoxBFE/Makefile.kmk

    r32231 r33590  
    5252#VBoxBFE_DEFS += VBOX_SECURELABEL
    5353#endif
    54 ifdef VBOX_WITH_VRDP
    55 VBoxBFE_DEFS += VBOX_WITH_VRDP
    56 endif
    5754VBoxBFE_DEFS += VBOXBFE_WITHOUT_COM
    5855ifdef VBOX_WITH_LINUX_COMPILER_H
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r33540 r33590  
    390390             "  -tapfd<1-N> <fd>   Use existing TAP device, don't allocate\n"
    391391#endif
    392 #ifdef VBOX_WITH_VRDP
    393392             "  -vrdp [port]       Listen for VRDP connections on port (default if not specified)\n"
    394 #endif
    395393#ifdef VBOX_SECURELABEL
    396394             "  -securelabel       Display a secure VM label at the top of the screen\n"
     
    416414{
    417415    bool fFullscreen = false;
    418 #ifdef VBOX_WITH_VRDP
    419416    int32_t portVRDP = -1;
    420 #endif
    421417#ifdef VBOX_SECURELABEL
    422418    bool fSecureLabel = false;
     
    711707        }
    712708#endif /* RT_OS_LINUX */
    713 #ifdef VBOX_WITH_VRDP
    714709        else if (strcmp(pszArg, "-vrdp") == 0)
    715710        {
     
    725720            }
    726721        }
    727 #endif /* VBOX_WITH_VRDP */
    728722#ifdef VBOX_SECURELABEL
    729723        else if (strcmp(pszArg, "-securelabel") == 0)
  • trunk/src/VBox/Frontends/VBoxHeadless/Makefile.kmk

    r28800 r33590  
    4949VBoxHeadless_DEFS       = VBOX_FFMPEG
    5050VBoxHeadless_SOURCES    = VBoxHeadless.cpp
    51 ifdef VBOX_WITH_VRDP
    52  VBoxHeadless_DEFS     += VBOX_WITH_VRDP
    53  VBoxHeadless_SOURCES  += Framebuffer.cpp
    54 endif
     51VBoxHeadless_SOURCES  += Framebuffer.cpp
    5552ifdef VBOX_WITH_GUEST_PROPS
    5653 VBoxHeadless_DEFS     += VBOX_WITH_GUEST_PROPS
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r33556 r33590  
    5757#endif
    5858
    59 #ifdef VBOX_WITH_VRDP
    60 # include "Framebuffer.h"
    61 #endif
     59#include "Framebuffer.h"
    6260#ifdef VBOX_WITH_VNC
    6361# include "FramebufferVNC.h"
     
    315313                Assert(rdicev);
    316314
    317 #ifdef VBOX_WITH_VRDP
    318315                if (gConsole)
    319316                {
     
    337334                    }
    338335                }
    339 #endif
    340336                break;
    341337            }
     
    445441             "   -o, --vncpass <pw>                    Set the VNC server password\n"
    446442#endif
    447 #ifdef VBOX_WITH_VRDP
    448443             "   -v, -vrde, --vrde on|off|config       Enable (default) or disable the VRDE\n"
    449444             "                                         server or don't change the setting\n"
     
    454449             "                                         \"TCP/Address\" - interface IP the VRDE server\n"
    455450             "                                         will bind to\n"
    456 #endif
    457451#ifdef VBOX_FFMPEG
    458452             "   -c, -capture, --capture               Record the VM screen output to a file\n"
     
    518512extern "C" DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp)
    519513{
    520 #ifdef VBOX_WITH_VRDP
    521514    const char *vrdePort = NULL;
    522515    const char *vrdeAddress = NULL;
     
    524517    int cVRDEProperties = 0;
    525518    const char *aVRDEProperties[16];
    526 #endif
    527519#ifdef VBOX_WITH_VNC
    528520    bool        fVNCEnable      = false;
     
    575567        { "-startvm", 's', RTGETOPT_REQ_STRING },
    576568        { "--startvm", 's', RTGETOPT_REQ_STRING },
    577 #ifdef VBOX_WITH_VRDP
    578569        { "-vrdpport", 'p', RTGETOPT_REQ_STRING },     /* VRDE: deprecated. */
    579570        { "--vrdpport", 'p', RTGETOPT_REQ_STRING },    /* VRDE: deprecated. */
     
    586577        { "-vrdeproperty", 'e', RTGETOPT_REQ_STRING },
    587578        { "--vrdeproperty", 'e', RTGETOPT_REQ_STRING },
    588 #endif /* VBOX_WITH_VRDP defined */
    589579#ifdef VBOX_WITH_VNC
    590580        { "--vncport", 'm', RTGETOPT_REQ_INT32 },
     
    634624                pcszNameOrUUID = ValueUnion.psz;
    635625                break;
    636 #ifdef VBOX_WITH_VRDP
    637626            case 'p':
    638627                RTPrintf("Warning: '-p' or '-vrdpport' are deprecated. Use '-e \"TCP/Ports=%s\"'\n", ValueUnion.psz);
     
    652641                     RTPrintf("Warning: too many VRDE properties. Ignored: '%s'\n", ValueUnion.psz);
    653642                break;
    654 #endif /* VBOX_WITH_VRDP defined */
    655643#ifdef VBOX_WITH_VNC
    656644            case 'n':
     
    904892
    905893        unsigned uScreenId;
    906 #ifdef VBOX_WITH_VRDP
    907894        for (uScreenId = 0; uScreenId < cMonitors; uScreenId++)
    908895        {
     
    934921            break;
    935922        }
    936 #endif
     923
    937924        // fill in remaining slots with null framebuffers
    938925        for (uScreenId = 0; uScreenId < cMonitors; uScreenId++)
     
    10171004        }
    10181005
    1019 #ifdef VBOX_WITH_VRDP
    10201006        /* default is to enable the remote desktop server (backward compatibility) */
    10211007        BOOL fVRDEEnable = true;
     
    11111097            }
    11121098        }
    1113 #endif
     1099
    11141100        Log(("VBoxHeadless: Powering up the machine...\n"));
    11151101
  • trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk

    r33408 r33590  
    7070        $(if $(VBOX_WITH_VDE), VBOX_WITH_VDE) \
    7171        $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL) \
    72         $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
    73         $(if $(VBOX_WITH_VRDP), VBOX_WITH_VRDP)
     72        $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO)
    7473
    7574ifneq ($(KBUILD_TARGET),win)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r33540 r33590  
    486486            }
    487487        }
    488 #ifdef VBOX_WITH_VRDP
    489488        else if (   !strcmp(a->argv[1], "vrde")
    490489                 || !strcmp(a->argv[1], "vrdp"))
     
    567566            }
    568567        }
    569         else if (!strcmp(a->argv[1], "vrdesetproperty"))
     568        else if (!strcmp(a->argv[1], "vrdeproperty"))
    570569        {
    571570            if (a->argc <= 1 + 1)
     
    595594                    else
    596595                    {
    597                         errorArgument("Invalid --vrdesetproperty argument '%s'", a->argv[2]);
     596                        errorArgument("Invalid --vrdeproperty argument '%s'", a->argv[2]);
    598597                        rc = E_FAIL;
    599598                        break;
     
    612611            }
    613612        }
    614 #endif /* VBOX_WITH_VRDP */
    615613        else if (   !strcmp(a->argv[1], "usbattach")
    616614                 || !strcmp(a->argv[1], "usbdetach"))
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r33556 r33590  
    7474    bool fDarwin = false;
    7575#endif
    76 #ifdef VBOX_WITH_VRDP
    77     bool fVRDE = true;
    78 #else
    79     bool fVRDE = false;
    80 #endif
    8176#ifdef VBOX_WITH_VBOXSDL
    8277    bool fVBoxSDL = true;
     
    9388        fFreeBSD = true;
    9489        fDarwin = true;
    95         fVRDE = true;
    9690        fVBoxSDL = true;
    9791        u64Cmd = USAGE_ALL;
     
    310304                     "                            [--clipboard disabled|hosttoguest|guesttohost|\n"
    311305                     "                                         bidirectional]\n");
    312         if (fVRDE)
    313         {
    314             RTStrmPrintf(pStrm,
     306        RTStrmPrintf(pStrm,
    315307                     "                            [--vrde on|off]\n"
    316308                     "                            [--vrdelibrary default|<name>\n"
    317                      "                            [--vrdesetproperty <name=[value]>]\n"
     309                     "                            [--vrdeproperty <name=[value]>]\n"
    318310                     "                            [--vrdeauthtype null|external|guest]\n"
    319311                     "                            [--vrdemulticon on|off]\n"
     
    321313                     "                            [--vrdevideochannel on|off]\n"
    322314                     "                            [--vrdevideochannelquality <percent>]\n");
    323         }
    324315        RTStrmPrintf(pStrm,
    325316                     "                            [--usb on|off]\n"
     
    404395                     "                            usbattach <uuid>|<address> |\n"
    405396                     "                            usbdetach <uuid>|<address> |\n");
    406         if (fVRDE)
    407         {
    408             RTStrmPrintf(pStrm,
     397        RTStrmPrintf(pStrm,
    409398                     "                            vrde on|off |\n");
    410             RTStrmPrintf(pStrm,
    411                      "                            vrdesetproperty <name=[value]> |\n"
     399        RTStrmPrintf(pStrm,
     400                     "                            vrdeproperty <name=[value]> |\n"
    412401                     "                            vrdevideochannelquality <percent>\n");
    413         }
    414402        RTStrmPrintf(pStrm,
    415403                     "                            setvideomodehint <xres> <yres> <bpp> [display] |\n"
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r33556 r33590  
    132132    MODIFYVM_AUDIO,
    133133    MODIFYVM_CLIPBOARD,
    134 #ifdef VBOX_WITH_VRDP
    135134    MODIFYVM_VRDPPORT,                /* VRDE: deprecated */
    136135    MODIFYVM_VRDPADDRESS,             /* VRDE: deprecated */
     
    141140    MODIFYVM_VRDPVIDEOCHANNELQUALITY, /* VRDE: deprecated */
    142141    MODIFYVM_VRDP,                    /* VRDE: deprecated */
    143     MODIFYVM_VRDESETPROPERTY,
     142    MODIFYVM_VRDEPROPERTY,
    144143    MODIFYVM_VRDEAUTHTYPE,
    145144    MODIFYVM_VRDEMULTICON,
     
    149148    MODIFYVM_VRDELIBRARY,
    150149    MODIFYVM_VRDE,
    151 #endif
    152150    MODIFYVM_RTCUSEUTC,
    153151    MODIFYVM_USBEHCI,
     
    257255    { "--audio",                    MODIFYVM_AUDIO,                     RTGETOPT_REQ_STRING },
    258256    { "--clipboard",                MODIFYVM_CLIPBOARD,                 RTGETOPT_REQ_STRING },
    259 #ifdef VBOX_WITH_VRDP
    260257    { "--vrdpport",                 MODIFYVM_VRDPPORT,                  RTGETOPT_REQ_STRING },     /* deprecated */
    261258    { "--vrdpaddress",              MODIFYVM_VRDPADDRESS,               RTGETOPT_REQ_STRING },     /* deprecated */
     
    266263    { "--vrdpvideochannelquality",  MODIFYVM_VRDPVIDEOCHANNELQUALITY,   RTGETOPT_REQ_UINT32 },     /* deprecated */
    267264    { "--vrdp",                     MODIFYVM_VRDP,                      RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
    268     { "--vrdesetproperty",          MODIFYVM_VRDESETPROPERTY,           RTGETOPT_REQ_STRING },
     265    { "--vrdeproperty",             MODIFYVM_VRDEPROPERTY,              RTGETOPT_REQ_STRING },
    269266    { "--vrdeauthtype",             MODIFYVM_VRDEAUTHTYPE,              RTGETOPT_REQ_STRING },
    270267    { "--vrdemulticon",             MODIFYVM_VRDEMULTICON,              RTGETOPT_REQ_BOOL_ONOFF },
     
    274271    { "--vrdelibrary",              MODIFYVM_VRDELIBRARY,               RTGETOPT_REQ_STRING },
    275272    { "--vrde",                     MODIFYVM_VRDE,                      RTGETOPT_REQ_BOOL_ONOFF },
    276 #endif
    277273    { "--usbehci",                  MODIFYVM_USBEHCI,                   RTGETOPT_REQ_BOOL_ONOFF },
    278274    { "--usb",                      MODIFYVM_USB,                       RTGETOPT_REQ_BOOL_ONOFF },
     
    302298static void vrdeWarningDeprecatedProperty(const char *pszOption, const char *pszProperty, const char *pszArg)
    303299{
    304     RTStrmPrintf(g_pStdErr, "Warning: '--%s' is deprecated. Use '--vrdesetproperty \"%s=%s\"'.\n",
     300    RTStrmPrintf(g_pStdErr, "Warning: '--%s' is deprecated. Use '--vrdeproperty \"%s=%s\"'.\n",
    305301                 pszOption, pszProperty, pszArg);
    306302}
     
    18251821            }
    18261822
    1827 #ifdef VBOX_WITH_VRDP
    18281823            case MODIFYVM_VRDELIBRARY:
    18291824            {
     
    18451840            }
    18461841
    1847             case MODIFYVM_VRDESETPROPERTY:
     1842            case MODIFYVM_VRDEPROPERTY:
    18481843            {
    18491844                ComPtr<IVRDEServer> vrdeServer;
     
    18701865                            RTStrFree(pszProperty);
    18711866
    1872                             errorArgument("Invalid --vrdesetproperty argument '%s'", ValueUnion.psz);
     1867                            errorArgument("Invalid --vrdeproperty argument '%s'", ValueUnion.psz);
    18731868                            rc = E_FAIL;
    18741869                            break;
     
    19991994                break;
    20001995            }
    2001 #endif /* VBOX_WITH_VRDP */
    20021996
    20031997            case MODIFYVM_USBEHCI:
  • trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk

    r32083 r33590  
    5959  VBoxSDL_DEFS    += VBOX_SECURELABEL
    6060 endif
    61 endif
    62 ifdef VBOX_WITH_VRDP
    63  VBoxSDL_DEFS     += VBOX_WITH_VRDP
    6461endif
    6562VBoxSDL_DEFS.freebsd = VBOXSDL_WITH_X11
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r33540 r33590  
    601601             "  --hostkey <key> {<key2>} <mod> Set the host key to the values obtained using --detecthostkey\n"
    602602             "  --termacpi               Send an ACPI power button event when closing the window\n"
    603 #ifdef VBOX_WITH_VRDP
    604603             "  --vrdp <ports>           Listen for VRDP connections on one of specified ports (default if not specified)\n"
    605 #endif
    606604             "  --discardstate           Discard saved state (if present) and revert to last snapshot (if present)\n"
    607605#ifdef VBOX_SECURELABEL
     
    799797    char *cdromFile = NULL;
    800798    char *fdaFile   = NULL;
    801 #ifdef VBOX_WITH_VRDP
    802799    const char *portVRDP = NULL;
    803 #endif
    804800    bool fDiscardState = false;
    805801#ifdef VBOX_SECURELABEL
     
    11351131            }
    11361132        }
    1137 #ifdef VBOX_WITH_VRDP
    11381133        else if (   !strcmp(argv[curArg], "--vrdp")
    11391134                 || !strcmp(argv[curArg], "-vrdp"))
     
    11501145            }
    11511146        }
    1152 #endif /* VBOX_WITH_VRDP */
    11531147        else if (   !strcmp(argv[curArg], "--discardstate")
    11541148                 || !strcmp(argv[curArg], "-discardstate"))
     
    18751869    }
    18761870
    1877 #ifdef VBOX_WITH_VRDP
    18781871    if (portVRDP)
    18791872    {
     
    19021895        }
    19031896    }
    1904 #endif
    19051897
    19061898    rc = E_FAIL;
     
    26862678#endif /* VBOX_WITH_XPCOM */
    26872679
    2688 #ifdef VBOX_WITH_VRDP
    26892680    if (gVRDEServer)
    26902681        rc = gVRDEServer->COMSETTER(Enabled)(FALSE);
    2691 #endif
    26922682
    26932683    /*
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp

    r33540 r33590  
    146146#endif
    147147
    148 //#ifdef VBOX_WITH_VRDP
    149148    {   kSupIFT_Dll,  kSupID_SharedLib,          true, "VRDPAuth" SUPLIB_DLL_SUFF },
    150149    {   kSupIFT_Dll,  kSupID_SharedLib,          true, "VBoxVRDP" SUPLIB_DLL_SUFF },
    151 //#endif
    152150
    153151//#ifdef VBOX_WITH_HEADLESS
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r33540 r33590  
    425425    AssertComRCReturnRC(rc);
    426426
    427 #ifdef VBOX_WITH_VRDP
    428427    rc = mMachine->COMGETTER(VRDEServer)(unconst(mVRDEServer).asOutParam());
    429428    AssertComRCReturnRC(rc);
    430 #endif
    431429
    432430    /* Create associated child COM objects */
     
    597595    }
    598596
    599 #ifdef VBOX_WITH_VRDP
    600597    unconst(mVRDEServer).setNull();
    601 #endif
    602598
    603599    unconst(mControl).setNull();
     
    936932    AssertComRCReturnVoid(autoCaller.rc());
    937933
    938 #ifdef VBOX_WITH_VRDP
    939934    uint32_t u32Clients = ASMAtomicIncU32(&mcVRDPClients);
    940935    VMMDev *pDev;
     
    952947    NOREF(u32ClientId);
    953948    mDisplay->VideoAccelVRDP(true);
    954 #endif /* VBOX_WITH_VRDP */
    955949
    956950    LogFlowFuncLeave();
     
    968962    AssertReturnVoid(mConsoleVRDPServer);
    969963
    970 #ifdef VBOX_WITH_VRDP
    971964    uint32_t u32Clients = ASMAtomicDecU32(&mcVRDPClients);
    972965    VMMDev *pDev;
     
    984977
    985978    mDisplay->VideoAccelVRDP(false);
    986 #endif /* VBOX_WITH_VRDP */
    987979
    988980    if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_USB)
     
    991983    }
    992984
    993 #ifdef VBOX_WITH_VRDP
    994985    if (fu32Intercepted & VRDE_CLIENT_INTERCEPT_CLIPBOARD)
    995986    {
     
    10131004        }
    10141005    }
    1015 #endif /* VBOX_WITH_VRDP */
    10161006
    10171007    Bstr uuid;
     
    10301020#endif /* VBOX_WITH_GUEST_PROPS */
    10311021
    1032 #ifdef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    1033     MLDMemDump();
    1034 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    1035 
    10361022    LogFlowFuncLeave();
    10371023    return;
     
    10491035    NOREF(u32ClientId);
    10501036
    1051 #ifdef VBOX_WITH_VRDP
    10521037    ++mcAudioRefs;
    10531038
     
    10631048        }
    10641049    }
    1065 #endif
    10661050
    10671051    LogFlowFuncLeave();
     
    10931077    AssertReturnVoid(mConsoleVRDPServer);
    10941078
    1095 #ifdef VBOX_WITH_VRDP
    10961079    mConsoleVRDPServer->ClipboardCreate(u32ClientId);
    1097 #endif /* VBOX_WITH_VRDP */
    10981080
    10991081    LogFlowFuncLeave();
     
    73917373        }
    73927374
    7393 #ifdef VBOX_WITH_VRDP
    73947375        /* Create the VRDP server. In case of headless operation, this will
    73957376         * also create the framebuffer, required at VM creation.
     
    74427423        }
    74437424
    7444 #endif /* VBOX_WITH_VRDP */
    7445 
    74467425        ComPtr<IMachine> pMachine = console->machine();
    74477426        ULONG cCpus = 1;
     
    74687447        alock.enter();
    74697448
    7470 #ifdef VBOX_WITH_VRDP
    74717449        /* Enable client connections to the server. */
    74727450        console->consoleVRDPServer()->EnableConnections();
    7473 #endif /* VBOX_WITH_VRDP */
    74747451
    74757452        if (RT_SUCCESS(vrc))
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r33556 r33590  
    3333
    3434#include <VBox/err.h>
    35 #ifdef VBOX_WITH_VRDP
    3635#include <VBox/RemoteDesktop/VRDEOrders.h>
    37 #endif /* VBOX_WITH_VRDP */
    3836
    3937class VRDPConsoleListener :
     
    548546////////////////////////////////////////////////////////////////////////////////
    549547
    550 #ifdef VBOX_WITH_VRDP
    551548RTLDRMOD ConsoleVRDPServer::mVRDPLibrary;
    552549
     
    11811178    server->mConsole->getDisplay()->SetVideoModeHint(cWidth, cHeight, cBitsPerPixel, uScreenId);
    11821179}
    1183 #endif /* VBOX_WITH_VRDP */
    11841180
    11851181ConsoleVRDPServer::ConsoleVRDPServer(Console *console)
     
    12021198#endif
    12031199
    1204 #ifdef VBOX_WITH_VRDP
    12051200    mhServer = 0;
    12061201
     
    12351230
    12361231    mVRDPBindPort = -1;
    1237 #endif /* VBOX_WITH_VRDP */
    12381232
    12391233    mAuthLibrary = 0;
     
    12441238    Stop();
    12451239
    1246 #ifdef VBOX_WITH_VRDP
    12471240    if (mConsoleListener)
    12481241    {
     
    12631256        }
    12641257    }
    1265 #endif /* VBOX_WITH_VRDP */
    12661258
    12671259    if (RTCritSectIsInitialized(&mCritSect))
     
    12751267{
    12761268    LogFlowThisFunc(("\n"));
    1277 #ifdef VBOX_WITH_VRDP
     1269
    12781270    int rc = VINF_SUCCESS;
    12791271
     
    13261318        }
    13271319    }
    1328 #else
    1329     int rc = VERR_NOT_SUPPORTED;
    1330     LogRel(("VRDP: this version does not include the VRDP server.\n"));
    1331 #endif /* VBOX_WITH_VRDP */
     1320
    13321321    return rc;
    13331322}
     
    13351324void ConsoleVRDPServer::EnableConnections(void)
    13361325{
    1337 #ifdef VBOX_WITH_VRDP
    13381326    if (mpEntryPoints && mhServer)
    13391327    {
    13401328        mpEntryPoints->VRDEEnableConnections(mhServer, true);
    13411329    }
    1342 #endif /* VBOX_WITH_VRDP */
    13431330}
    13441331
    13451332void ConsoleVRDPServer::DisconnectClient(uint32_t u32ClientId, bool fReconnect)
    13461333{
    1347 #ifdef VBOX_WITH_VRDP
    13481334    if (mpEntryPoints && mhServer)
    13491335    {
    13501336        mpEntryPoints->VRDEDisconnect(mhServer, u32ClientId, fReconnect);
    13511337    }
    1352 #endif /* VBOX_WITH_VRDP */
    13531338}
    13541339
    13551340void ConsoleVRDPServer::MousePointerUpdate(const VRDECOLORPOINTER *pPointer)
    13561341{
    1357 #ifdef VBOX_WITH_VRDP
    13581342    if (mpEntryPoints && mhServer)
    13591343    {
    13601344        mpEntryPoints->VRDEColorPointer(mhServer, pPointer);
    13611345    }
    1362 #endif /* VBOX_WITH_VRDP */
    13631346}
    13641347
    13651348void ConsoleVRDPServer::MousePointerHide(void)
    13661349{
    1367 #ifdef VBOX_WITH_VRDP
    13681350    if (mpEntryPoints && mhServer)
    13691351    {
    13701352        mpEntryPoints->VRDEHidePointer(mhServer);
    13711353    }
    1372 #endif /* VBOX_WITH_VRDP */
    13731354}
    13741355
     
    13771358    Assert(VALID_PTR(this)); /** @todo r=bird: there are(/was) some odd cases where this buster was invalid on
    13781359                              * linux. Just remove this when it's 100% sure that problem has been fixed. */
    1379 #ifdef VBOX_WITH_VRDP
    13801360    if (mhServer)
    13811361    {
     
    13901370        }
    13911371    }
    1392 #endif /* VBOX_WITH_VRDP */
    13931372
    13941373#ifdef VBOX_WITH_USB
     
    17301709    int rc = VINF_SUCCESS;
    17311710
    1732 #ifdef VBOX_WITH_VRDP
    17331711    ConsoleVRDPServer *pServer = static_cast <ConsoleVRDPServer *>(pvExtension);
    17341712
     
    17891767            rc = VERR_NOT_SUPPORTED;
    17901768    }
    1791 #endif /* VBOX_WITH_VRDP */
    17921769
    17931770    return rc;
     
    20892066void ConsoleVRDPServer::SendUpdate(unsigned uScreenId, void *pvUpdate, uint32_t cbUpdate) const
    20902067{
    2091 #ifdef VBOX_WITH_VRDP
    20922068    if (mpEntryPoints && mhServer)
    20932069    {
    20942070        mpEntryPoints->VRDEUpdate(mhServer, uScreenId, pvUpdate, cbUpdate);
    20952071    }
    2096 #endif
    20972072}
    20982073
    20992074void ConsoleVRDPServer::SendResize(void) const
    21002075{
    2101 #ifdef VBOX_WITH_VRDP
    21022076    if (mpEntryPoints && mhServer)
    21032077    {
    21042078        mpEntryPoints->VRDEResize(mhServer);
    21052079    }
    2106 #endif
    21072080}
    21082081
    21092082void ConsoleVRDPServer::SendUpdateBitmap(unsigned uScreenId, uint32_t x, uint32_t y, uint32_t w, uint32_t h) const
    21102083{
    2111 #ifdef VBOX_WITH_VRDP
    21122084    VRDEORDERHDR update;
    21132085    update.x = x;
     
    21192091        mpEntryPoints->VRDEUpdate(mhServer, uScreenId, &update, sizeof(update));
    21202092    }
    2121 #endif
    21222093}
    21232094
    21242095void ConsoleVRDPServer::SendAudioSamples(void *pvSamples, uint32_t cSamples, VRDEAUDIOFORMAT format) const
    21252096{
    2126 #ifdef VBOX_WITH_VRDP
    21272097    if (mpEntryPoints && mhServer)
    21282098    {
    21292099        mpEntryPoints->VRDEAudioSamples(mhServer, pvSamples, cSamples, format);
    21302100    }
    2131 #endif
    21322101}
    21332102
    21342103void ConsoleVRDPServer::SendAudioVolume(uint16_t left, uint16_t right) const
    21352104{
    2136 #ifdef VBOX_WITH_VRDP
    21372105    if (mpEntryPoints && mhServer)
    21382106    {
    21392107        mpEntryPoints->VRDEAudioVolume(mhServer, left, right);
    21402108    }
    2141 #endif
    21422109}
    21432110
    21442111void ConsoleVRDPServer::SendUSBRequest(uint32_t u32ClientId, void *pvParms, uint32_t cbParms) const
    21452112{
    2146 #ifdef VBOX_WITH_VRDP
    21472113    if (mpEntryPoints && mhServer)
    21482114    {
    21492115        mpEntryPoints->VRDEUSBRequest(mhServer, u32ClientId, pvParms, cbParms);
    21502116    }
    2151 #endif
    21522117}
    21532118
    21542119void ConsoleVRDPServer::QueryInfo(uint32_t index, void *pvBuffer, uint32_t cbBuffer, uint32_t *pcbOut) const
    21552120{
    2156 #ifdef VBOX_WITH_VRDP
    21572121    if (index == VRDE_QI_PORT)
    21582122    {
     
    21692133        mpEntryPoints->VRDEQueryInfo(mhServer, index, pvBuffer, cbBuffer, pcbOut);
    21702134    }
    2171 #endif
    2172 }
    2173 
    2174 #ifdef VBOX_WITH_VRDP
     2135}
     2136
    21752137/* static */ int ConsoleVRDPServer::loadVRDPLibrary(const char *pszLibraryName)
    21762138{
     
    22312193    return rc;
    22322194}
    2233 #endif /* VBOX_WITH_VRDP */
    22342195
    22352196/*
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r33582 r33590  
    13911391}
    13921392
    1393 #ifdef VBOX_WITH_VRDP
    13941393/* Called always by one VRDP server thread. Can be thread-unsafe.
    13951394 */
     
    14561455#endif /* VBOX_WITH_OLD_VBVA_LOCK */
    14571456}
    1458 #endif /* VBOX_WITH_VRDP */
    14591457
    14601458static bool vbvaVerifyRingBuffer (VBVAMEMORY *pVbvaMemory)
  • trunk/src/VBox/Main/HostImpl.cpp

    r33540 r33590  
    128128#include <iprt/param.h>
    129129#include <iprt/env.h>
    130 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    131130#include <iprt/mem.h>
    132 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    133131#include <iprt/system.h>
    134132#ifdef RT_OS_SOLARIS
  • trunk/src/VBox/Main/HostPower.cpp

    r32056 r33590  
    2828#include "VirtualBoxImpl.h"
    2929
    30 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    3130#include <iprt/mem.h>
    32 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    3331
    3432HostPowerService::HostPowerService (VirtualBox *aVirtualBox)
  • trunk/src/VBox/Main/MachineImpl.cpp

    r33543 r33590  
    21422142STDMETHODIMP Machine::COMGETTER(VRDEServer)(IVRDEServer **vrdeServer)
    21432143{
    2144 #ifdef VBOX_WITH_VRDP
    21452144    if (!vrdeServer)
    21462145        return E_POINTER;
     
    21552154
    21562155    return S_OK;
    2157 #else
    2158     NOREF(vrdeServer);
    2159     ReturnComNotImplemented();
    2160 #endif
    21612156}
    21622157
     
    59805975    if (   strType == "headless"
    59815976        || strType == "capture"
    5982 #ifdef VBOX_WITH_VRDP
    59835977        || strType == "vrdp" /* Deprecated. Same as headless. */
    5984 #endif
    59855978       )
    59865979    {
     
    65326525    mBIOSSettings->init(this);
    65336526
    6534 #ifdef VBOX_WITH_VRDP
    65356527    /* create an associated VRDE object (default is disabled) */
    65366528    unconst(mVRDEServer).createObject();
    65376529    mVRDEServer->init(this);
    6538 #endif
    65396530
    65406531    /* create associated serial port objects */
     
    66316622    }
    66326623
    6633 #ifdef VBOX_WITH_VRDP
    66346624    if (mVRDEServer)
    66356625    {
     
    66376627        unconst(mVRDEServer).setNull();
    66386628    }
    6639 #endif
    66406629
    66416630    if (mBIOSSettings)
     
    71417130        mHWData->mHpetEnabled = data.fHpetEnabled;
    71427131
    7143 #ifdef VBOX_WITH_VRDP
    71447132        /* VRDEServer */
    71457133        rc = mVRDEServer->loadSettings(data.vrdeSettings);
    71467134        if (FAILED(rc)) return rc;
    7147 #endif
    71487135
    71497136        /* BIOS */
     
    81748161        data.fAccelerate2DVideo = !!mHWData->mAccelerate2DVideoEnabled;
    81758162
    8176 #ifdef VBOX_WITH_VRDP
    81778163        /* VRDEServer settings (optional) */
    81788164        rc = mVRDEServer->saveSettings(data.vrdeSettings);
    81798165        if (FAILED(rc)) throw rc;
    8180 #endif
    81818166
    81828167        /* BIOS (required) */
     
    93209305        mBIOSSettings->rollback();
    93219306
    9322 #ifdef VBOX_WITH_VRDP
    93239307    if (mVRDEServer && (mData->flModifications & IsModified_VRDEServer))
    93249308        mVRDEServer->rollback();
    9325 #endif
    93269309
    93279310    if (mAudioAdapter)
     
    94229405
    94239406    mBIOSSettings->commit();
    9424 #ifdef VBOX_WITH_VRDP
    94259407    mVRDEServer->commit();
    9426 #endif
    94279408    mAudioAdapter->commit();
    94289409    mUSBController->commit();
     
    95549535
    95559536    mBIOSSettings->copyFrom(aThat->mBIOSSettings);
    9556 #ifdef VBOX_WITH_VRDP
    95579537    mVRDEServer->copyFrom(aThat->mVRDEServer);
    9558 #endif
    95599538    mAudioAdapter->copyFrom(aThat->mAudioAdapter);
    95609539    mUSBController->copyFrom(aThat->mUSBController);
     
    98839862    unconst(mBIOSSettings).createObject();
    98849863    mBIOSSettings->init(this, aMachine->mBIOSSettings);
    9885 #ifdef VBOX_WITH_VRDP
    98869864    /* create another VRDEServer object that will be mutable */
    98879865    unconst(mVRDEServer).createObject();
    98889866    mVRDEServer->init(this, aMachine->mVRDEServer);
    9889 #endif
    98909867    /* create another audio adapter object that will be mutable */
    98919868    unconst(mAudioAdapter).createObject();
  • trunk/src/VBox/Main/Makefile.kmk

    r33474 r33590  
    207207        $(VBOX_MAIN_DEFS) \
    208208        $(if $(VBOX_WITH_VBOXSDL),VBOX_WITH_VBOXSDL,) \
    209         $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
    210209        $(if $(VBOX_WITH_HEADLESS),VBOX_WITH_HEADLESS,) \
    211210        $(if $(VBOX_WITH_QTGUI),VBOX_WITH_QTGUI,) \
     
    319318        DisplayResampleImage.cpp \
    320319        $(VBOX_AUTOGEN_EVENT_CPP) \
    321         $(if $(VBOX_WITH_VRDP),VRDPServerImpl.cpp,) \
     320        VRDPServerImpl.cpp \
    322321        $(if $(VBOX_WITH_XPCOM),xpcom/server.cpp,) \
    323322        $(VBOX_XML_SCHEMADEFS_CPP) \
     
    552551        $(VBOX_MAIN_DEFS) \
    553552        VBOX_COM_INPROC \
    554         $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
    555553        $(if $(VBOX_WITH_VRDP_VIDEO_CHANNEL),VBOX_WITH_VRDP_VIDEO_CHANNEL,) \
    556554        $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
     
    777775        ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
    778776IDL_DEFS = /nologo
    779 ifdef VBOX_WITH_VRDP
    780  IDL_DEFS += /D VBOX_WITH_VRDP
    781 endif
    782777
    783778$(VBOX_IDL_FILE.MSCOM): $(VBOX_PATH_MAIN_SRC)/idl/midl.xsl $(VBOX_XIDL_FILE) | $$(dir $$@)
  • trunk/src/VBox/Main/Performance.cpp

    r32056 r33590  
    3535#include <VBox/err.h>
    3636#include <iprt/string.h>
    37 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    3837#include <iprt/mem.h>
    39 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    4038#include <iprt/cpuset.h>
    4139
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r33540 r33590  
    10061006    mBIOSSettings->initCopy(this, mPeer->mBIOSSettings);
    10071007
    1008 #ifdef VBOX_WITH_VRDP
    10091008    unconst(mVRDEServer).createObject();
    10101009    mVRDEServer->initCopy(this, mPeer->mVRDEServer);
    1011 #endif
    10121010
    10131011    unconst(mAudioAdapter).createObject();
     
    10991097    mBIOSSettings->init(this);
    11001098
    1101 #ifdef VBOX_WITH_VRDP
    11021099    unconst(mVRDEServer).createObject();
    11031100    mVRDEServer->init(this);
    1104 #endif
    11051101
    11061102    unconst(mAudioAdapter).createObject();
  • trunk/src/VBox/Main/USBProxyService.cpp

    r33540 r33590  
    2929#include <iprt/semaphore.h>
    3030#include <iprt/thread.h>
    31 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    3231#include <iprt/mem.h>
    33 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    3432#include <iprt/string.h>
    3533
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r33540 r33590  
    3333///////////////////////////////////////////////////////////////////////////////
    3434
    35 #ifdef VBOX_WITH_VRDP
    3635typedef struct _VRDPInputSynch
    3736{
     
    4746    bool fClientScrollLock;
    4847} VRDPInputSynch;
    49 #endif /* VBOX_WITH_VRDP */
    5048
    5149/* Member of Console. Helper class for VRDP server management. Not a COM class. */
     
    6058    void NotifyAbsoluteMouse (bool fGuestWantsAbsolute)
    6159    {
    62 #ifdef VBOX_WITH_VRDP
    6360        m_fGuestWantsAbsolute = fGuestWantsAbsolute;
    64 #else
    65         NOREF(fGuestWantsAbsolute);
    66 #endif /* VBOX_WITH_VRDP */
    6761    }
    6862
    6963    void NotifyKeyboardLedsChange (BOOL fNumLock, BOOL fCapsLock, BOOL fScrollLock)
    7064    {
    71 #ifdef VBOX_WITH_VRDP
    7265        bool fGuestNumLock    = (fNumLock != FALSE);
    7366        bool fGuestCapsLock   = (fCapsLock != FALSE);
     
    8881        m_InputSynch.fGuestCapsLock   = fGuestCapsLock;
    8982        m_InputSynch.fGuestScrollLock = fGuestScrollLock;
    90 #else
    91         NOREF(fNumLock);
    92         NOREF(fCapsLock);
    93         NOREF(fScrollLock);
    94 #endif /* VBOX_WITH_VRDP */
    9583    }
    9684
     
    146134    Console *mConsole;
    147135
    148 #ifdef VBOX_WITH_VRDP
    149136    HVRDESERVER mhServer;
    150137
     
    183170
    184171    int32_t mVRDPBindPort;
    185 #endif /* VBOX_WITH_VRDP */
    186172
    187173    RTCRITSECT mCritSect;
  • trunk/src/VBox/Main/include/DHCPServerRunner.h

    r32056 r33590  
    1818#include <iprt/types.h>
    1919#include <iprt/string.h>
    20 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    2120#include <iprt/mem.h>
    22 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    2321#include <VBox/com/string.h>
    2422
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r33146 r33590  
    148148    bool VideoAccelAllowed (void);
    149149
    150 #ifdef VBOX_WITH_VRDP
    151150    void VideoAccelVRDP (bool fEnable);
    152 #endif /* VBOX_WITH_VRDP */
    153151
    154152    // IEventListener methods
  • trunk/src/VBox/Main/include/Logging.h

    r33540 r33590  
    9090#define MyLog(a)            MyLogIt(LOG_INSTANCE, RTLOGGRPFLAGS_FLOW, LOG_GROUP, a)
    9191
    92 #ifdef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    93 #include <iprt/err.h>
    94 #include <iprt/log.h>
    95 #include <iprt/critsect.h>
    96 #include <iprt/mem.h>
    97 
    98 void *MLDMemAllocDbg (size_t cb, bool fTmp, bool fZero, const char *pszCaller, int iLine);
    99 void *MLDMemReallocDbg (void *pv, size_t cb, const char *pszCaller, int iLine);
    100 void MLDMemFreeDbg (void *pv, bool fTmp);
    101 
    102 void MLDMemInit (const char *pszPrefix);
    103 void MLDMemUninit (void);
    104 
    105 void MLDMemDump (void);
    106 
    107 #define MLDMemAlloc(__cb)          MLDMemAllocDbg   (__cb, false /* fTmp */, false /* fZero */, __FILE__,  __LINE__)
    108 #define MLDMemAllocZ(__cb)         MLDMemAllocDbg   (__cb, false /* fTmp */, true /* fZero */,  __FILE__,  __LINE__)
    109 #define MLDMemTmpAlloc(__cb)       MLDMemAllocDbg   (__cb, true /* fTmp */,  false /* fZero */, __FILE__,  __LINE__)
    110 #define MLDMemTmpAllocZ(__cb)      MLDMemAllocDbg   (__cb, true /* fTmp */,  true /* fZero */,  __FILE__,  __LINE__)
    111 #define MLDMemRealloc(__pv, __cb)  MLDMemReallocDbg (__pv, __cb, __FILE__,  __LINE__)
    112 #define MLDMemFree(__pv)           MLDMemFreeDbg    (__pv, false /* fTmp */)
    113 #define MLDMemTmpFree(__pv)        MLDMemFreeDbg    (__pv, true /* fTmp */)
    114 
    115 #undef RTMemAlloc
    116 #define RTMemAlloc     MLDMemAlloc
    117 #undef RTMemAllocZ
    118 #define RTMemAllocZ    MLDMemAllocZ
    119 #undef RTMemTmpAlloc
    120 #define RTMemTmpAlloc  MLDMemTmpAlloc
    121 #undef RTMemTmpAllocZ
    122 #define RTMemTmpAllocZ MLDMemTmpAllocZ
    123 #undef RTMemRealloc
    124 #define RTMemRealloc   MLDMemRealloc
    125 #undef RTMemFree
    126 #define RTMemFree      MLDMemFree
    127 #undef RTMemTmpFree
    128 #define RTMemTmpFree   MLDMemTmpFree
    129 #endif /* VBOX_WITH_MLD_MEMLEAK_DETECTOR */
    130 
    13192#endif // ____H_LOGGING
    13293/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/win/PerformanceWin.cpp

    r33540 r33590  
    3535#include <iprt/err.h>
    3636#include <iprt/mp.h>
    37 #ifndef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    3837#include <iprt/mem.h>
    39 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    4038
    4139#include <map>
  • trunk/src/VBox/Main/win/dllmain.cpp

    r32056 r33590  
    2626#include <iprt/initterm.h>
    2727
    28 /* Memory leak detection. */
    29 #ifdef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    30 typedef struct _MLDMemBlock
    31 {
    32     unsigned uSignature;
    33     struct _MLDMemBlock *next;
    34     struct _MLDMemBlock *prev;
    35     const char *pszCaller;
    36     int iLine;
    37     bool fTmp;
    38     size_t size;
    39     void *pv;
    40 } MLDMemBlock;
    41 
    42 static MLDMemBlock *gMemBlockListHead;
    43 static RTCRITSECT g_critsect;
    44 static const char *gszMDLPrefix = "MLDMEM";
    45 static int gAllocated = 0;
    46 static int gFreed = 0;
    47 static bool gfMLD = false;
    48 
    49 
    50 #define MLD_BLOCK_TO_PTR(__p) ((__p)? (void *) ( (uint8_t *)(__p) + sizeof (MLDMemBlock) ) : NULL)
    51 #define MLD_PTR_TO_BLOCK(__p) ((__p)? (MLDMemBlock *)((uint8_t *)(__p) - sizeof (MLDMemBlock)): NULL)
    52 
    53 #define MLD_BLOCK_SIGNATURE 0xFEDCBA98
    54 
    55 static void vrdpMemLock (void)
    56 {
    57     int rc = RTCritSectEnter (&g_critsect);
    58     AssertRC(rc);
    59 }
    60 
    61 static void vrdpMemUnlock (void)
    62 {
    63     RTCritSectLeave (&g_critsect);
    64 }
    65 
    66 static void vrdpMemAppendBlock (MLDMemBlock *pBlock)
    67 {
    68     pBlock->next = gMemBlockListHead;
    69     pBlock->prev = NULL;
    70 
    71     if (gMemBlockListHead)
    72     {
    73         gMemBlockListHead->prev = pBlock;
    74     }
    75     gMemBlockListHead = pBlock;
    76 }
    77 
    78 static void vrdpMemExcludeBlock (MLDMemBlock *pBlock)
    79 {
    80     /* Assert that the block is in the list. */
    81     MLDMemBlock *pIter = gMemBlockListHead;
    82 
    83     while (pIter && pIter != pBlock)
    84     {
    85         pIter = pIter->next;
    86     }
    87 
    88     Assert (pIter == pBlock);
    89 
    90     /* Exclude the block from list. */
    91     if (pBlock->next)
    92     {
    93         pBlock->next->prev = pBlock->prev;
    94     }
    95     else
    96     {
    97         /* do nothing */
    98     }
    99 
    100     if (pBlock->prev)
    101     {
    102         pBlock->prev->next = pBlock->next;
    103     }
    104     else
    105     {
    106         gMemBlockListHead = pBlock->next;
    107     }
    108 
    109     pBlock->next = NULL;
    110     pBlock->prev = NULL;
    111 }
    112 
    113 void *MLDMemAllocDbg (size_t cb, bool fTmp, bool fZero, const char *pszCaller, int iLine)
    114 {
    115     size_t cbAlloc;
    116     MLDMemBlock *pBlock;
    117 
    118     // LogFlowFunc(("cb = %d, fTmp = %d, fZero = %d, pszCaller = %s, iLine = %d\n",
    119     //              cb, fTmp, fZero, pszCaller, iLine));
    120 
    121     vrdpMemLock ();
    122 
    123     cbAlloc = cb + sizeof (MLDMemBlock);
    124 
    125     pBlock = (MLDMemBlock *)RTMemAlloc (cbAlloc);
    126 
    127     if (pBlock)
    128     {
    129         if (fZero)
    130         {
    131             memset (pBlock, 0, cbAlloc);
    132         }
    133 
    134         pBlock->pszCaller  = pszCaller;
    135         pBlock->iLine      = iLine;
    136         pBlock->size       = cb;
    137         pBlock->fTmp       = fTmp;
    138         pBlock->uSignature = MLD_BLOCK_SIGNATURE;
    139         pBlock->pv         = MLD_BLOCK_TO_PTR(pBlock);
    140 
    141         vrdpMemAppendBlock (pBlock);
    142 
    143         gAllocated++;
    144     }
    145 
    146     vrdpMemUnlock ();
    147 
    148     return MLD_BLOCK_TO_PTR(pBlock);
    149 }
    150 
    151 void *MLDMemReallocDbg (void *pv, size_t cb, const char *pszCaller, int iLine)
    152 {
    153     MLDMemBlock *pBlock;
    154 
    155     // LogFlowFunc(("pv = %p, cb = %d, pszCaller = %s, iLine = %d\n",
    156     //              pv, cb, pszCaller, iLine));
    157 
    158     vrdpMemLock ();
    159 
    160     pBlock = MLD_PTR_TO_BLOCK(pv);
    161 
    162     if (pBlock)
    163     {
    164         size_t cbAlloc = cb + sizeof (MLDMemBlock);
    165 
    166         Assert(pBlock->uSignature == MLD_BLOCK_SIGNATURE);
    167         Assert(!pBlock->fTmp); /* Tmp blocks are not to be reallocated. */
    168         Assert(pBlock->pv == pv);
    169 
    170         vrdpMemExcludeBlock (pBlock);
    171 
    172         pBlock = (MLDMemBlock *)RTMemRealloc (pBlock, cbAlloc);
    173 
    174         pBlock->pszCaller = pszCaller;
    175         pBlock->iLine     = iLine;
    176         pBlock->size      = cb;
    177 
    178         vrdpMemAppendBlock (pBlock);
    179 
    180         pv = MLD_BLOCK_TO_PTR(pBlock);
    181 
    182         pBlock->pv = pv;
    183     }
    184     else
    185     {
    186         pv = MLDMemAllocDbg (cb, false /* fTmp */, false /* fZero */, pszCaller, iLine);
    187     }
    188 
    189     vrdpMemUnlock ();
    190 
    191     return pv;
    192 }
    193 
    194 void MLDMemFreeDbg (void *pv, bool fTmp)
    195 {
    196     MLDMemBlock *pBlock;
    197 
    198     // LogFlowFunc(("pv = %d, fTmp = %d\n",
    199     //              pv, fTmp));
    200 
    201     vrdpMemLock ();
    202 
    203     pBlock = MLD_PTR_TO_BLOCK(pv);
    204 
    205     if (pBlock)
    206     {
    207         Assert(pBlock->uSignature == MLD_BLOCK_SIGNATURE);
    208         Assert(pBlock->fTmp == fTmp);
    209         Assert(pBlock->pv == pv);
    210 
    211         vrdpMemExcludeBlock (pBlock);
    212 
    213         RTMemFree (pBlock);
    214         gFreed++;
    215     }
    216 
    217     vrdpMemUnlock ();
    218 }
    219 
    220 
    221 void MLDMemDump (void)
    222 {
    223     MLDMemBlock *pBlock = gMemBlockListHead;
    224 
    225     int c = 0;
    226     size_t size = 0;
    227     while (pBlock)
    228     {
    229         LogRel(("%s-MLDMEM: %p 0x%8X bytes %d %s@%d\n", gszMDLPrefix, pBlock, pBlock->size, pBlock->fTmp, pBlock->pszCaller, pBlock->iLine));
    230         c++;
    231         size += pBlock->size;
    232         pBlock = pBlock->next;
    233     }
    234 
    235     LogRel(("%s-MLDMEM: %d/%d/%d blocks allocated/freed/left, total %dKb in use.\n", gszMDLPrefix, gAllocated, gFreed, c, size / 1024));
    236 }
    237 
    238 static int gcRefsMem = 0;
    239 
    240 void MLDMemInit (const char *pszPrefix)
    241 {
    242     if (++gcRefsMem == 1)
    243     {
    244         int rc = RTCritSectInit (&g_critsect);
    245         AssertRC(rc);
    246         gMemBlockListHead = NULL;
    247         gszMDLPrefix = pszPrefix;
    248         gAllocated = 0;
    249         gFreed = 0;
    250         gfMLD = true;
    251     }
    252 }
    253 
    254 void MLDMemUninit (void)
    255 {
    256     MLDMemDump();
    257 
    258     if (--gcRefsMem == 0)
    259     {
    260         gfMLD = false;
    261         gMemBlockListHead = NULL;
    262 
    263         if (RTCritSectIsInitialized (&g_critsect))
    264         {
    265             RTCritSectDelete (&g_critsect);
    266         }
    267     }
    268 }
    269 
    270 void* operator new (std::size_t size) throw (std::bad_alloc)
    271 {
    272     if (gfMLD)
    273         return MLDMemAllocDbg (size, false /* bool fTmp */, true /* bool fZero */, __FILE__, __LINE__);
    274     else
    275         return malloc(size);
    276 }
    277 
    278 void operator delete (void* ptr) throw ()
    279 {
    280     if (gfMLD)
    281         MLDMemFreeDbg (ptr, false /* bool fTmp */);
    282     else
    283         free(ptr);
    284 }
    285 
    286 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    287 
    28828CComModule _Module;
    28929
     
    30545        // idempotent, so doesn't harm, and needed for COM embedding scenario
    30646        RTR3Init();
    307 
    308 #ifdef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    309         MLDMemInit("VBOXC");
    310 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    31147    }
    31248    else if (dwReason == DLL_PROCESS_DETACH)
    31349    {
    31450        _Module.Term();
    315 
    316 #ifdef VBOX_WITH_VRDP_MEMLEAK_DETECTOR
    317         MLDMemUninit();
    318 #endif /* !VBOX_WITH_VRDP_MEMLEAK_DETECTOR */
    31951    }
    32052    return TRUE;
  • trunk/src/VBox/Main/xpcom/server.cpp

    r33540 r33590  
    143143NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SharedFolder, ISharedFolder)
    144144
    145 #ifdef VBOX_WITH_VRDP
    146145NS_DECL_CLASSINFO(VRDEServer)
    147146NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDEServer, IVRDEServer)
    148 #endif
    149147
    150148NS_DECL_CLASSINFO(Host)
  • trunk/src/libs/Makefile.kmk

    r32233 r33590  
    4949endif
    5050
    51 # OpenSSL for VRDP.
    52 #if defined(VBOX_WITH_VRDP) && !defined(VBOX_ONLY_SDK) - this isn't right, thus:
     51# OpenSSL.
    5352if !defined(VBOX_ONLY_SDK) \
    5453 && "$(SDK_VBOX_OPENSSL_INCS)" == "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)"
     
    5655endif
    5756
    58 # libjpeg for VRDP video acceleration
     57# libjpeg for VRDP video redirection
    5958if defined(VBOX_WITH_VRDP) && defined(VBOX_WITH_VRDP_VIDEO_CHANNEL)
    6059 include $(PATH_SUB_CURRENT)/jpeg-8a/Makefile.kmk
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