VirtualBox

Changeset 30825 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jul 14, 2010 12:44:14 PM (14 years ago)
Author:
vboxsync
Message:

Main: callbacks removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/VirtualBox.h

    r29388 r30825  
    5353#include "VBox/com/ptr.h"
    5454
    55 template <class I>
    56 inline HRESULT createCallbackWrapper(I* aInstance,
    57                                      I** paWrapper)
    58 {
    59     ComPtr<ILocalOwner> ptr;
    60 
    61 #ifdef VBOX_WITH_XPCOM /* very noisy in pedantic mode */
    62     static const CLSID clsid = NS_CALLBACKWRAPPER_CID;
    63     HRESULT rc = ptr.createInprocObject(clsid);
    64 #else
    65     HRESULT rc = ptr.createInprocObject(CLSID_CallbackWrapper);
    6655#endif
    67     if (FAILED(rc))
    68         return rc;
    69 
    70     rc = ptr->SetLocalObject(aInstance);
    71     if (FAILED(rc))
    72         return rc;
    73 
    74     ComPtr<I> ptr2 = ptr;
    75     if (ptr2.isNull())
    76         return E_FAIL;
    77 
    78     rc = ptr2.queryInterfaceTo(paWrapper);
    79     return rc;
    80 }
    81 #endif
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