VirtualBox

Changeset 21520 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 13, 2009 8:18:44 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49972
Message:

COM: missed pieces of scriptability support

Location:
trunk/src/VBox/Frontends
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r20928 r21520  
    134134        return cnt;
    135135    }
    136     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    137     {
    138         if (riid == IID_IUnknown)
    139         {
    140             *ppObj = this;
    141             AddRef();
    142             return S_OK;
    143         }
    144         if (riid == IID_IConsoleCallback)
    145         {
    146             *ppObj = this;
    147             AddRef();
    148             return S_OK;
    149         }
    150         *ppObj = NULL;
    151         return E_NOINTERFACE;
    152     }
    153 #endif
     136#endif
     137    VBOX_SCRIPTABLE_DISPATCH_IMPL(IConsoleCallback)
    154138
    155139    STDMETHOD(OnMousePointerShapeChange) (BOOL visible, BOOL alpha, ULONG xHot, ULONG yHot,
  • trunk/src/VBox/Frontends/VBoxHeadless/VideoCapture/FFmpegFB.h

    r19844 r21520  
    6363        return cnt;
    6464    }
    65     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    66     {
    67         if (riid == IID_IUnknown)
    68         {
    69             *ppObj = this;
    70             AddRef();
    71             return S_OK;
    72         }
    73         if (riid == IID_IFramebuffer)
    74         {
    75             *ppObj = this;
    76             AddRef();
    77             return S_OK;
    78         }
    79         *ppObj = NULL;
    80         return E_NOINTERFACE;
    81     }
    8265#endif
     66    VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    8367
    8468    NS_DECL_ISUPPORTS
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r21404 r21520  
    7575        return cnt;
    7676    }
    77     STDMETHOD(QueryInterface)(REFIID riid , void **ppObj)
    78     {
    79         if (riid == IID_IUnknown)
    80         {
    81             *ppObj = this;
    82             AddRef();
    83             return S_OK;
    84         }
    85         if (riid == IID_IVirtualBoxCallback)
    86         {
    87             *ppObj = this;
    88             AddRef();
    89             return S_OK;
    90         }
    91         *ppObj = NULL;
    92         return E_NOINTERFACE;
    93     }
    9477#endif /* !VBOX_WITH_XPCOM */
     78    VBOX_SCRIPTABLE_DISPATCH_IMPL(IVirtualBoxCallback)
    9579
    9680    NS_DECL_ISUPPORTS
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp

    r20928 r21520  
    7979        if (guid == Guid(NS_GET_IID(IUnknown)))
    8080            *ppvObject = (IUnknown *)this;
     81#ifdef RT_OS_WINDOWS
     82        else if (guid == Guid(NS_GET_IID(IDispatch)))
     83            *ppvObject = (IDispatch *)this;
     84#endif
    8185        else if (guid == Guid(NS_GET_IID(IUSBDevice)))
    8286            *ppvObject = (IUSBDevice *)this;
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r20433 r21520  
    7171        return cnt;
    7272    }
    73     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    74     {
    75         if (riid == IID_IUnknown)
    76         {
    77             *ppObj = this;
    78             AddRef();
    79             return S_OK;
    80         }
    81         if (riid == IID_IFramebuffer)
    82         {
    83             *ppObj = this;
    84             AddRef();
    85             return S_OK;
    86         }
    87         *ppObj = NULL;
    88         return E_NOINTERFACE;
    89     }
    90 #endif
     73#endif
     74    VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    9175
    9276    NS_DECL_ISUPPORTS
     
    242226        return cnt;
    243227    }
    244     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    245     {
    246         if (riid == IID_IUnknown)
    247         {
    248             *ppObj = this;
    249             AddRef();
    250             return S_OK;
    251         }
    252         if (riid == IID_IFramebuffer)
    253         {
    254             *ppObj = this;
    255             AddRef();
    256             return S_OK;
    257         }
    258         *ppObj = NULL;
    259         return E_NOINTERFACE;
    260     }
    261 #endif
     228#endif
     229    VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    262230
    263231    NS_DECL_ISUPPORTS
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r21446 r21520  
    272272        return cnt;
    273273    }
    274     STDMETHOD(QueryInterface)(REFIID riid , void **ppObj)
    275     {
    276         if (riid == IID_IUnknown)
    277         {
    278             *ppObj = this;
    279             AddRef();
    280             return S_OK;
    281         }
    282         if (riid == IID_IVirtualBoxCallback)
    283         {
    284             *ppObj = this;
    285             AddRef();
    286             return S_OK;
    287         }
    288         *ppObj = NULL;
    289         return E_NOINTERFACE;
    290     }
    291 #endif
     274#endif
     275    VBOX_SCRIPTABLE_DISPATCH_IMPL(IVirtualBoxCallback)
    292276
    293277    NS_DECL_ISUPPORTS
     
    419403        return cnt;
    420404    }
    421     STDMETHOD(QueryInterface)(REFIID riid , void **ppObj)
    422     {
    423         if (riid == IID_IUnknown)
    424         {
    425             *ppObj = this;
    426             AddRef();
    427             return S_OK;
    428         }
    429         if (riid == IID_IConsoleCallback)
    430         {
    431             *ppObj = this;
    432             AddRef();
    433             return S_OK;
    434         }
    435         *ppObj = NULL;
    436         return E_NOINTERFACE;
    437     }
    438 #endif
     405#endif
     406    VBOX_SCRIPTABLE_DISPATCH_IMPL(IConsoleCallback)
    439407
    440408    NS_DECL_ISUPPORTS
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h

    r21490 r21520  
    178178        return cnt;
    179179    }
    180 
    181     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    182     {
    183         if (riid == IID_IUnknown) {
    184             *ppObj = this;
    185             AddRef();
    186             return S_OK;
    187         }
    188         if (riid == IID_IFramebuffer) {
    189             *ppObj = this;
    190             AddRef();
    191             return S_OK;
    192         }
    193         *ppObj = NULL;
    194         return E_NOINTERFACE;
    195     }
    196 
    197 #endif
     180#endif
     181    VBOX_SCRIPTABLE_DISPATCH_IMPL(IFramebuffer)
    198182
    199183    // IFramebuffer COM methods
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r21479 r21520  
    461461        return cnt;
    462462    }
    463     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    464     {
    465         if (riid == IID_IUnknown) {
    466             *ppObj = this;
    467             AddRef();
    468             return S_OK;
    469         }
    470         if (riid == IID_IConsoleCallback) {
    471             *ppObj = this;
    472             AddRef();
    473             return S_OK;
    474         }
    475         *ppObj = NULL;
    476         return E_NOINTERFACE;
    477     }
    478 #endif
     463#endif
     464    VBOX_SCRIPTABLE_DISPATCH_IMPL(IConsoleCallback)
    479465
    480466    STDMETHOD(OnMousePointerShapeChange) (BOOL visible, BOOL alpha,
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp

    r21479 r21520  
    4343 */
    4444
    45 #if !defined (Q_OS_WIN32)
     45#if defined (Q_OS_WIN32)
     46static CComModule _Module;
     47#else
    4648NS_DECL_CLASSINFO (VBoxFrameBuffer)
    4749NS_IMPL_THREADSAFE_ISUPPORTS1_CI (VBoxFrameBuffer, IFramebuffer)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r21481 r21520  
    187187        return cnt;
    188188    }
    189     STDMETHOD(QueryInterface) (REFIID riid , void **ppObj)
    190     {
    191         if (riid == IID_IUnknown) {
    192             *ppObj = this;
    193             AddRef();
    194             return S_OK;
    195         }
    196         if (riid == IID_IVirtualBoxCallback) {
    197             *ppObj = this;
    198             AddRef();
    199             return S_OK;
    200         }
    201         *ppObj = NULL;
    202         return E_NOINTERFACE;
    203     }
    204 #endif
     189#endif
     190    VBOX_SCRIPTABLE_DISPATCH_IMPL(IVirtualBoxCallback)
    205191
    206192    // IVirtualBoxCallback methods
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