Jacek Caban <jacek at codeweavers.com> writes: > } > + > + tl = InterlockedExchangePointer((void**)&typelib, tl); > + > + if(tl) > + ITypeLib_Release(tl); That's not thread-safe. You need to use InterlockedCompareExchangePointer. -- Alexandre Julliard julliard at winehq.org