About Problem in Thread Local Storage(TLS) with DLL

Hello,
I am using the dll with TLS Section and Tls Table Entry in Data
Directory of that dll.I have converted the exe(TLS) into dll and using
that dll(just changed the dll flag and address entry point). But when i
use the function of that dll it crashes after successfully loading the dll
with loadlibrary. I think that the entry in Tls Table Entry in Data
Directory is created from Borland compiler.

I have used the .tls section of dll which is generated by Microsoft
compiler which does not give problem.

The problem is caused when uwing the dll with tls section.

if any one knows about the loader and the way loader works will dll
with tls section or anything replated to this plz post reply.

-Tom

Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
Bid for Air Tickets on Air Sahara Flights at Prices Lower Than Before. Just log on to http://airsahara.indiatimes.com and Bid Now !

DLLs which have the .tls section cannot be loaded by LoadLibrary, they can
only be loaded during initial import resolution at EXE load.

This is documented IIRC.

Max

----- Original Message -----
From: “tom”
To: “Windows System Software Developers Interest List”
Sent: Friday, July 25, 2003 10:35 AM
Subject: [ntdev] About Problem in Thread Local Storage(TLS) with DLL

> Hello,
> I am using the dll with TLS Section and Tls Table Entry in Data
> Directory of that dll.I have converted the exe(TLS) into dll and using
> that dll(just changed the dll flag and address entry point). But when i
> use the function of that dll it crashes after successfully loading the dll
> with loadlibrary. I think that the entry in Tls Table Entry in Data
> Directory is created from Borland compiler.
>
> I have used the .tls section of dll which is generated by Microsoft
> compiler which does not give problem.
>
> The problem is caused when uwing the dll with tls section.
>
> if any one knows about the loader and the way loader works will dll
> with tls section or anything replated to this plz post reply.
>
>
> -Tom
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com