Re: IRunningObjectTable::GetObject returns RPC_E_DISCONNECTED
Alexander Lamaison wrote:
Is there a way to make an object survive the destruction of the thread =
that
created it?
Thread: yes; apartment: no. For STA apartments, the two are one and the =
same, so the thread that created the object must remain alive (and run a =
message pump). For MTA apartments, threads may come and go, but at least =
one thread must be running in the MTA apartment at all times to keep it =
alive.
At the moment this is just a mockup for my unit tests but the
real situation I'm trying to model is where Windows Explorer calls my =
code
from several seperate threads and I cache an object in the ROT between
calls (this was failing).
See if SHLoadInProc helps. You may also want to ask in =
microsoft.public.platformsdk.shell.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not =
necessarily a good idea. It is hard to be sure where they are going to =
land, and it could be dangerous sitting under them as they fly overhead. =
-- RFC 1925