Entry and exit functions for DLLs

Source: Internet
Author: User

When the Dll_process_attach process starts or calls LoadLibrary, the DLL maps to the address space of the current process, during which the DLL initializes the instance data
The Dll_process_detach DLL is being detached from the address space of the process, which may be the process itself exiting or calling FreeLibrary, in which case the DLL may not initialize any instances.
The Dll_thread_attach process creates a new thread. At this point, the system invokes all DLL entry functions associated with the process. This call is made in the context of the new thread and is used to allocate thread-specific data
Dll_thread_detach a thread is exiting, in which case the DLL releases thread-specific initialization data.

WARNING: Call TerminateThread () does not call Dll_thread_detach when terminating a thread abnormally

Entry and exit functions for DLLs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.