VirtualBox

Ignore:
Timestamp:
Nov 20, 2017 4:36:34 PM (7 years ago)
Author:
vboxsync
Message:

VBoxSDS/Plan/B: More complete code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/win/svcmain.cpp

    r69771 r69775  
    186186
    187187#ifdef VBOX_WITH_SDS_PLAN_B
    188 class VBoxSVC;
     188class VBoxSVCRegistration;
    189189
    190190/**
     
    203203    /** The IUnknown of the VirtualBox object/interface we're working with. */
    204204    IUnknown              *m_pObj;
    205     /** Pointer to the IVBoxSVC implementation that VBoxSDS works with. */
    206     VBoxSVC               *m_pVBoxSVC;
     205    /** Pointer to the IVBoxSVCRegistration implementation that VBoxSDS works with. */
     206    VBoxSVCRegistration   *m_pVBoxSVC;
    207207    /** The VBoxSDS interface. */
    208208    ComPtr<IVirtualBoxSDS> m_ptrVirtualBoxSDS;
     
    227227    STDMETHOD(CreateInstance)(LPUNKNOWN pUnkOuter, REFIID riid, void **ppvObj);
    228228
    229     /** Worker for VBoxSVC::getVirtualBox. */
     229    /** Worker for VBoxSVCRegistration::getVirtualBox. */
    230230    HRESULT i_getVirtualBox(IUnknown **ppResult);
    231231
     
    234234    void    VirtualBoxClassFactory::i_deregisterWithSds(void);
    235235
    236     friend VBoxSVC;
     236    friend VBoxSVCRegistration;
    237237};
    238238
     
    242242 * VirtualBox object when the next VBoxSVC for this user registers itself.
    243243 */
    244 class VBoxSVC : public IVBoxSVC
     244class VBoxSVCRegistration : public IVBoxSVCRegistration
    245245{
    246246private:
     
    253253
    254254public:
    255     VBoxSVC(VirtualBoxClassFactory *pFactory)
     255    VBoxSVCRegistration(VirtualBoxClassFactory *pFactory)
    256256        : m_cRefs(1), m_pFactory(pFactory)
    257257    { }
    258     virtual ~VBoxSVC()
     258    virtual ~VBoxSVCRegistration()
    259259    {
    260260        if (m_pFactory)
     
    272272        if (riid == __uuidof(IUnknown))
    273273            *ppvObject = (void *)(IUnknown *)this;
    274         else if (riid == __uuidof(IVBoxSVC))
    275             *ppvObject = (void *)(IVBoxSVC *)this;
     274        else if (riid == __uuidof(IVBoxSVCRegistration))
     275            *ppvObject = (void *)(IVBoxSVCRegistration *)this;
    276276        else
    277277        {
     
    297297    }
    298298
    299     // IVBoxSVC
     299    // IVBoxSVCRegistration
    300300    STDMETHOD(GetVirtualBox)(IUnknown **ppResult)
    301301    {
     
    317317    {
    318318        /*
    319          * Create VBoxSVC object and hand that to VBoxSDS.
     319         * Create VBoxSVCRegistration object and hand that to VBoxSDS.
    320320         */
    321         m_pVBoxSVC = new VBoxSVC(this);
     321        m_pVBoxSVC = new VBoxSVCRegistration(this);
    322322        hrc = m_ptrVirtualBoxSDS->RegisterVBoxSVC(m_pVBoxSVC, GetCurrentProcessId(), ppOtherVirtualBox);
    323323        if (SUCCEEDED(hrc))
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