Switched all the TLS code from static (using __declspec(thread)) to dynamic TLS (using TlsAlloc et. al.). This fixes the bug where, in some cases, the loader does not initialize thread local storage in a timely manner while loading DLLs. This was causing m_tls to be NULL and was causing many access violation exceptions to be taken.
Switched all the TLS code from static (using __declspec(thread)) to dynamic TLS (using TlsAlloc et. al.). This fixes the bug where, in some cases, the loader does not initialize thread local storage in a timely manner while loading DLLs. This was causing m_tls to be NULL and was causing many access violation exceptions to be taken.

dmoulding/vld,KindDragon/vld,zcnet4/vld,zcnet4/vld,smanders/vld,smanders/vld,dmoulding/vld,ioannis-e/vld,slideclick/vld,erdincay/vld,KindDragon/vld,slideclick/vld,ioannis-e/vld,akaStiX/vld,erdincay/vld,akaStiX/vld