Thread Local Storage does not work with DLLs loaded using LoadLibrary
|Reported by:||disc||Owned by:|
|Keywords:||WinXP TLS DLL||Cc:|
See PRB: Calling LoadLibrary() to Load a DLL That Has Static TLS and optionally this series on TLS for more in-depth information.
In the best case LoadLibrary fails (Windows 95) but with later systems you will get an access violation at some point (if you're lucky when first accessing a __declspec(thread) variable).
It would be unfortunate to, by default, disable TLS compiler support for MSW but I don't see an alternative currently.
This applies to XP/Windows Server 2003 and earlier systems and for example occurs with Photoshop plug-ins.
Change History (18)
comment:14 Changed 20 months ago by VZ
- Resolution set to fixed
- Status changed from confirmed to closed
comment:15 Changed 20 months ago by vadz
- Milestone set to 3.0.1
- Resolution changed from fixed to port to stable
- Status changed from closed to portneeded