Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

template<class I>
HRESULT ComPtr< I >::createLocalObject ( const CLSID &  clsid  )  [inline]

Creates a local (out-of-process) object of the given class ID and starts to manage a reference to the created object in case of success.

Note: In XPCOM, the out-of-process functionality is currently emulated through in-process wrapper objects (that start a dedicated process and redirect all object requests to that process). For this reason, this method is fully equivalent to createInprocObject() for now.

Definition at line 381 of file ptr.h.

Referenced by main().

#if !defined (VBOX_WITH_XPCOM)
        HRESULT rc;
        I *obj = NULL;
        rc = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, _ATL_IIDOF(I),
        *this = obj;
        if (SUCCEEDED(rc))
        return rc;
#else /* !defined (VBOX_WITH_XPCOM) */
        return createInprocObject(clsid);
#endif /* !defined (VBOX_WITH_XPCOM) */

Generated by  Doxygen 1.6.0   Back to index