Re: DisableThreadLibraryCalls by Sajid
Sajid
Mon Aug 30 06:24:26 CDT 2004
Hi Steve,
I have a doubt related to the thread creation in a process
with multiple DLLs loaded in its space.
When a thread is created in this environment,
would kernel notify ALL the DLLs in that process to
allocate TLS[thread local storage for the DLL] for that
thread OR the kernel notifies only the particular DLL for
TLS allocation ?
In case, the kernel notifies all the DLLs in that process,
what is its advantage in doing so, as all the DLLs
may not be used by that thread.
It would be most welcome if you can detail the thread
creation in a process of this environment.
regards
sajid
"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:O0Z5d4njEHA.632@TK2MSFTNGP12.phx.gbl...
> It does so by disabling thread library calls! ;-) Every time a thread is
> started after a DLL is loaded DllMain is called with a THREAD_ATTACH this
is
> used to allocate per thread local storage for the DLL. If the DLL doesn't
> need any (Typically the case) that overhead can be eliminated.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>