能力值:
( LV7,RANK:100 )
2 楼
自己调用API退出
其实使用return返回后也是由框架负责退出的
上传的附件:
能力值:
( LV12,RANK:340 )
3 楼
有没有指定入口点0.0
能力值:
( LV2,RANK:10 )
4 楼
[QUOTE=sidyhe;1304755]自己调用API退出
其实使用return返回后也是由框架负责退出的
[/QUOTE]
请问具体应该调用哪个api呢, 是exit吗, 但是exit好像是C库里面的吧.
能力值:
( LV2,RANK:10 )
5 楼
vs2008开发的, 在link的高级里指定了WinMain的入口点.
能力值:
( LV2,RANK:10 )
6 楼
自己定义的入口点,是需要进程所有线程都结束才真正的结束,C库的return之后还是会调用ExitProcess的,你可以自己调用ExitProcess来终止掉进程
能力值:
( LV2,RANK:10 )
7 楼
windows 里面的exit 是调用 了ExitProcess
This function is the preferred method of ending a process because it provides a clean process shutdown. This includes calling the entry-point function of all attached DLLs with a value indicating that the process is detaching from the DLL.
能力值:
( LV2,RANK:10 )
8 楼
return 以后还是需要调用C库的东西释放一些东西! 最后都是调用系统的ExitProcess~
所以 用ExitProcess 结束进程吧
能力值:
( LV7,RANK:100 )
9 楼
kernel32
ExitProcess or ExitThread
ntdll
ZwTerminateProcess or ZwTerminateThread
能力值:
( LV12,RANK:340 )
10 楼
按理说,你指定了入口点,并且没有使用库函数的话,是不会链接libcmt的。
你winmain直接return就行了。
能力值:
( LV3,RANK:20 )
11 楼
RtlFreeThreadActivationContextStack();
RtlExitUserThread(code);
能力值:
( LV2,RANK:10 )
12 楼
使用exitprocess搞定了, 谢谢大神们的帮助.