Console app with no app

  • Thread starter Thread starter Frank Moyles
  • Start date Start date
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?
 
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
 
Back
Top