run in background

Can i run my program in background
Last edited on
Yes.
how
$my-program cmd args &
i dont understand
A method...

1
2
3
4
5
6
7
#include <Windows.h>

void HideConsole()
{
  HWND hWnd = GetConsoleWindow();
  ShowWindow( hWnd, SW_HIDE );
}
Last edited on
If you don't need console I/O, you could mess with the Subsystem flag of the PE32 (change it to WINDOWS_GUI), and then Windows won't bother to attach a console to your program when it loads it.

Otherwise you'll have to do as HellfireXP suggests.


If you're using *nix let us know.
Topic archived. No new replies allowed.