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. Windows Service

Windows Service

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
4 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.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I am a total stranger to windows service development. I needed to understand the limitations . 1. Is it possible to have MFC support in Service code? 2. Can I create a hidden window in a Service ? My basic requirement is to intercept WM_DEVICE_CHANGE notifications to process this message.

    Engineering is the effort !

    J L 2 Replies Last reply
    0
    • A act_x

      I am a total stranger to windows service development. I needed to understand the limitations . 1. Is it possible to have MFC support in Service code? 2. Can I create a hidden window in a Service ? My basic requirement is to intercept WM_DEVICE_CHANGE notifications to process this message.

      Engineering is the effort !

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #2

      Yes, you can (1 and 2), you must set the service to be able to interact with the desktop. Moreover you can use XYNTService (you can easily find it here) in order to use any app as a service. Hope this helps.

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      M 1 Reply Last reply
      0
      • A act_x

        I am a total stranger to windows service development. I needed to understand the limitations . 1. Is it possible to have MFC support in Service code? 2. Can I create a hidden window in a Service ? My basic requirement is to intercept WM_DEVICE_CHANGE notifications to process this message.

        Engineering is the effort !

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

        RegisterDeviceNotification may be what you are looking for if developing a service to monitor a specific device. http://msdn2.microsoft.com/en-us/library/aa363431.aspx[^] Not sure if you are the author of the device driver but perhaps this document will help: http://www.microsoft.com/whdc/driver/kernel/KM-UMGuide.mspx[^] It describes WM_DEVICE_CHANGE notifications and other techniques of device change notification. Best Wishes, -David Delaune

        1 Reply Last reply
        0
        • J Joan M

          Yes, you can (1 and 2), you must set the service to be able to interact with the desktop. Moreover you can use XYNTService (you can easily find it here) in order to use any app as a service. Hope this helps.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          No need to interact with the desktop for hidden windows. That's only if you want a user to see the windows, which is really frowned upon from services going forward with Vista+. Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          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