The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

_CorDllMain Function

Instructs the Windows loader to look for the entry-point function named DllMain in the DLL image.

    HINSTANCE hInst,
    DWORD     dwReason,
    LPVOID    lpReserved


Parameter Description


[in] The instance handle of the loaded module.


[in]Indicates why the DLL entry-point function is being called. This parameter can be one of the following values: DLL_PROCESS_ATTACH, DLL_THREAD_ATTACH, DLL_THREAD_ATTACH, or DLL_PROCESS_DETACH. For descriptions of these values, see the DllMain documentation in the Platform SDK.


[in] Unused.

This method returns true for success and false if an error occurs.

In Windows 98, Windows ME, Windows NT, and Windows 2000, the function is called indirectly through a fixup in the loader. In all other versions of Windows, it is called directly by the operating system loader.

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Included as a resource in Mscoree.dll

.NET Framework Version: 2.0, 1.1, 1.0

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft