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#
  4. WindowsService Clarification

WindowsService Clarification

Scheduled Pinned Locked Moved C#
question
7 Posts 4 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.
  • M Offline
    M Offline
    MumbleB
    wrote on last edited by
    #1

    Hi Guys. I have written a FileWatcher WindowsService which works fine. Now, I want to go a step further. I have written a Windows App that the guys are currently using to convert files with. I want to incorporate this into the WindowsService. What is the best way of doing this? Would it be adviseable for me to code the conversion stuff into the service in the FileSystemWatcher_Created Event? Is this even possible? I have searched and I can't find anything that would suggest that this is possible or how it can be done. Has anybody done anything like this before? If yes how? Thanks

    Excellence is doing ordinary things extraordinarily well.

    P 1 Reply Last reply
    0
    • M MumbleB

      Hi Guys. I have written a FileWatcher WindowsService which works fine. Now, I want to go a step further. I have written a Windows App that the guys are currently using to convert files with. I want to incorporate this into the WindowsService. What is the best way of doing this? Would it be adviseable for me to code the conversion stuff into the service in the FileSystemWatcher_Created Event? Is this even possible? I have searched and I can't find anything that would suggest that this is possible or how it can be done. Has anybody done anything like this before? If yes how? Thanks

      Excellence is doing ordinary things extraordinarily well.

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      I would write a second Service to do the conversion. On my last job I had several Services; of which one ran reports of different types and another handled emailing the results to whoever needed them.

      M 1 Reply Last reply
      0
      • P PIEBALDconsult

        I would write a second Service to do the conversion. On my last job I had several Services; of which one ran reports of different types and another handled emailing the results to whoever needed them.

        M Offline
        M Offline
        MumbleB
        wrote on last edited by
        #3

        And how would I start or call this from withing the current service? Sorry for asking, this is the first time I'm dabbling in WindowsServices.

        Excellence is doing ordinary things extraordinarily well.

        L C P 3 Replies Last reply
        0
        • M MumbleB

          And how would I start or call this from withing the current service? Sorry for asking, this is the first time I'm dabbling in WindowsServices.

          Excellence is doing ordinary things extraordinarily well.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          this article[^] should help you out with beginning services.

          Check out the CodeProject forum Guidelines[^]

          M 1 Reply Last reply
          0
          • M MumbleB

            And how would I start or call this from withing the current service? Sorry for asking, this is the first time I'm dabbling in WindowsServices.

            Excellence is doing ordinary things extraordinarily well.

            C Offline
            C Offline
            Calla
            wrote on last edited by
            #5

            You could use .NET remoting and set up an IPC channel.

            1 Reply Last reply
            0
            • L Lost User

              this article[^] should help you out with beginning services.

              Check out the CodeProject forum Guidelines[^]

              M Offline
              M Offline
              MumbleB
              wrote on last edited by
              #6

              Thanks EliotA but my Service is working fine. It is processing the file once it has been picked up that the file has been created that i am after.

              Excellence is doing ordinary things extraordinarily well.

              1 Reply Last reply
              0
              • M MumbleB

                And how would I start or call this from withing the current service? Sorry for asking, this is the first time I'm dabbling in WindowsServices.

                Excellence is doing ordinary things extraordinarily well.

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #7

                They would both be running all the time, they're Services. In my case, I had the report runner insert a record to a database table telling the emailer what to do. On the next cycle, the emailer reads the record, sends the required emails, and (on success) deletes the record (on failure, the record gets marked as failed).

                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