VirtualBox

Changeset 68828 in vbox


Ignore:
Timestamp:
Sep 22, 2017 2:15:57 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118082
Message:

ExtPack: Split up main module of extension pack, have a mandatory one for VBoxSVC and an optional one for the VM process. This finally eliminates the need to drag VBoxVMM into VBoxSVC on some platforms. Many other small cleanups, including reliably calling the unload hook from within a VM process, copy/paste with forgotten adjustments (e.g. extpacks still talking about skeleton) and spelling fixes.

Location:
trunk
Files:
14 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/ExtPack/ExtPack.h

    r62476 r68828  
    44
    55/*
    6  * Copyright (C) 2010-2016 Oracle Corporation
     6 * Copyright (C) 2010-2017 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4848typedef enum VBOXEXTPACKMODKIND
    4949{
    50     /** Zero is invalid as alwasy. */
     50    /** Zero is invalid as always. */
    5151    VBOXEXTPACKMODKIND_INVALID = 0,
    5252    /** Raw-mode context module. */
     
    6767typedef enum VBOXEXTPACKCTX
    6868{
    69     /** Zero is invalid as alwasy. */
     69    /** Zero is invalid as always. */
    7070    VBOXEXTPACKCTX_INVALID = 0,
    7171    /** The per-user daemon process (VBoxSVC). */
    7272    VBOXEXTPACKCTX_PER_USER_DAEMON,
    73     /** A VM process.
    74      * @remarks This will also include the client processes in v4.0.  */
     73    /** A VM process. */
    7574    VBOXEXTPACKCTX_VM_PROCESS,
    76     /** A API client process.
    77      * @remarks This will not be returned by VirtualBox 4.0. */
     75    /** An API client process.
     76     * @remarks This will not be returned by VirtualBox yet. */
    7877    VBOXEXTPACKCTX_CLIENT_PROCESS,
    7978    /** End of the valid values (exclusive). */
     
    210209 * Callback table returned by VBoxExtPackRegister.
    211210 *
     211 * All the callbacks are called the context of the per-user service (VBoxSVC).
     212 *
    212213 * This must be valid until the extension pack main module is unloaded.
    213214 */
     
    223224     * Hook for doing setups after the extension pack was installed.
    224225     *
    225      * This is called in the context of the per-user service (VBoxSVC).
    226      *
    227226     * @returns VBox status code.
    228227     * @retval  VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL if the extension pack
     
    241240     * Hook for cleaning up before the extension pack is uninstalled.
    242241     *
    243      * This is called in the context of the per-user service (VBoxSVC).
    244      *
    245242     * @returns VBox status code.
    246243     * @param   pThis       Pointer to this structure.
     
    255252     * Hook for doing work after the VirtualBox object is ready.
    256253     *
    257      * This is called in the context of the per-user service (VBoxSVC).  The
    258      * pfnConsoleReady method is the equivalent for the VM/client process.
    259      *
    260254     * @param   pThis       Pointer to this structure.
    261255     * @param   pVirtualBox The VirtualBox interface.
     
    264258
    265259    /**
    266      * Hook for doing work after the Console object is ready.
    267      *
    268      * This is called in the context of the VM/client process.  The
    269      * pfnVirtualBoxReady method is the equivalent for the per-user service
    270      * (VBoxSVC).
    271      *
    272      * @param   pThis       Pointer to this structure.
    273      * @param   pConsole    The Console interface.
    274      */
    275     DECLCALLBACKMEMBER(void, pfnConsoleReady)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole);
    276 
    277     /**
    278260     * Hook for doing work before unloading.
    279      *
    280      * This is called both in the context of the per-user service (VBoxSVC) and
    281      * in context of the VM process (VBoxC).
    282261     *
    283262     * @param   pThis       Pointer to this structure.
     
    292271     * Hook for changing the default VM configuration upon creation.
    293272     *
    294      * This is called in the context of the per-user service (VBoxSVC).
    295      *
    296273     * @returns VBox status code.
    297274     * @param   pThis       Pointer to this structure.
     
    303280
    304281    /**
    305      * Hook for configuring the VMM for a VM.
    306      *
    307      * This is called in the context of the VM process (VBoxC).
    308      *
    309      * @returns VBox status code.
    310      * @param   pThis       Pointer to this structure.
    311      * @param   pConsole    The console interface.
    312      * @param   pVM         The cross context VM structure.
    313      */
    314     DECLCALLBACKMEMBER(int, pfnVMConfigureVMM)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    315 
    316     /**
    317      * Hook for doing work right before powering on the VM.
    318      *
    319      * This is called in the context of the VM process (VBoxC).
    320      *
    321      * @returns VBox status code.
    322      * @param   pThis       Pointer to this structure.
    323      * @param   pConsole    The console interface.
    324      * @param   pVM         The cross context VM structure.
    325      */
    326     DECLCALLBACKMEMBER(int, pfnVMPowerOn)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    327 
    328     /**
    329      * Hook for doing work after powering on the VM.
    330      *
    331      * This is called in the context of the VM process (VBoxC).
    332      *
    333      * @param   pThis       Pointer to this structure.
    334      * @param   pConsole    The console interface.
    335      * @param   pVM         The cross context VM structure. Can be NULL.
    336      */
    337     DECLCALLBACKMEMBER(void, pfnVMPowerOff)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    338 
    339     /**
    340282     * Query the IUnknown interface to an object in the main module.
    341283     *
    342      * This is can be called in any context.
    343      *
    344284     * @returns IUnknown pointer (referenced) on success, NULL on failure.
    345285     * @param   pThis       Pointer to this structure.
     
    348288    DECLCALLBACKMEMBER(void *, pfnQueryObject)(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
    349289
    350     DECLR3CALLBACKMEMBER(int, pfnReserved1,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
    351     DECLR3CALLBACKMEMBER(int, pfnReserved2,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
    352     DECLR3CALLBACKMEMBER(int, pfnReserved3,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
    353     DECLR3CALLBACKMEMBER(int, pfnReserved4,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
    354     DECLR3CALLBACKMEMBER(int, pfnReserved5,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
    355     DECLR3CALLBACKMEMBER(int, pfnReserved6,(PCVBOXEXTPACKHLP pHlp)); /**< Reserved for minor structure revisions. */
     290    DECLR3CALLBACKMEMBER(int, pfnReserved1,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
     291    DECLR3CALLBACKMEMBER(int, pfnReserved2,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
     292    DECLR3CALLBACKMEMBER(int, pfnReserved3,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
     293    DECLR3CALLBACKMEMBER(int, pfnReserved4,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
     294    DECLR3CALLBACKMEMBER(int, pfnReserved5,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
     295    DECLR3CALLBACKMEMBER(int, pfnReserved6,(PCVBOXEXTPACKREG pThis)); /**< Reserved for minor structure revisions. */
    356296
    357297    /** Reserved for minor structure revisions. */
     
    362302} VBOXEXTPACKREG;
    363303/** Current version of the VBOXEXTPACKREG structure.  */
    364 #define VBOXEXTPACKREG_VERSION        RT_MAKE_U32(1, 1)
     304#define VBOXEXTPACKREG_VERSION        RT_MAKE_U32(2, 0)
    365305
    366306
     
    368308 * The VBoxExtPackRegister callback function.
    369309 *
    370  * PDM will invoke this function after loading a driver module and letting
    371  * the module decide which drivers to register and how to handle conflicts.
     310 * The Main API (as in VBoxSVC) will invoke this function after loading an
     311 * extension pack Main module. Its job is to do version compatibility checking
     312 * and returning the extension pack registration structure.
    372313 *
    373314 * @returns VBox status code.
     
    388329
    389330
     331/** Pointer to the extension pack VM callback table. */
     332typedef struct VBOXEXTPACKVMREG const *PCVBOXEXTPACKVMREG;
     333/**
     334 * Callback table returned by VBoxExtPackVMRegister.
     335 *
     336 * All the callbacks are called the context of a VM process.
     337 *
     338 * This must be valid until the extension pack main VM module is unloaded.
     339 */
     340typedef struct VBOXEXTPACKVMREG
     341{
     342    /** Interface version.
     343     * This is set to VBOXEXTPACKVMREG_VERSION. */
     344    uint32_t                    u32Version;
     345    /** The VirtualBox version this extension pack was built against.  */
     346    uint32_t                    uVBoxVersion;
     347
     348    /**
     349     * Hook for doing work after the Console object is ready.
     350     *
     351     * @param   pThis       Pointer to this structure.
     352     * @param   pConsole    The Console interface.
     353     */
     354    DECLCALLBACKMEMBER(void, pfnConsoleReady)(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole);
     355
     356    /**
     357     * Hook for doing work before unloading.
     358     *
     359     * @param   pThis       Pointer to this structure.
     360     *
     361     * @remarks The helpers are not available at this point in time.
     362     */
     363    DECLCALLBACKMEMBER(void, pfnUnload)(PCVBOXEXTPACKVMREG pThis);
     364
     365    /**
     366     * Hook for configuring the VMM for a VM.
     367     *
     368     * @returns VBox status code.
     369     * @param   pThis       Pointer to this structure.
     370     * @param   pConsole    The console interface.
     371     * @param   pVM         The cross context VM structure.
     372     */
     373    DECLCALLBACKMEMBER(int, pfnVMConfigureVMM)(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
     374
     375    /**
     376     * Hook for doing work right before powering on the VM.
     377     *
     378     * @returns VBox status code.
     379     * @param   pThis       Pointer to this structure.
     380     * @param   pConsole    The console interface.
     381     * @param   pVM         The cross context VM structure.
     382     */
     383    DECLCALLBACKMEMBER(int, pfnVMPowerOn)(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
     384
     385    /**
     386     * Hook for doing work after powering off the VM.
     387     *
     388     * @param   pThis       Pointer to this structure.
     389     * @param   pConsole    The console interface.
     390     * @param   pVM         The cross context VM structure. Can be NULL.
     391     */
     392    DECLCALLBACKMEMBER(void, pfnVMPowerOff)(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
     393
     394    /**
     395     * Query the IUnknown interface to an object in the main VM module.
     396     *
     397     * @returns IUnknown pointer (referenced) on success, NULL on failure.
     398     * @param   pThis       Pointer to this structure.
     399     * @param   pObjectId   Pointer to the object ID (UUID).
     400     */
     401    DECLCALLBACKMEMBER(void *, pfnQueryObject)(PCVBOXEXTPACKVMREG pThis, PCRTUUID pObjectId);
     402
     403    DECLR3CALLBACKMEMBER(int, pfnReserved1,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     404    DECLR3CALLBACKMEMBER(int, pfnReserved2,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     405    DECLR3CALLBACKMEMBER(int, pfnReserved3,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     406    DECLR3CALLBACKMEMBER(int, pfnReserved4,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     407    DECLR3CALLBACKMEMBER(int, pfnReserved5,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     408    DECLR3CALLBACKMEMBER(int, pfnReserved6,(PCVBOXEXTPACKVMREG pThis)); /**< Reserved for minor structure revisions. */
     409
     410    /** Reserved for minor structure revisions. */
     411    uint32_t                    uReserved7;
     412
     413    /** End of structure marker (VBOXEXTPACKVMREG_VERSION). */
     414    uint32_t                    u32EndMarker;
     415} VBOXEXTPACKVMREG;
     416/** Current version of the VBOXEXTPACKVMREG structure.  */
     417#define VBOXEXTPACKVMREG_VERSION      RT_MAKE_U32(2, 0)
     418
     419
     420/**
     421 * The VBoxExtPackVMRegister callback function.
     422 *
     423 * The Main API (in a VM process) will invoke this function after loading an
     424 * extension pack VM module. Its job is to do version compatibility checking
     425 * and returning the extension pack registration structure for a VM.
     426 *
     427 * @returns VBox status code.
     428 * @param   pHlp            Pointer to the extension pack helper function
     429 *                          table.  This is valid until the module is unloaded.
     430 * @param   ppReg           Where to return the pointer to the registration
     431 *                          structure containing all the hooks.  This structure
     432 *                          be valid and unchanged until the module is unloaded
     433 *                          (i.e. use some static const data for it).
     434 * @param   pErrInfo        Where to return extended error information.
     435 */
     436typedef DECLCALLBACK(int) FNVBOXEXTPACKVMREGISTER(PCVBOXEXTPACKHLP pHlp, PCVBOXEXTPACKVMREG *ppReg, PRTERRINFO pErrInfo);
     437/** Pointer to a FNVBOXEXTPACKVMREGISTER. */
     438typedef FNVBOXEXTPACKVMREGISTER *PFNVBOXEXTPACKVMREGISTER;
     439
     440/** The name of the main VM module entry point. */
     441#define VBOX_EXTPACK_MAIN_VM_MOD_ENTRY_POINT   "VBoxExtPackVMRegister"
     442
     443
    390444/**
    391445 * Checks if extension pack interface version is compatible.
  • trunk/src/VBox/ExtPacks/BusMouseSample/ExtPack.xml

    r44446 r68828  
    55    <Version revision="@VBOX_SVN_REV@">@VBOX_VERSION_STRING@</Version>
    66    <MainModule>VBoxBusMouseMain</MainModule>
     7    <MainVMModule>VBoxBusMouseMainVM</MainVMModule>
    78    <ShowLicense/>
    89</VirtualBoxExtensionPack>
  • trunk/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk

    r62496 r68828  
    55
    66#
    7 # Copyright (C) 2010-2016 Oracle Corporation
     7# Copyright (C) 2010-2017 Oracle Corporation
    88#
    99# Permission is hereby granted, free of charge, to any person
     
    6969
    7070#
     71# VBoxBusMouseMainVM - The module in a VM which the VirtualBox Main API talks to.
     72#
     73DLLS += VBoxBusMouseMainVM
     74VBoxBusMouseMainVM_TEMPLATE = VBoxR3ExtPackBusMouse
     75VBoxBusMouseMainVM_SOURCES = VBoxBusMouseMainVM.cpp
     76VBoxBusMouseMainVM_DEFS =
     77
     78
     79#
    7180# The device code.
    7281#
     
    112121VBOX_BUSMOUSE_FILES_MACRO = \
    113122        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseMain.$(3)=>$(1)/VBoxBusMouseMain.$(3) \
     123        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseMainVM.$(3)=>$(1)/VBoxBusMouseMainVM.$(3) \
    114124        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseR3.$(3)=>$(1)/VBoxBusMouseR3.$(3) \
    115125        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseR0.r0=>$(1)/VBoxBusMouseR0.r0
  • trunk/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp

    r63419 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    3737#include <VBox/err.h>
    3838#include <VBox/version.h>
    39 #include <VBox/vmm/cfgm.h>
    4039#include <iprt/string.h>
    4140#include <iprt/param.h>
     
    5352//  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
    5453//  */
    55 // static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     54// static DECLCALLBACK(void) vboxBusMouseExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, PRTERRINFO pErrInfo);
     55//
    5656// /**
    5757//  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
    5858//  */
    59 // static DECLCALLBACK(int)  vboxSkeletonExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     59// static DECLCALLBACK(int)  vboxBusMouseExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    6060//
    6161// /**
    6262//  * @interface_method_impl{VBOXEXTPACKREG,pfnVirtualBoxReady}
    6363//  */
    64 // static DECLCALLBACK(void)  vboxSkeletonExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     64// static DECLCALLBACK(void)  vboxBusMouseExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    6565//
    6666// /**
    6767//  * @interface_method_impl{VBOXEXTPACKREG,pfnUnload}
    6868//  */
    69 // static DECLCALLBACK(void) vboxSkeletonExtPack_Unload(PCVBOXEXTPACKREG pThis);
     69// static DECLCALLBACK(void) vboxBusMouseExtPack_Unload(PCVBOXEXTPACKREG pThis);
     70//
    7071// /**
    7172//  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    7273//  */
    73 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
     74// static DECLCALLBACK(int)  vboxBusMouseExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, VBOXEXTPACK_IF_CS(IMachine) *pMachine);
    7475//
    75 
    76 /**
    77  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM
    78  */
    79 static DECLCALLBACK(int)  vboxBusMouseExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM)
    80 {
    81     RT_NOREF(pThis, pConsole);
    82 
    83     /*
    84      * Find the bus mouse module and tell PDM to load it.
    85      * ASSUME /PDM/Devices exists.
    86      */
    87     char szPath[RTPATH_MAX];
    88     int rc = g_pHlp->pfnFindModule(g_pHlp, "VBoxBusMouseR3", NULL, VBOXEXTPACKMODKIND_R3, szPath, sizeof(szPath), NULL);
    89     if (RT_FAILURE(rc))
    90         return rc;
    91 
    92     PCFGMNODE pCfgRoot = CFGMR3GetRoot(pVM);
    93     AssertReturn(pCfgRoot, VERR_INTERNAL_ERROR_3);
    94 
    95     PCFGMNODE pCfgDevices = CFGMR3GetChild(pCfgRoot, "PDM/Devices");
    96     AssertReturn(pCfgDevices, VERR_INTERNAL_ERROR_3);
    97 
    98     PCFGMNODE pCfgMine;
    99     rc = CFGMR3InsertNode(pCfgDevices, "VBoxBusMouse", &pCfgMine);
    100     AssertRCReturn(rc, rc);
    101     rc = CFGMR3InsertString(pCfgMine, "Path", szPath);
    102     AssertRCReturn(rc, rc);
    103 
    104     /*
    105      * Tell PDM where to find the R0 and RC modules for the bus mouse device.
    106      */
    107 #ifdef VBOX_WITH_RAW_MODE
    108     rc = g_pHlp->pfnFindModule(g_pHlp, "VBoxBusMouseRC", NULL, VBOXEXTPACKMODKIND_RC, szPath, sizeof(szPath), NULL);
    109     AssertRCReturn(rc, rc);
    110     RTPathStripFilename(szPath);
    111     rc = CFGMR3InsertString(pCfgMine, "RCSearchPath", szPath);
    112     AssertRCReturn(rc, rc);
    113 #endif
    114 
    115     rc = g_pHlp->pfnFindModule(g_pHlp, "VBoxBusMouseR0", NULL, VBOXEXTPACKMODKIND_R0, szPath, sizeof(szPath), NULL);
    116     AssertRCReturn(rc, rc);
    117     RTPathStripFilename(szPath);
    118     rc = CFGMR3InsertString(pCfgMine, "R0SearchPath", szPath);
    119     AssertRCReturn(rc, rc);
    120 
    121     return VINF_SUCCESS;
    122 }
    123 
    12476// /**
    125 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
     77//  * @interface_method_impl{VBOXEXTPACKREG,pfnQueryObject}
    12678//  */
    127 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    128 // /**
    129 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    130 //  */
    131 // static DECLCALLBACK(void) vboxSkeletonExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    132 // /**
    133 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    134 //  */
    135 // static DECLCALLBACK(void) vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     79// static DECLCALLBACK(void) vboxBusMouseExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
    13680
    13781
     
    14387    /* .pfnUninstall =      */  NULL,
    14488    /* .pfnVirtualBoxReady =*/  NULL,
    145     /* .pfnConsoleReady =   */  NULL,
    14689    /* .pfnUnload =         */  NULL,
    14790    /* .pfnVMCreated =      */  NULL,
    148     /* .pfnVMConfigureVMM = */  vboxBusMouseExtPack_VMConfigureVMM,
    149     /* .pfnVMPowerOn =      */  NULL,
    150     /* .pfnVMPowerOff =     */  NULL,
    15191    /* .pfnQueryObject =    */  NULL,
    15292    /* .pfnReserved1 =      */  NULL,
  • trunk/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMainVM.cpp

    r68805 r68828  
    11/* $Id$ */
    22/** @file
    3  * Bus Mouse main module.
     3 * Bus Mouse main VM module.
    44 */
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    5151
    5252// /**
    53 //  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
     53//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnConsoleReady}
    5454//  */
    55 // static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    56 // /**
    57 //  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
    58 //  */
    59 // static DECLCALLBACK(int)  vboxSkeletonExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     55// static DECLCALLBACK(void)  vboxBusMouseExtPackVM_ConsoleReady(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole);
    6056//
    6157// /**
    62 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVirtualBoxReady}
     58//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnUnload}
    6359//  */
    64 // static DECLCALLBACK(void)  vboxSkeletonExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    65 //
    66 // /**
    67 //  * @interface_method_impl{VBOXEXTPACKREG,pfnUnload}
    68 //  */
    69 // static DECLCALLBACK(void) vboxSkeletonExtPack_Unload(PCVBOXEXTPACKREG pThis);
    70 // /**
    71 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    72 //  */
    73 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
    74 //
     60// static DECLCALLBACK(void) vboxBusMouseExtPackVM_Unload(PCVBOXEXTPACKVMREG pThis);
    7561
    7662/**
    77  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM
     63 * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMConfigureVMM
    7864 */
    79 static DECLCALLBACK(int)  vboxBusMouseExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM)
     65static DECLCALLBACK(int)  vboxBusMouseExtPackVM_VMConfigureVMM(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM)
    8066{
    8167    RT_NOREF(pThis, pConsole);
     
    123109
    124110// /**
    125 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
     111//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMPowerOn}
    126112//  */
    127 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
     113// static DECLCALLBACK(int)  vboxBusMouseExtPackVM_VMPowerOn(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
     114//
    128115// /**
    129 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
     116//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMPowerOff}
    130117//  */
    131 // static DECLCALLBACK(void) vboxSkeletonExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
     118// static DECLCALLBACK(void) vboxBusMouseExtPackVM_VMPowerOff(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
     119//
    132120// /**
    133 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
     121//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnQueryObject}
    134122//  */
    135 // static DECLCALLBACK(void) vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     123// static DECLCALLBACK(void) vboxBusMouseExtPackVM_QueryObject(PCVBOXEXTPACKVMREG pThis, PCRTUUID pObjectId);
    136124
    137125
    138 static const VBOXEXTPACKREG g_vboxBusMouseExtPackReg =
     126static const VBOXEXTPACKVMREG g_vboxBusMouseExtPackVMReg =
    139127{
    140     VBOXEXTPACKREG_VERSION,
     128    VBOXEXTPACKVMREG_VERSION,
    141129    /* .uVBoxFullVersion =  */  VBOX_FULL_VERSION,
    142     /* .pfnInstalled =      */  NULL,
    143     /* .pfnUninstall =      */  NULL,
    144     /* .pfnVirtualBoxReady =*/  NULL,
    145130    /* .pfnConsoleReady =   */  NULL,
    146131    /* .pfnUnload =         */  NULL,
    147     /* .pfnVMCreated =      */  NULL,
    148     /* .pfnVMConfigureVMM = */  vboxBusMouseExtPack_VMConfigureVMM,
     132    /* .pfnVMConfigureVMM = */  vboxBusMouseExtPackVM_VMConfigureVMM,
    149133    /* .pfnVMPowerOn =      */  NULL,
    150134    /* .pfnVMPowerOff =     */  NULL,
     
    157141    /* .pfnReserved6 =      */  NULL,
    158142    /* .u32Reserved7 =      */  0,
    159     VBOXEXTPACKREG_VERSION
     143    VBOXEXTPACKVMREG_VERSION
    160144};
    161145
    162146
    163 /** @callback_method_impl{FNVBOXEXTPACKREGISTER}  */
    164 extern "C" DECLEXPORT(int) VBoxExtPackRegister(PCVBOXEXTPACKHLP pHlp, PCVBOXEXTPACKREG *ppReg, PRTERRINFO pErrInfo)
     147/** @callback_method_impl{FNVBOXEXTPACKVMREGISTER}  */
     148extern "C" DECLEXPORT(int) VBoxExtPackVMRegister(PCVBOXEXTPACKHLP pHlp, PCVBOXEXTPACKVMREG *ppReg, PRTERRINFO pErrInfo)
    165149{
    166150    /*
     
    183167     */
    184168    g_pHlp = pHlp;
    185     *ppReg = &g_vboxBusMouseExtPackReg;
     169    *ppReg = &g_vboxBusMouseExtPackVMReg;
    186170
    187171    return VINF_SUCCESS;
  • trunk/src/VBox/ExtPacks/Skeleton/ExtPack.xml

    r35963 r68828  
    55    <Version revision="@VBOX_SVN_REV@">@VBOX_VERSION_STRING@</Version>
    66    <MainModule>VBoxSkeletonMain</MainModule>
     7    <MainVMModule>VBoxSkeletonMainVM</MainVMModule>
    78    <!-- VRDEModule>VBoxVNC</VRDEModule -->
    89    <ShowLicense/>
  • trunk/src/VBox/ExtPacks/Skeleton/Makefile.kmk

    r62496 r68828  
    55
    66#
    7 # Copyright (C) 2010-2016 Oracle Corporation
     7# Copyright (C) 2010-2017 Oracle Corporation
    88#
    99# Permission is hereby granted, free of charge, to any person
     
    6868
    6969#
     70# VBoxSkeletonMainVM - The module in a VM which the VirtualBox Main API talks to.
     71#
     72DLLS += VBoxSkeletonMainVM
     73VBoxSkeletonMainVM_TEMPLATE = VBoxR3ExtPackSkeleton
     74VBoxSkeletonMainVM_SOURCES = VBoxSkeletonMainVM.cpp
     75VBoxSkeletonMainVM_DEFS =
     76
     77#
    7078# Install the description.
    7179#
     
    92100# Build the file list.  The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
    93101VBOX_SKELETON_FILES_MACRO = \
    94         $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_SKELETON_MANGLED_NAME)/$(1)/VBoxSkeletonMain.$(3)=>$(1)/VBoxSkeletonMain.$(3)
     102        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_SKELETON_MANGLED_NAME)/$(1)/VBoxSkeletonMain.$(3)=>$(1)/VBoxSkeletonMain.$(3) \
     103        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_SKELETON_MANGLED_NAME)/$(1)/VBoxSkeletonMainVM.$(3)=>$(1)/VBoxSkeletonMainVM.$(3)
    95104
    96105VBOX_SKELETON_FILES := \
  • trunk/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMain.cpp

    r62496 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    3737#include <VBox/err.h>
    3838#include <VBox/version.h>
    39 #include <VBox/vmm/cfgm.h>
    4039#include <iprt/string.h>
    4140#include <iprt/param.h>
     
    5352//  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
    5453//  */
    55 // static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     54// static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, PRTERRINFO pErrInfo);
     55//
    5656// /**
    5757//  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
     
    6868//  */
    6969// static DECLCALLBACK(void) vboxSkeletonExtPack_Unload(PCVBOXEXTPACKREG pThis);
     70//
    7071// /**
    7172//  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    7273//  */
    73 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
     74// static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, VBOXEXTPACK_IF_CS(IMachine) *pMachine);
    7475//
    7576// /**
    76 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM}
     77//  * @interface_method_impl{VBOXEXTPACKREG,pfnQueryObject}
    7778//  */
    78 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    79 //
    80 // /**
    81 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
    82 //  */
    83 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    84 // /**
    85 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    86 //  */
    87 // static DECLCALLBACK(void) vboxSkeletonExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    88 // /**
    89 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    90 //  */
    91 // static DECLCALLBACK(void) vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     79// static DECLCALLBACK(int)  vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
    9280
    9381
     
    9987    /* .pfnUninstall =      */  NULL,
    10088    /* .pfnVirtualBoxReady =*/  NULL,
    101     /* .pfnConsoleReady =   */  NULL,
    10289    /* .pfnUnload =         */  NULL,
    10390    /* .pfnVMCreated =      */  NULL,
    104     /* .pfnVMConfigureVMM = */  NULL,
    105     /* .pfnVMPowerOn =      */  NULL,
    106     /* .pfnVMPowerOff =     */  NULL,
    10791    /* .pfnQueryObject =    */  NULL,
    10892    /* .pfnReserved1 =      */  NULL,
  • trunk/src/VBox/ExtPacks/Skeleton/VBoxSkeletonMainVM.cpp

    r68805 r68828  
    11/* $Id$ */
    22/** @file
    3  * Skeleton main module.
     3 * Skeleton main VM module.
    44 */
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    5151
    5252// /**
    53 //  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
     53//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnConsoleReady}
    5454//  */
    55 // static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    56 // /**
    57 //  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
    58 //  */
    59 // static DECLCALLBACK(int)  vboxSkeletonExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     55// static DECLCALLBACK(void)  vboxSkeletonExtPackVM_ConsoleReady(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole);
    6056//
    6157// /**
    62 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVirtualBoxReady}
     58//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnUnload}
    6359//  */
    64 // static DECLCALLBACK(void)  vboxSkeletonExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     60// static DECLCALLBACK(void) vboxSkeletonExtPackVM_Unload(PCVBOXEXTPACKVMREG pThis);
     61//
     62//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMConfigureVMM}
     63//  */
     64// static DECLCALLBACK(int)  vboxSkeletonExtPackVM_VMConfigureVMM(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    6565//
    6666// /**
    67 //  * @interface_method_impl{VBOXEXTPACKREG,pfnUnload}
     67//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMPowerOn}
    6868//  */
    69 // static DECLCALLBACK(void) vboxSkeletonExtPack_Unload(PCVBOXEXTPACKREG pThis);
    70 // /**
    71 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    72 //  */
    73 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
     69// static DECLCALLBACK(int)  vboxSkeletonExtPackVM_VMPowerOn(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    7470//
    7571// /**
    76 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM}
     72//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnVMPowerOff}
    7773//  */
    78 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
     74// static DECLCALLBACK(void) vboxSkeletonExtPackVM_VMPowerOff(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM);
    7975//
    8076// /**
    81 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
     77//  * @interface_method_impl{VBOXEXTPACKVMREG,pfnQueryObject}
    8278//  */
    83 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    84 // /**
    85 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    86 //  */
    87 // static DECLCALLBACK(void) vboxSkeletonExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    88 // /**
    89 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    90 //  */
    91 // static DECLCALLBACK(void) vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     79// static DECLCALLBACK(void) vboxSkeletonExtPackVM_QueryObject(PCVBOXEXTPACKVMREG pThis, PCRTUUID pObjectId);
    9280
    9381
    94 static const VBOXEXTPACKREG g_vboxSkeletonExtPackReg =
     82static const VBOXEXTPACKVMREG g_vboxSkeletonExtPackVMReg =
    9583{
    96     VBOXEXTPACKREG_VERSION,
     84    VBOXEXTPACKVMREG_VERSION,
    9785    /* .uVBoxFullVersion =  */  VBOX_FULL_VERSION,
    98     /* .pfnInstalled =      */  NULL,
    99     /* .pfnUninstall =      */  NULL,
    100     /* .pfnVirtualBoxReady =*/  NULL,
    10186    /* .pfnConsoleReady =   */  NULL,
    10287    /* .pfnUnload =         */  NULL,
    103     /* .pfnVMCreated =      */  NULL,
    10488    /* .pfnVMConfigureVMM = */  NULL,
    10589    /* .pfnVMPowerOn =      */  NULL,
     
    11397    /* .pfnReserved6 =      */  NULL,
    11498    /* .u32Reserved7 =      */  0,
    115     VBOXEXTPACKREG_VERSION
     99    VBOXEXTPACKVMREG_VERSION
    116100};
    117101
    118102
    119 /** @callback_method_impl{FNVBOXEXTPACKREGISTER}  */
    120 extern "C" DECLEXPORT(int) VBoxExtPackRegister(PCVBOXEXTPACKHLP pHlp, PCVBOXEXTPACKREG *ppReg, PRTERRINFO pErrInfo)
     103/** @callback_method_impl{FNVBOXEXTPACKVMREGISTER}  */
     104extern "C" DECLEXPORT(int) VBoxExtPackVMRegister(PCVBOXEXTPACKHLP pHlp, PCVBOXEXTPACKVMREG *ppReg, PRTERRINFO pErrInfo)
    121105{
    122106    /*
     
    139123     */
    140124    g_pHlp = pHlp;
    141     *ppReg = &g_vboxSkeletonExtPackReg;
     125    *ppReg = &g_vboxSkeletonExtPackVMReg;
    142126
    143127    return VINF_SUCCESS;
  • trunk/src/VBox/ExtPacks/VBoxDTrace/VBoxDTraceMain.cpp

    r62496 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
     
    3737#include <VBox/err.h>
    3838#include <VBox/version.h>
    39 #include <VBox/vmm/cfgm.h>
    4039#include <iprt/string.h>
    4140#include <iprt/param.h>
     
    5352//  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
    5453//  */
    55 // static DECLCALLBACK(void) vboxSkeletonExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     54// static DECLCALLBACK(void) vboxDTraceExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, PRTERRINFO pErrInfo);
     55//
    5656// /**
    5757//  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
    5858//  */
    59 // static DECLCALLBACK(int)  vboxSkeletonExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     59// static DECLCALLBACK(int)  vboxDTraceExtPack_Uninstall(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    6060//
    6161// /**
    6262//  * @interface_method_impl{VBOXEXTPACKREG,pfnVirtualBoxReady}
    6363//  */
    64 // static DECLCALLBACK(void)  vboxSkeletonExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     64// static DECLCALLBACK(void)  vboxDTraceExtPack_VirtualBoxReady(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
    6565//
    6666// /**
    6767//  * @interface_method_impl{VBOXEXTPACKREG,pfnUnload}
    6868//  */
    69 // static DECLCALLBACK(void) vboxSkeletonExtPack_Unload(PCVBOXEXTPACKREG pThis);
     69// static DECLCALLBACK(void) vboxDTraceExtPack_Unload(PCVBOXEXTPACKREG pThis);
     70//
    7071// /**
    7172//  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    7273//  */
    73 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
     74// static DECLCALLBACK(int)  vboxDTraceExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, VBOXEXTPACK_IF_CS(IMachine) *pMachine);
    7475//
    7576// /**
    76 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM}
     77//  * @interface_method_impl{VBOXEXTPACKREG,pfnQueryObject}
    7778//  */
    78 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    79 //
    80 // /**
    81 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
    82 //  */
    83 // static DECLCALLBACK(int)  vboxSkeletonExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    84 // /**
    85 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    86 //  */
    87 // static DECLCALLBACK(void) vboxSkeletonExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    88 // /**
    89 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    90 //  */
    91 // static DECLCALLBACK(void) vboxSkeletonExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     79// static DECLCALLBACK(void) vboxDTraceExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
    9280
    9381
    94 static const VBOXEXTPACKREG g_vboxSkeletonExtPackReg =
     82static const VBOXEXTPACKREG g_vboxDTraceExtPackReg =
    9583{
    9684    VBOXEXTPACKREG_VERSION,
     
    9987    /* .pfnUninstall =      */  NULL,
    10088    /* .pfnVirtualBoxReady =*/  NULL,
    101     /* .pfnConsoleReady =   */  NULL,
    10289    /* .pfnUnload =         */  NULL,
    10390    /* .pfnVMCreated =      */  NULL,
    104     /* .pfnVMConfigureVMM = */  NULL,
    105     /* .pfnVMPowerOn =      */  NULL,
    106     /* .pfnVMPowerOff =     */  NULL,
    10791    /* .pfnQueryObject =    */  NULL,
    10892    /* .pfnReserved1 =      */  NULL,
     
    139123     */
    140124    g_pHlp = pHlp;
    141     *ppReg = &g_vboxSkeletonExtPackReg;
     125    *ppReg = &g_vboxDTraceExtPackReg;
    142126
    143127    return VINF_SUCCESS;
  • trunk/src/VBox/ExtPacks/VNC/VBoxVNCMain.cpp

    r62496 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424#include <VBox/err.h>
    2525#include <VBox/version.h>
    26 #include <VBox/vmm/cfgm.h>
    2726#include <iprt/string.h>
    2827#include <iprt/param.h>
     
    4039//  * @interface_method_impl{VBOXEXTPACKREG,pfnInstalled}
    4140//  */
    42 // static DECLCALLBACK(void) vboxVNCExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox);
     41// static DECLCALLBACK(void) vboxVNCExtPack_Installed(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, PRTERRINFO pErrInfo);
     42//
    4343// /**
    4444//  * @interface_method_impl{VBOXEXTPACKREG,pfnUninstall}
     
    5555//  */
    5656// static DECLCALLBACK(void) vboxVNCExtPack_Unload(PCVBOXEXTPACKREG pThis);
     57//
    5758// /**
    5859//  * @interface_method_impl{VBOXEXTPACKREG,pfnVMCreated}
    5960//  */
    60 // static DECLCALLBACK(int)  vboxVNCExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, IMachine *pMachine);
     61// static DECLCALLBACK(int)  vboxVNCExtPack_VMCreated(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, VBOXEXTPACK_IF_CS(IMachine) *pMachine);
    6162//
    6263// /**
    63 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMConfigureVMM}
    64 //  */
    65 // static DECLCALLBACK(int)  vboxVNCExtPack_VMConfigureVMM(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    66 //
    67 // /**
    68 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOn}
    69 //  */
    70 // static DECLCALLBACK(int)  vboxVNCExtPack_VMPowerOn(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    71 // /**
    72 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
    73 //  */
    74 // static DECLCALLBACK(void) vboxVNCExtPack_VMPowerOff(PCVBOXEXTPACKREG pThis, IConsole *pConsole, PVM pVM);
    75 // /**
    76 //  * @interface_method_impl{VBOXEXTPACKREG,pfnVMPowerOff}
     64//  * @interface_method_impl{VBOXEXTPACKREG,pfnQueryObject}
    7765//  */
    7866// static DECLCALLBACK(void) vboxVNCExtPack_QueryObject(PCVBOXEXTPACKREG pThis, PCRTUUID pObjectId);
     
    8674    /* .pfnUninstall =      */  NULL,
    8775    /* .pfnVirtualBoxReady =*/  NULL,
    88     /* .pfnConsoleReady =   */  NULL,
    8976    /* .pfnUnload =         */  NULL,
    9077    /* .pfnVMCreated =      */  NULL,
    91     /* .pfnVMConfigureVMM = */  NULL,
    92     /* .pfnVMPowerOn =      */  NULL,
    93     /* .pfnVMPowerOff =     */  NULL,
    9478    /* .pfnQueryObject =    */  NULL,
    9579    /* .pfnReserved1 =      */  NULL,
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r63147 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3131
    3232
    33 #if !defined(VBOX_COM_INPROC)
     33#ifndef VBOX_COM_INPROC
    3434/**
    3535 * An extension pack file.
     
    8787    friend class ExtPackInstallTask;
    8888};
    89 #endif
     89#endif /* !VBOX_COM_INPROC */
    9090
    9191
     
    110110    /** @name Internal interfaces used by ExtPackManager.
    111111     * @{ */
     112#ifndef VBOX_COM_INPROC
    112113    bool        i_callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);
    113114    HRESULT     i_callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
    114115    bool        i_callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);
     116#endif
     117#ifdef VBOX_COM_INPROC
    115118    bool        i_callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);
     119#endif
     120#ifndef VBOX_COM_INPROC
    116121    bool        i_callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);
     122#endif
     123#ifdef VBOX_COM_INPROC
    117124    bool        i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
    118125    bool        i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
    119126    bool        i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);
     127#endif
    120128    HRESULT     i_checkVrde(void);
    121129    HRESULT     i_getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);
     
    197205    /** @name Internal interfaces used by other Main classes.
    198206     * @{ */
    199 #if !defined(VBOX_COM_INPROC)
     207#ifndef VBOX_COM_INPROC
    200208    HRESULT     i_doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);
    201209    HRESULT     i_doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);
    202 #endif
    203210    void        i_callAllVirtualBoxReadyHooks(void);
     211#endif
     212#ifdef VBOX_COM_INPROC
    204213    void        i_callAllConsoleReadyHooks(IConsole *a_pConsole);
     214#endif
     215#ifndef VBOX_COM_INPROC
    205216    void        i_callAllVmCreatedHooks(IMachine *a_pMachine);
     217#endif
     218#ifdef VBOX_COM_INPROC
    206219    int         i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
    207220    int         i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
    208221    void        i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
     222#endif
    209223    HRESULT     i_checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
    210224    int         i_getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
  • trunk/src/VBox/Main/include/ExtPackUtil.h

    r62485 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    100100    /** The name of the main module. */
    101101    RTCString               strMainModule;
     102    /** The name of the main VM module, empty if none. */
     103    RTCString               strMainVMModule;
    102104    /** The name of the VRDE module, empty if none. */
    103105    RTCString               strVrdeModule;
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r66294 r68828  
    4646#include "Global.h"
    4747#include "ProgressImpl.h"
    48 #if defined(VBOX_COM_INPROC)
     48#ifdef VBOX_COM_INPROC
    4949# include "ConsoleImpl.h"
    5050#else
     
    8585};
    8686
    87 #if !defined(VBOX_COM_INPROC)
     87#ifndef VBOX_COM_INPROC
    8888/**
    8989 * Private extension pack data.
     
    132132    /** Pointer back to the extension pack object (for Hlp methods). */
    133133    ExtPack            *pThis;
    134     /** The extension pack registration structure. */
     134#ifndef VBOX_COM_INPROC
     135    /** The extension pack main registration structure. */
    135136    PCVBOXEXTPACKREG    pReg;
     137#else
     138    /** The extension pack main VM registration structure. */
     139    PCVBOXEXTPACKVMREG  pReg;
     140#endif
    136141    /** The current context. */
    137142    VBOXEXTPACKCTX      enmContext;
     
    157162    /** The list of installed extension packs. */
    158163    ExtPackList         llInstalledExtPacks;
    159 #if !defined(VBOX_COM_INPROC)
     164#ifndef VBOX_COM_INPROC
    160165    /** Pointer to the VirtualBox object, our parent. */
    161166    VirtualBox         *pVirtualBox;
     
    163168    /** The current context. */
    164169    VBOXEXTPACKCTX      enmContext;
    165 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
    166     /** File handle for the VBoxVMM libary which we slurp because ExtPacks depend on it. */
    167     RTLDRMOD            hVBoxVMM;
    168 #endif
    169170
    170171    RTMEMEF_NEW_AND_DELETE_OPERATORS();
    171172};
    172173
    173 #if !defined(VBOX_COM_INPROC)
     174#ifndef VBOX_COM_INPROC
    174175
    175176/**
     
    821822
    822823
     824#ifndef VBOX_COM_INPROC
    823825/**
    824826 * Calls the installed hook.
     
    895897    if (    m != NULL
    896898        &&  m->fUsable
     899        &&  m->hMainMod != NIL_RTLDRMOD
    897900        && !m->fMadeReadyCall)
    898901    {
     
    909912    return false;
    910913}
    911 
     914#endif /* !VBOX_COM_INPROC */
     915
     916#ifdef VBOX_COM_INPROC
    912917/**
    913918 * Calls the pfnConsoleReady hook.
     
    921926    if (    m != NULL
    922927        &&  m->fUsable
     928        &&  m->hMainMod != NIL_RTLDRMOD
    923929        && !m->fMadeReadyCall)
    924930    {
     
    935941    return false;
    936942}
    937 
     943#endif /* VBOX_COM_INPROC */
     944
     945#ifndef VBOX_COM_INPROC
    938946/**
    939947 * Calls the pfnVMCreate hook.
     
    947955{
    948956    if (   m != NULL
     957        && m->hMainMod != NIL_RTLDRMOD
    949958        && m->fUsable)
    950959    {
     
    960969    return false;
    961970}
    962 
     971#endif /* !VBOX_COM_INPROC */
     972
     973#ifdef VBOX_COM_INPROC
    963974/**
    964975 * Calls the pfnVMConfigureVMM hook.
     
    976987    *a_pvrc = VINF_SUCCESS;
    977988    if (   m != NULL
     989        && m->hMainMod != NIL_RTLDRMOD
    978990        && m->fUsable)
    979991    {
     
    10081020    *a_pvrc = VINF_SUCCESS;
    10091021    if (   m != NULL
     1022        && m->hMainMod != NIL_RTLDRMOD
    10101023        && m->fUsable)
    10111024    {
     
    10361049{
    10371050    if (   m != NULL
     1051        && m->hMainMod != NIL_RTLDRMOD
    10381052        && m->fUsable)
    10391053    {
     
    10491063    return false;
    10501064}
     1065#endif /* !VBOX_COM_INPROC */
    10511066
    10521067/**
     
    12851300     * Load the main DLL and call the predefined entry point.
    12861301     */
     1302#ifndef VBOX_COM_INPROC
     1303    const char *pszMainModule = m->Desc.strMainModule.c_str();
     1304#else
     1305    const char *pszMainModule = m->Desc.strMainVMModule.c_str();
     1306    if (m->Desc.strMainVMModule.isEmpty())
     1307    {
     1308        /*
     1309         * We're good! The main module for VM processes is optional.
     1310         */
     1311        m->fUsable = true;
     1312        m->strWhyUnusable.setNull();
     1313        return;
     1314    }
     1315#endif
    12871316    bool fIsNative;
    1288     if (!i_findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
     1317    if (!i_findModule(pszMainModule, NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
    12891318                      &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))
    12901319    {
    1291         m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str());
     1320        m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), pszMainModule);
    12921321        return;
    12931322    }
     
    13201349     * Resolve the predefined entry point.
    13211350     */
     1351#ifndef VBOX_COM_INPROC
     1352    const char *pszMainEntryPoint = VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT;
    13221353    PFNVBOXEXTPACKREGISTER pfnRegistration;
    1323     vrc = RTLdrGetSymbol(m->hMainMod, VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, (void **)&pfnRegistration);
     1354    uint32_t uVersion = VBOXEXTPACKREG_VERSION;
     1355#else
     1356    const char *pszMainEntryPoint = VBOX_EXTPACK_MAIN_VM_MOD_ENTRY_POINT;
     1357    PFNVBOXEXTPACKVMREGISTER pfnRegistration;
     1358    uint32_t uVersion = VBOXEXTPACKVMREG_VERSION;
     1359#endif
     1360    vrc = RTLdrGetSymbol(m->hMainMod, pszMainEntryPoint, (void **)&pfnRegistration);
    13241361    if (RT_SUCCESS(vrc))
    13251362    {
     
    13301367            && VALID_PTR(m->pReg))
    13311368        {
    1332             if (   VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, VBOXEXTPACKREG_VERSION)
     1369            if (   VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, uVersion)
    13331370                && m->pReg->u32EndMarker == m->pReg->u32Version)
    13341371            {
     1372#ifndef VBOX_COM_INPROC
    13351373                if (   (!m->pReg->pfnInstalled       || RT_VALID_PTR(m->pReg->pfnInstalled))
    13361374                    && (!m->pReg->pfnUninstall       || RT_VALID_PTR(m->pReg->pfnUninstall))
    13371375                    && (!m->pReg->pfnVirtualBoxReady || RT_VALID_PTR(m->pReg->pfnVirtualBoxReady))
    1338                     && (!m->pReg->pfnConsoleReady    || RT_VALID_PTR(m->pReg->pfnConsoleReady))
    13391376                    && (!m->pReg->pfnUnload          || RT_VALID_PTR(m->pReg->pfnUnload))
    13401377                    && (!m->pReg->pfnVMCreated       || RT_VALID_PTR(m->pReg->pfnVMCreated))
     1378                    && (!m->pReg->pfnQueryObject     || RT_VALID_PTR(m->pReg->pfnQueryObject))
     1379                    )
     1380                {
     1381                    /*
     1382                     * We're good!
     1383                     */
     1384                    m->fUsable = true;
     1385                    m->strWhyUnusable.setNull();
     1386                    return;
     1387                }
     1388#else
     1389                if (   (!m->pReg->pfnConsoleReady    || RT_VALID_PTR(m->pReg->pfnConsoleReady))
     1390                    && (!m->pReg->pfnUnload          || RT_VALID_PTR(m->pReg->pfnUnload))
    13411391                    && (!m->pReg->pfnVMConfigureVMM  || RT_VALID_PTR(m->pReg->pfnVMConfigureVMM))
    13421392                    && (!m->pReg->pfnVMPowerOn       || RT_VALID_PTR(m->pReg->pfnVMPowerOn))
     
    13521402                    return;
    13531403                }
    1354 
    1355                 m->strWhyUnusable = tr("The registration structure contains on or more invalid function pointers");
     1404#endif
     1405
     1406                m->strWhyUnusable = tr("The registration structure contains one or more invalid function pointers");
    13561407            }
    13571408            else
     
    13611412        else
    13621413            m->strWhyUnusable.printf(tr("%s returned %Rrc, pReg=%p ErrInfo='%s'"),
    1363                                      VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc, m->pReg, ErrInfo.Core.pszMsg);
     1414                                     pszMainEntryPoint, vrc, m->pReg, ErrInfo.Core.pszMsg);
    13641415        m->pReg = NULL;
    13651416    }
    13661417    else
    13671418        m->strWhyUnusable.printf(tr("Failed to resolve exported symbol '%s' in the main module: %Rrc"),
    1368                                  VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc);
     1419                                 pszMainEntryPoint, vrc);
    13691420
    13701421    RTLdrClose(m->hMainMod);
     
    19041955#else
    19051956    RT_NOREF_PV(a_pVirtualBox);
    1906 #endif
    1907 
    1908     /*
    1909      * Slurp in VBoxVMM which is used by VBoxPuelMain.
    1910      */
    1911 #if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
    1912     if (a_enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
    1913     {
    1914         int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &m->hVBoxVMM, RTLDRLOAD_FLAGS_GLOBAL, NULL);
    1915         if (RT_FAILURE(vrc))
    1916             m->hVBoxVMM = NIL_RTLDRMOD;
    1917         /* cleanup in ::uninit()? */
    1918     }
    19191957#endif
    19201958
     
    20432081    AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
    20442082
    2045 #if !defined(VBOX_COM_INPROC)
     2083#ifndef VBOX_COM_INPROC
    20462084    /* The API can optionally take a ::SHA-256=<hex-digest> attribute at the
    20472085       end of the file name.  This is just a temporary measure for
     
    20772115    Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
    20782116
    2079 #if !defined(VBOX_COM_INPROC)
     2117#ifndef VBOX_COM_INPROC
    20802118
    20812119    HRESULT hrc;
     
    24362474}
    24372475
    2438 #if !defined(VBOX_COM_INPROC)
     2476#ifndef VBOX_COM_INPROC
    24392477
    24402478/**
     
    28592897#endif /* !VBOX_COM_INPROC */
    28602898
     2899#ifdef VBOX_COM_INPROC
    28612900/**
    28622901 * Calls the pfnConsoleReady hook for all working extension packs.
     
    28842923    }
    28852924}
    2886 
    2887 #if !defined(VBOX_COM_INPROC)
     2925#endif
     2926
     2927#ifndef VBOX_COM_INPROC
    28882928/**
    28892929 * Calls the pfnVMCreated hook for all working extension packs.
     
    29062946#endif
    29072947
     2948#ifdef VBOX_COM_INPROC
    29082949/**
    29092950 * Calls the pfnVMConfigureVMM hook for all working extension packs.
     
    29833024        (*it)->i_callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);
    29843025}
     3026#endif
    29853027
    29863028
  • trunk/src/VBox/Main/src-all/ExtPackUtil.cpp

    r65088 r68828  
    55
    66/*
    7  * Copyright (C) 2010-2016 Oracle Corporation
     7 * Copyright (C) 2010-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7474    a_pExtPackDesc->uRevision = 0;
    7575    a_pExtPackDesc->strMainModule.setNull();
     76    a_pExtPackDesc->strMainVMModule.setNull();
    7677    a_pExtPackDesc->strVrdeModule.setNull();
    7778    a_pExtPackDesc->cPlugIns = 0;
     
    164165
    165166    /*
     167     * The main VM module, optional.
     168     * Accept both none and empty as tokens of no main VM module.
     169     */
     170    const char *pszMainVMModule = NULL;
     171    const xml::ElementNode *pMainVMModuleElm = pVBoxExtPackElm->findChildElement("MainVMModule");
     172    if (pMainVMModuleElm)
     173    {
     174        pszMainVMModule = pMainVMModuleElm->getValue();
     175        if (!pszMainVMModule || *pszMainVMModule == '\0')
     176            pszMainVMModule = NULL;
     177        else if (!VBoxExtPackIsValidModuleString(pszMainVMModule))
     178            return &(new RTCString("Invalid main VM module string: "))->append(pszMainVMModule);
     179    }
     180
     181    /*
    166182     * The VRDE module, optional.
    167183     * Accept both none and empty as tokens of no VRDE module.
     
    205221    a_pExtPackDesc->uRevision       = uRevision;
    206222    a_pExtPackDesc->strMainModule   = pszMainModule;
     223    a_pExtPackDesc->strMainVMModule = pszMainVMModule;
    207224    a_pExtPackDesc->strVrdeModule   = pszVrdeModule;
    208225    a_pExtPackDesc->cPlugIns        = cPlugIns;
     
    362379    a_pExtPackDesc->uRevision = 0;
    363380    a_pExtPackDesc->strMainModule.setNull();
     381    a_pExtPackDesc->strMainVMModule.setNull();
    364382    a_pExtPackDesc->strVrdeModule.setNull();
    365383    a_pExtPackDesc->cPlugIns = 0;
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r68804 r68828  
    825825    // we don't perform uninit() as it's possible that some pending event refers to this source
    826826    unconst(mEventSource).setNull();
     827
     828#ifdef VBOX_WITH_EXTPACK
     829    unconst(mptrExtPackManager).setNull();
     830#endif
    827831
    828832    LogFlowThisFuncLeave();
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