Console app with no app

F

Frank Moyles

I have written a console application that acts as a server engine,
processes commands sent by another application (using IPC). Currently,
when my server app runs, it displays the standard DOS box.

I want to be able to run my server app without displaying ANY console
(i.e. so it is hidden), so that it mimics a Unix daemon - does anyone
know how I may do this?
 
C

Carl Daniel [VC++ MVP]

Frank said:
I have written a console application that acts as a server engine,
processes commands sent by another application (using IPC). Currently,
when my server app runs, it displays the standard DOS box.

I want to be able to run my server app without displaying ANY console
(i.e. so it is hidden), so that it mimics a Unix daemon - does anyone
know how I may do this?

Make it a Windows app instead of a Console app. You don't need to run a
message pump (WinMain) if you don't need to process window messages - which
you probably don't. (Really, the only difference between a Windows app and
a Console app is that a Console app has a console allocated/created for it
automatically, while a Windows app doesn't).

You might want to make your app into a Window Service - a special kind of
Windows app that can be started and stopped using the service control
manager and that is not associated with any interactive login session, so it
stays running when the interactive user logs off.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top