What does HRESULT 0x80010106 (RPC_E_CHANGED_MODE) mean?

 
Previous Next
RPC_E_SERVERFAULT RPC_E_INVALIDMETHOD

RPC_E_CHANGED_MODE

RPC_E_CHANGED_MODE means that the current thread was already initialized for COM with a different concurrency model. A thread cannot switch between incompatible apartment models without first being fully uninitialized.

How to correct initialization

  • Initialize each COM-using thread once with the intended CoInitializeEx flag.
  • Use the same flag for any subsequent initialization on that thread and balance successful calls with CoUninitialize.
  • Do not call OleInitialize on a thread already initialized as multithreaded.

Move components that require a different apartment model to a separate thread instead of trying to change the current thread in place.

Microsoft: COM documentation


Looking for a different code? Search another status or error code.