VirtualBox

Changeset 29849 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
May 27, 2010 6:19:04 PM (15 years ago)
Author:
vboxsync
Message:

Main: events for callbacks on Windows (disabled)

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

Legend:

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

    r28955 r29849  
    44874487    }
    44884488
     4489#ifdef RT_OS_WINDOWS
     4490#if 0
     4491    // WIP
     4492    int nConnections = mVirtualBox->m_vec.GetSize();
     4493    for (int i=0; i<nConnections; i++)
     4494    {
     4495        CComPtr<IUnknown> sp = mVirtualBox->m_vec.GetAt(i);
     4496        IVirtualBoxCallback* cb = reinterpret_cast<IVirtualBoxCallback*>(sp.p);
     4497        if (cb != NULL)
     4498        {
     4499            HRESULT hrc = handleCallback(cb);
     4500            if (hrc == VBOX_E_DONT_CALL_AGAIN)
     4501            {
     4502                // need to handle that somehow, maybe just set element to 0
     4503            }
     4504        }
     4505    }
     4506#endif
     4507#endif
     4508
    44894509    for (CallbackList::const_iterator it = callbacks.begin();
    44904510         it != callbacks.end();
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r28944 r29849  
    6363#ifdef RT_OS_WINDOWS
    6464    , public CComCoClass<VirtualBox, &CLSID_VirtualBox>
     65    , public IConnectionPointContainerImpl<VirtualBox>
     66    , public IConnectionPointImpl<VirtualBox, &IID_IVirtualBoxCallback, CComDynamicUnkArray>
    6567#endif
    6668{
     
    8486
    8587    BEGIN_COM_MAP(VirtualBox)
    86         COM_INTERFACE_ENTRY(IDispatch)
     88        COM_INTERFACE_ENTRY2(IDispatch, IVirtualBox)
    8789        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    8890        COM_INTERFACE_ENTRY(IVirtualBox)
     91        COM_INTERFACE_ENTRY(IConnectionPointContainer)
    8992    END_COM_MAP()
     93
     94#ifdef RT_OS_WINDOWS
     95    BEGIN_CONNECTION_POINT_MAP(VirtualBox)
     96         CONNECTION_POINT_ENTRY(IID_IVirtualBoxCallback)
     97    END_CONNECTION_POINT_MAP()
     98#endif
    9099
    91100    // to postpone generation of the default ctor/dtor
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