win32程序中 能用类封装Winmain() 使他成为成员函数吗?

fvv 2003-06-20 10:33:04
如题。
...全文
44 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
fvv 2003-06-29
  • 打赏
  • 举报
回复
up
谢谢您的关注。

能写点关键语句吗?给点指引。这段话msdn也有中文版的,看不懂。不知道怎么实现。多次调试没有成功。
masterz 2003-06-21
  • 打赏
  • 举报
回复
yes, you can, but you have to customize entry point at the same time.
/ENTRY:function

The Entry-Point Symbol option sets the starting address for an .exe file or DLL.

Type a function name in the Entry-Point Symbol text box (or in the function argument on the command line). The function must be defined with the __stdcall calling convention. The parameters and return value must be defined as documented in the Win32 API for WinMain (for an .exe file) or DllEntryPoint (for a DLL). It is recommended that you let the linker set the entry point so that the C run-time library is initialized correctly, and C++ constructors for static objects are executed.

By default, the starting address is a function name from the C run-time library. The linker selects it according to the attributes of the program, as shown in the following table.

Function name Default for
mainCRTStartup (or wmainCRTStartup) An application using /SUBSYSTEM:CONSOLE; calls main (or wmain).
WinMainCRTStartup (or wWinMainCRTStartup) An application using /SUBSYSTEM:WINDOWS; calls WinMain (or wWinMain), which must be defined with __stdcall.
_DllMainCRTStartup A DLL; calls DllMain, which must be defined with __stdcall, if it exists.

If the /DLL or /SUBSYSTEM option is not specified, the linker selects a subsystem and entry point depending on whether main or WinMain is defined.

The functions main, WinMain, and DllMain are the three forms of the user-defined entry point.

7,540

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 VC.NET
社区管理员
  • VC.NET社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧