Re: IGlobalInterfaceTable questions
- From: "kalevet" <kalevet@xxxxxxxxx>
- Date: 7 May 2006 00:37:05 -0700
I think I was dealing with pretty much the same problem lately... I'm
using a pool to cache interfaces that might be used by different
threads. The pool contains a cookie stack, and an interface to the GIT.
When a thread needs an interface, it turns to the pool and asks for
one. If there is none available, one is allocated. When the thread is
done, it returns the interface to the pool. At this point, if the
interface has already been registered in the GIT, the original cookie
should be put back it the cookie stack, without registering the
interface again. If the interface wasn't registered, now is the time.
The solution was pretty simple - the interface should be registered in
the GIT right after it is created, and the cookie should be moved
around with the interface. I inherited CComPtr for that purpose, and
added a cookie member to it.
If this is not similar to your case, could you please say where did
thread B get the interface from?
.
- Prev by Date: Re: Questions and problems in linking
- Next by Date: Re: IGlobalInterfaceTable questions
- Previous by thread: Re: IGlobalInterfaceTable questions
- Next by thread: Re: IGlobalInterfaceTable questions
- Index(es):
Relevant Pages
|