Share via


CAtlDllModuleT::DllMain

The optional entry point into a dynamic-link library (DLL).

BOOL WINAPI DllMain( 
   DWORD dwReason, 
   LPVOID /*lpReserved*/
) throw( );

Parameters

  • dwReason
    If set to DLL_PROCESS_ATTACH, the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls are disabled.

  • lpReserved
    Reserved.

Return Value

Always returns TRUE.

Remarks

Disabling the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls can be a useful optimization for multithreaded applications that have many DLLs, that frequently create and delete threads, and whose DLLs do not need these thread-level notifications of attachment/detachment.

Requirements

Header: atlbase.h

See Also

Reference

CAtlDllModuleT Class

DisableThreadLibraryCalls

DllMain