I want to know how to hide a console window when it starts.
It\'s for a keylogger program, but it\'s not my intention to hack someone. It\'s for a littl
So i wanna know why it opens a new console, instead of just only create and hide the first one.
A console application doesn't actually create a console itself, it just runs in one. If you run the executable from Explorer, Windows creates a console for it to run in. When you call FreeConsole
, it doesn't close the new console, simply detaches your process from it.
As WhozCraig noted in the comments, create a regular Windows application and don't create a window.