I have the following sceanrio:
void Method_A()
{
Method_B();
}
void Method_B()
{
Method_C();
}
Now I do this:
Thread myThread = new Thread(Method_A);
myThread.Start();
and I get the following exception:
This operation failed because the QueryInterface call on the COM component for the interface with IID '{9149349D-5A91-11CF-8700-00AA0060263B}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
How to call all sub-called methods on the same thread which different from the main thread?
User contributions licensed under CC BY-SA 3.0