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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Message from a "Service" in vista

Message from a "Service" in vista

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelptutorialquestion
2 Posts 2 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.
  • S Offline
    S Offline
    Subrat Patnaik
    wrote on last edited by
    #1

    Hi, in operating systems prior to windows vista a service could easily send message to desktop as they both shared the same session. but in windows vista services run in console session 0, hence it is not possible to send a message to desktop, as the message remains in the terminal session without being displayed on desktop. this is all due to session 0 isolation mae in windows vista. as specified, now in order to send a message to desktop we have to use the API "WTSSendMessage" and also use the "WTSEnumerateSession" to find out which console session are active. can i get some help on how to implement these functions to be able to send a message to the desktop successfully?? :doh:

    M 1 Reply Last reply
    0
    • S Subrat Patnaik

      Hi, in operating systems prior to windows vista a service could easily send message to desktop as they both shared the same session. but in windows vista services run in console session 0, hence it is not possible to send a message to desktop, as the message remains in the terminal session without being displayed on desktop. this is all due to session 0 isolation mae in windows vista. as specified, now in order to send a message to desktop we have to use the API "WTSSendMessage" and also use the "WTSEnumerateSession" to find out which console session are active. can i get some help on how to implement these functions to be able to send a message to the desktop successfully?? :doh:

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

      There's tons of articles floating around about this... But why not use a better IPC[^] method than messages? 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