VirtualBox

Changeset 9728 in vbox


Ignore:
Timestamp:
Jun 16, 2008 3:12:54 PM (17 years ago)
Author:
vboxsync
Message:

Main: load the new hgcm service (SharedInfoService) for providing a host/guest configuration registry

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r8569 r9728  
    4545#include <VBox/version.h>
    4646#include <VBox/HostServices/VBoxClipboardSvc.h>
     47#ifdef VBOX_WITH_INFO_SVC
     48#include <VBox/HostServices/VBoxInfoSvc.h>
     49#endif /* VBOX_WITH_INFO_SVC */
    4750
    4851
     
    236239    PCFGMNODE pSataInst = NULL;     /* /Devices/ahci/0/ */
    237240        PCFGMNODE pBiosCfg = NULL;      /* /Devices/pcbios/0/Config/ */
     241#ifdef VBOX_WITH_INFO_SVC
     242    PCFGMNODE pGuest = NULL;        /* /Guest */
     243    PCFGMNODE pRegistry = NULL;     /* /Guest/Registry */
     244#endif /* VBOX_WITH_INFO_SVC defined */
    238245
    239246    rc = CFGMR3InsertNode(pRoot, "Devices", &pDevices);                             RC_CHECK();
     
    16391646        }
    16401647    }
     1648#ifdef VBOX_WITH_INFO_SVC
     1649    /*
     1650     * Shared information services
     1651     */
     1652    {
     1653        /* Load the service */
     1654        rc = pConsole->mVMMDev->hgcmLoadService ("VBoxSharedInfoSvc", "VBoxSharedInfoSvc");
     1655
     1656        if (VBOX_FAILURE (rc))
     1657        {
     1658            LogRel(("VBoxSharedInfoSvc is not available. rc = %Vrc\n", rc));
     1659            /* That is not a fatal failure. */
     1660            rc = VINF_SUCCESS;
     1661        }
     1662        else
     1663        {
     1664            rc = CFGMR3InsertNode(pRoot,     "Guest", &pGuest);                            RC_CHECK();
     1665            rc = CFGMR3InsertNode(pGuest,    "Registry", &pRegistry);                      RC_CHECK();
     1666            /* Setup the service. */
     1667            VBOXHGCMSVCPARM parm;
     1668
     1669            parm.type = VBOX_HGCM_SVC_PARM_PTR;
     1670            parm.u.pointer.addr = pRegistry;
     1671            parm.u.pointer.size = sizeof(pRegistry);  /* We don't actually care. */
     1672
     1673            pConsole->mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", svcInfo::SET_CFGM_NODE, 1, &parm);
     1674
     1675            Log(("Set VBoxSharedInfoSvc guest registry\n"));
     1676        }
     1677    }
     1678#endif /* VBOX_WITH_INFO_SVC defined */
    16411679
    16421680    /*
  • trunk/src/VBox/Main/Makefile.kmk

    r9360 r9728  
    4747 endif
    4848 VBOX_MAIN_DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
     49endif
     50ifdef VBOX_WITH_INFO_SVC
     51 VBOX_MAIN_DEFS += VBOX_WITH_INFO_SVC
    4952endif
    5053if1of ($(KBUILD_TARGET), linux freebsd solaris)
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