Changeset 30825 in vbox for trunk/include/VBox
- Timestamp:
- Jul 14, 2010 12:44:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/VirtualBox.h
r29388 r30825 53 53 #include "VBox/com/ptr.h" 54 54 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 #else65 HRESULT rc = ptr.createInprocObject(CLSID_CallbackWrapper);66 55 #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.