Console app with no app

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Moyles

    #1

    Console app with no app

    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?
  • Carl Daniel [VC++ MVP]

    #2
    Re: Console app with no app

    Frank Moyles wrote:
    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


    Comment

    Working...