Pre-amble: I use Lazarus 1.2.6 and Freepascal 2.6.4 on Windows 7 and my solution must be based on that - not C or C++. I could use Delphi though, if something similar exists for that.
Problem: I wish to create a small program that is ideally launched from the command line, but then just runs in the background without the need for the console application to be open visibly.
I'm trying to work out how best to achieve it.
I read this link and this link and this C based example and this Linux example but as one user points out "if you don't want a console application, don't make one", which begs the question of what are the other ways? If you don't want a GUI, and you don't want a console, I assume there's another way to create a silent program, then launch it, and then just have it run in the background? Preseumbly as a service or some such?
Or, the other way that occured to me is to create a Library (which generates a DLL when compiled of course) that contains my programs functions, export those functions at the end of the DLL, then call them from a seperate terminal application which, I assume, I could then close but the functions that are called from the DLL might continue to run? In other words - two programs - one terminal program to launch the other non-visible program and then close the launching program? Is that possible or recommended?