Поделиться через


DLLENTRY (Windows Embedded CE 6.0)

1/5/2010

This macro definition specifies the function that is used as the entry point for a .dll file if the value of TARGETTYPE is set equal to DYNLINK.

If no value is given for DLLENTRY, the default value is _DllMainCRTStartup.

Values

Value Description

_DllMainCRTStartup

Preferred C Runtime entry point for a DLL.

This entry point is defined in the C Runtime. It initializes the C Runtime and calls global initializers on process attach. It chains to DllMain. It deinitializes the C Runtime and calls global destructors on process detach.

Your DLL may define, but does not need to export, a 'DllMain' function with the following signature:

BOOL DllMain(HANDLE hInstDll, DWORD dwReason, LPVOID lpvReserved);

DllMain

Ee478765.note(en-US,WinEmbedded.60).gifNote:
The actual name of the function is not significant. By convention, the name 'DllMain' is used for DLL entry points. The name of any function defined in your DLL can be used as an entry point.

Direct entry point for a DLL.

If you use the C Runtime in your application, it is responsible for performing any initialization of the C Runtime at process attach, and for deinitializing the C Runtime at process detach.

Ee478765.note(en-US,WinEmbedded.60).gifNote:
Global initializers are normally called by the C Runtime initialization code, so global variables will be initialized to zero instead of their expected value. If you are not using the C Runtime, use this entry point.

Your DLL must define, but does not need to export, a 'DllMain' function with the following signature:

BOOL DllMain(HANDLE hInstDll, DWORD dwReason, LPVOID lpvReserved);

_DllEntryCRTStartup

Basic C Runtime entry point for a DLL.

This entry point is defined in the C Runtime.

It initializes the C Runtime and calls global initializers on process attach. It chains to DllEntry. It deinitializes the C Runtime and calls global destructors on process detach. This entry point does not do any exception handling and does not chain to _pRawDllMain, which is required by some libraries such as MFC and ATL.

Your DLL must define, but does not need to export, a 'DllEntry' function with the following signature:

BOOL DllEntry(HANDLE hInstDll, DWORD dwReason, LPVOID lpvReserved);

See Also

Concepts

Sources File
TARGETTYPE

Other Resources

CRT Entry Points
DllMain
DisableThreadLibraryCalls