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.

Added support for supplying the full path to modules to be patched/restored as a workaround for the problem where sometimes GetModuleHandle fails for modules stored in the side-by-side cache unless the full path is specified.

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