简体   繁体   English

如何防止COM Server EXE打开命令提示符窗口

[英]How to prevent COM Server EXE to open Command Prompt window

my question may be simple for you, but I have no experience about it. 我的问题对您来说可能很简单,但是我没有经验。 So, the problem is that I have a COM server and it is started from the context of another EXE, and I need to prevent this COM Server application to open a command prompt window, thanks in advance for your help. 因此,问题在于我有一个COM服务器,并且它是从另一个EXE的上下文启动的,并且我需要阻止此COM Server应用程序打开命令提示符窗口,在此先感谢您的帮助。

If you have to source code for the server, change the linker's /MACHINE option. 如果必须为服务器提供源代码,请更改链接器的/ MACHINE选项。 Project + Properties, Linker, System, SubSystem setting. 项目+属性,链接器,系统,子系统设置。 And replace the main() function with WinMain(). 并用WinMain()替换main()函数。

If you don't have to source code then you could use 如果您不需要源代码,则可以使用

Editbin yourserver.exe /subsystem:Windows

from the Visual Studio Command prompt. 从Visual Studio命令提示符。

将可执行文件创建/编译为GUI应用程序,默认情况下不会获得控制台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM