Re: DisableThreadLibraryCalls

From: Steve Maillet \(eMVP\) (nospam1_at_EntelechyConsulting.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 09:21:16 -0400

The kernel notifies ALL Dlls unless the dll called
DisableThreadLibraryCalls(). The system cannot know if a thread will or
won't use the functions of a particular DLL so it MUST call DllMain For each
thread unless told not to for all threads. The advantage of
DisableThreadLibraryCalls() is that it can mark the DLL to skip this process
for most DLLs as it is not needed most of the time saving the overhead.

-- 
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


Relevant Pages

  • Re: CreateRemoteThread for hooking api
    ... > DLL_PROCESS_XXX notifications happen under the same loader lock. ... > BTW one should never call DisableThreadLibraryCalls in any DLL that uses C ... The CRT relies on thread detach notifications to clean up its ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CreateRemoteThread for hooking api
    ... BTW look at ... > I'm using VC ver 6.0 and I'v no expreince with threading. ... > Code Generation->run Time Library and saw MultyThread Dll (both in release ... >> BTW one should never call DisableThreadLibraryCalls in any DLL that uses ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Will DisableThreadLibraryCalls leak memory with libcmt?
    ... You call "DisableThreadLibraryCalls" in your DllMain ... The EXE is calling from a different thread which is not known inside the DLL (or better CRT of your DLL) ... Now I wonder why there is no warning to be found in the DisableThreadLibraryCalls API documentation or some knowledge base article because this is then a memory leak waiting to happen as soon as you ...
    (microsoft.public.win32.programmer.kernel)
  • Re: using ADOCE in VB.NET
    ... .NETCF v1.0 doesn't have COM interop built in so an interop dll generated ... Windows Embedded MVP ... Do have an opinion on the effectiveness of Microsoft Windows Mobile and ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: register OCX and DLL
    ... "Slobodan Brcin " wrote: ... > Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? ... >> I developed an application with OCX and DLL, these ocx and DLL where I have ...
    (microsoft.public.windowsxp.embedded)