原来的 DLLENTRY解释


地址:http://msdn.microsoft.com/zh-cn/library/aa909718

Other versions of this page are also available for the following:
Windows Mobile Not Supported Windows Embedded CE Supported
8/27/2008

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.

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

Aa909718.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.

Aa909718.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);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值