Disable showing console window

后端 未结 4 2078
栀梦
栀梦 2021-02-04 13:27

Where I can disable in Microsoft-Visual-C++ showing console window?

4条回答
  •  旧巷少年郎
    2021-02-04 13:39

    You can disable console by manipulating pre-compiled EXE subsystem- this way you don't need any change in code as you are working on final product- negative aspect is that you would need to do this every time you recompile the project. You can do it via HEX editor or use free CFF Explorer.

    1. Open EXE via CFF Explorer
    2. Go to Nt Headers>Optional Header
    3. Navigate over Subsystem and on the right side click on Windows Console and select Windows GUI.
    4. Save file, console will no longer appear

    You can do binary comparison and find the exact location in raw PE header, then maybe do some automation after-compile in VS

提交回复
热议问题