_CorDllMain

Instructs the Windows loader to look for the entry point in the DLL image, which must be named DllMain. In Windows XP or later, this function is called directly by the operating system loader. In versions of Windows earlier than Windows XP, it is called indirectly through a fixup in the loader.

Syntax

BOOL STDMETHODCALLTYPE _CorDllMain(
  HINSTANCE hInst,
  DWORD dwReason,
  LPVOID lpReserved
)

Header file: Include Mscoree.h.

Library: link Link with Mscoree.lib.

Parameters

  • hInst
    The instance handle of the loaded module.
  • dwReason
    The reason for loading.
  • lpReserved
    Unused.

Return Values

This method returns TRUE for success and FALSE if an error occurs.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family
Header: Declared in Mscoree.h
Library: Included as a resource in Mscoree.dll