VirtualBox

Ignore:
Timestamp:
Mar 25, 2011 4:19:12 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70804
Message:

Init COM for all EMTS and PDMThreads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r36411 r36439  
    754754    HRESULT setErrorNoLog(HRESULT aResultCode, const char *pcsz, ...);
    755755
     756
     757    /** Initialize COM for a new thread. */
     758    static HRESULT initializeComForThread(void)
     759    {
     760#ifndef VBOX_WITH_XPCOM
     761        HRESULT hrc = CoInitializeEx(NULL, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE | COINIT_SPEED_OVER_MEMORY);
     762        AssertComRCReturn(hrc, hrc);
     763#endif
     764        return S_OK;
     765    }
     766
     767    /** Uninitializes COM for a dying thread. */
     768    static void uninitializeComForThread(void)
     769    {
     770#ifndef VBOX_WITH_XPCOM
     771        CoUninitialize();
     772#endif
     773    }
     774
     775
    756776private:
    757777
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette