Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. EXE to Service

EXE to Service

Scheduled Pinned Locked Moved C / C++ / MFC
c++designquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rwilmink
    wrote on last edited by
    #1

    Hello All, does anyone know how I can run a MFC Executable as a Windows-service? It is a program that periodically checks for a file, and if found processes it and writes results to another file, so it has no user interface. Thanks, Ronald Wilmink.

    C D 2 Replies Last reply
    0
    • R rwilmink

      Hello All, does anyone know how I can run a MFC Executable as a Windows-service? It is a program that periodically checks for a file, and if found processes it and writes results to another file, so it has no user interface. Thanks, Ronald Wilmink.

      C Offline
      C Offline
      CodeBeetle
      wrote on last edited by
      #2

      I wrote a program called GenSvc which will do that... http://codebeetle.com/page.php?id=2[^] The source code is also available.


      CodeBeetle.Com


      1 Reply Last reply
      0
      • R rwilmink

        Hello All, does anyone know how I can run a MFC Executable as a Windows-service? It is a program that periodically checks for a file, and if found processes it and writes results to another file, so it has no user interface. Thanks, Ronald Wilmink.

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        rwilmink wrote: It is a program that periodically checks for a file... It would be better to let the OS notify you that the file has been created rather than waste CPU cycles checking for it. See ReadDirectoryChangesW() and FindFirstChangeNotification().


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups