creating hidden console application

Is there a way to create a console application which is not visible on the normal desktop as well as on task bar.I want to create an application which runs just as the system processes,they can be seen only in task manager.
It's not really a console application then, right? If you have a WinMain() instead of a main(), I think nothing should be created. I don't know about linux. Also, any GUI toolkit should do this if you don't explicitly tell it to create a window.
Daemons (system modules) and/or system services (in Windows world) would be more suited in this case rather than a GUI application. A GUI application that does not show anything is just unnecessarily complex for both code (you have to build with libraries you don't need) and program (loading/using libraries it does not really need).
Yes. you can. Hiding the a console application is easy.

But you'll need to know :

FindWindow
ShowWindow
#include <windows.h>


Hope this helps. :)
Last edited on
From some old code (that I never tested). It was for GLUT projects, so dunno.
Visual
1
2
3
#ifdef _MSC_VER
  #pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
#endif 


mingw
Linker properties
subsystem:console --> /susystem:windws /entry:mainCRTStartup
Mingw (gcc) -mwindows instead of -mconsole

hamsterman wrote:
I don't know about linux

I don't have a desktop, xP.
It would depend on how do you run the command.
To get a terminal, run from a terminal or spawn a terminal
$ /bin/sh -c xterm -e ~/program.bin
thank u all for the help.
Topic archived. No new replies allowed.