在/ SUBSYSTEM:CONSOLE之间切换到/ SUBSYSTEM:DLL中的WINDOWS的影响 [英] Effects of switching between /SUBSYSTEM:CONSOLE to /SUBSYSTEM:WINDOWS in a DLL

查看:185
本文介绍了在/ SUBSYSTEM:CONSOLE之间切换到/ SUBSYSTEM:DLL中的WINDOWS的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种情况下,我找不到有用的MSDN。使用 Dependency Walker ,在模块列表中,我看到Console和GUI的混合使用。

I couldn't find anything useful on the MSDN for this case. Using Dependency Walker, in the module list, I see a mixed usage of Console and GUI.

编译DLL时是否有影响?

Does this have an impact when compiling a DLL?

推荐答案

此选项仅对应用程序( exe ),而不是图书馆( dll )。

This option only has an effect on applications (exe), not on libraries(dll).

文档说:


/ SUBSYSTEM 选项指定可执行文件的环境。

The /SUBSYSTEM option specifies the environment for the executable.

子系统的选择会影响链接器将选择的入口点符号(或入口点
函数)。

The choice of subsystem affects the entry point symbol (or entry point function) that the linker will select.

不影响有自己的库(可选)入口点

This does not affect libraries, which have their own (optional) entry point.

其他信息降低Cyber​​Shadow的评论:当加载DLL时,子系统字段本身似乎被忽略。 关于CSRSS的这篇文章(强调我的):

Additional information following CyberShadow's comment: The subsystem field itself seems to be ignored when a DLL is loaded. This article about CSRSS says (emphasis mine):


此外,每个进程都与一个子系统相关联;
此属性由链接器(在编译
进程中)设置,并位于以下PE结构字段中:[...]

Furthermore, each process is associated with one, certain subsystem; this property is being set by the linker (during the compilation process), and resides in the following PE structure field: [...]

这篇关于在/ SUBSYSTEM:CONSOLE之间切换到/ SUBSYSTEM:DLL中的WINDOWS的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆