How do I make my program as a background process in MSVC++ 6.0? Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.
There are several ways of doing this programmatically:-
1) Write a 'stub' executable which does a CreateProcess on the actual program you want as a background process. CreateProcess lets you set the 'priority' you want the new process to run at.
2) Call SetThreadPriority within the program you want to run in the background to change priority of your program's thread(s).
nope. not a service nor an NT service.
my goal would just be a regular win32 application that runs in the background.
temps,
what is a 'stub' executable?
guys,
what i have in mind is a process is running on the background then if certain conditions are met, it will dispay a dialog box. Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.
sorry for being vague.
"running on the background" means running like a daemon. Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.
What difference do you see between a "daemon" and ordinary Windows application? In Unix daemons are applications, not occupying terminal window. May be your qestion may sound like "how to create an application without output window?"
>> "running on the background" means running like a daemon.
Yeah, ok... lets start over shall we. A daemon in Windows is a NT Service.
There is an NT Service ATL Wizard in VC++ 6. I have used many times. Also a standard Win32 console application can be made to run as a service using SRVANY which comes in the NT Resource Kit. You can even turn a Java application running on the SUN VM into an NT Service using SRVANY
Probably 'stub' program is a bit unclear - we tend to use the term for a program who's only intention in life is to launch another program.
Not really sure what your requirement is having seen some of the discussions in this thread. However, if you want the 'background' program to be available without a user logged on, then you must use an NT Service to achieve this.
i think what i need is a windowless application that uses executes at low priority. Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.