Disabling Thread Library Calls

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Multithreaded applications can become quite large and complex. To increase the efficiency of your code, Windows Mobile supports the DisableThreadLibraryCalls function. DisableThreadLibraryCalls disables DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls from a specified DLL module. By disabling the notifications for a DLL, Windows Mobile does not page in the DLL initialization code when creating or deleting a thread.

Use DisableThreadLibraryCalls in multithreaded applications that have many DLL calls that frequently create and delete threads, or whose DLLs do not require thread-level attachment and detachment notification. You can also disable thread notification when you do not need to track a thread. To disable thread tracking, call DisableThreadLibraryCalls in the code that responds to a DLL_PROCESS_ATTACH message.

See Also

Concepts

Loader