Click to See Complete Forum and Search --> : Problem With AtlAdvise


AalokB
May 5th, 1999, 01:59 PM
I am getting error 0x80040202(CO_E_FAILEDTOOPENTHREADTOKEN) "Unable to open the access token of the current thread" while trying to AtlAdvise to a remote (DCOM) object. What can I do to successfully advise ?

For additional info this is what I am doing,

1. VB Client creates a Remote C++ Object "SomeServer".
2. VB Client asks SomeServer for a "CollectionClass".
3. SomeServer creates the CollectionClass and returns it to VB Client
4. CollectionClass implements Custom Marshaling.
5. "CollectionClassProxy" gets created on the Client side
6. "CollectionClassDriver" is located with CollectionClass and so is remote for CollectionClassProxy.
7. CollectionClass sends marshaled pointer to "CollectionClassDriver" to CollectionClassProxy through UnMarshalInterface
8. CollectionClassProxy gets a pointer to "CollectionClassDriver".
9. CollectionClassProxy tries to AtlAdvise CollectionClassDriver BUT gets error 0x80040202

Thanks in advance,

Aalok.