
28 Jul
2004
28 Jul
'04
9:12 a.m.
Roland wrote:
DLL_THREAD_DETACH might already be too late for cleanup. You are relying on the fact that the c-runtime (with respect to this very thread) is still in a sane state! In fact it might not since the runtimes own detach functions
Hm? After some checking I can see that TLS can be freed after thread termination, see: http://msdn.microsoft.com/library/en-us/dllproc/base/thread_local_storage.as... What worries me is TlsFree documentation, saying "It is expected that DLLs call this function (if at all) only during DLL_PROCESS_DETACH.". Possibly I misunderstood your point ... B.