DisconnectedContext / RPC_E_WRONG_THREAD

Hello,

I'm using VS2005 / VB.NET for creating an addin. Whiledebugging aMDA DisconnectedContext Error occurred -  searchingthe web Icame to the conclusion that it must be a VS error and Iturned offthe MDA-Message.

But know when I access a stored ModelDoc2-Instance I get theerror"RPC_E_WRONG_THREAD" .

I wonder if this two errors are related to each other andifSolidWorks automatically destroys the contexts, which makeitimpossible to access the ModelDoc2-instances.

Or is there any setting for the addin to make it work?

Thanks,

StephanSolidworksApi macros