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. Help Wanted to display dlg box frm the Service

Help Wanted to display dlg box frm the Service

Scheduled Pinned Locked Moved C / C++ / MFC
help
11 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.
  • T Offline
    T Offline
    ThatsAlok
    wrote on last edited by
    #1

    I want to display Dialog Box from window service, but i am unable to do that pls help i am using domodol to show dlg box but it is not showing. pls help me abt this waiting for reply I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

    D A S 3 Replies Last reply
    0
    • T ThatsAlok

      I want to display Dialog Box from window service, but i am unable to do that pls help i am using domodol to show dlg box but it is not showing. pls help me abt this waiting for reply I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

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

      My first question would be why would you want a UI component in a service?


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      T 1 Reply Last reply
      0
      • T ThatsAlok

        I want to display Dialog Box from window service, but i am unable to do that pls help i am using domodol to show dlg box but it is not showing. pls help me abt this waiting for reply I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

        A Offline
        A Offline
        Antony M Kancidrowski
        wrote on last edited by
        #3

        I suggest that if you write a GUI application that interogates the service. Windows services run before users login and indeed run without a desktop. Ant. I'm hard, yet soft.
        I'm coloured, yet clear.
        I'm fuity and sweet.
        I'm jelly, what am I?
        - David Williams (Little Britain)

        T 1 Reply Last reply
        0
        • T ThatsAlok

          I want to display Dialog Box from window service, but i am unable to do that pls help i am using domodol to show dlg box but it is not showing. pls help me abt this waiting for reply I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

          S Offline
          S Offline
          suiram40
          wrote on last edited by
          #4

          #ifdef _WIN32_WINNT #if (_WIN32_WINNT >= 0x0400) #define MB_SERVICE_NOTIFICATION 0x00200000L #else #define MB_SERVICE_NOTIFICATION 0x00040000L #endif #define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L #endif MessageBox(...,MB_SERVICE_NOTIFICATION)

          T 1 Reply Last reply
          0
          • D David Crow

            My first question would be why would you want a UI component in a service?


            "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            yes i want to display some infoemation to user thorugh dlg box if you know the code pls help me I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

            D 1 Reply Last reply
            0
            • S suiram40

              #ifdef _WIN32_WINNT #if (_WIN32_WINNT >= 0x0400) #define MB_SERVICE_NOTIFICATION 0x00200000L #else #define MB_SERVICE_NOTIFICATION 0x00040000L #endif #define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L #endif MessageBox(...,MB_SERVICE_NOTIFICATION)

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              what is that sir. i want to show dlg box your above code is also not working I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

              1 Reply Last reply
              0
              • A Antony M Kancidrowski

                I suggest that if you write a GUI application that interogates the service. Windows services run before users login and indeed run without a desktop. Ant. I'm hard, yet soft.
                I'm coloured, yet clear.
                I'm fuity and sweet.
                I'm jelly, what am I?
                - David Williams (Little Britain)

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                how a Gui application interact with service,have you any idea. i think wheather i use socket or there is any other way I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

                A D 2 Replies Last reply
                0
                • T ThatsAlok

                  how a Gui application interact with service,have you any idea. i think wheather i use socket or there is any other way I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

                  A Offline
                  A Offline
                  Antony M Kancidrowski
                  wrote on last edited by
                  #8

                  There are various methods of interprocess communication(IPC). Named pipes, memory mapped files and other forms of shared memory. If you search for IPC on codeproject you can't go far wrong reading about these. :) Ant. I'm hard, yet soft.
                  I'm coloured, yet clear.
                  I'm fuity and sweet.
                  I'm jelly, what am I?
                  - David Williams (Little Britain)

                  1 Reply Last reply
                  0
                  • T ThatsAlok

                    yes i want to display some infoemation to user thorugh dlg box if you know the code pls help me I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

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

                    I reiterate that this is a bad idea. Most services run on a server locked away in a closet somewhere, so if your service presented any UI elements, such as a message box, no user would be in front of the machine to see and then dismiss it. Also, any windows created would probably appear on a window station or desktop different from the one the user was sitting in front of, and thus the message wouldn't be visible to the user anyway. It sounds like you need a Service Control Program (SCP) instead.


                    "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

                    T 1 Reply Last reply
                    0
                    • D David Crow

                      I reiterate that this is a bad idea. Most services run on a server locked away in a closet somewhere, so if your service presented any UI elements, such as a message box, no user would be in front of the machine to see and then dismiss it. Also, any windows created would probably appear on a window station or desktop different from the one the user was sitting in front of, and thus the message wouldn't be visible to the user anyway. It sounds like you need a Service Control Program (SCP) instead.


                      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

                      T Offline
                      T Offline
                      ThatsAlok
                      wrote on last edited by
                      #10

                      Yeah i got the solution. i have made my service desktop interactive. all of my problem has been solved thanks for your concern. now i will use winlogon notifcation package to know wheather the user is login or not thanks any way I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

                      1 Reply Last reply
                      0
                      • T ThatsAlok

                        how a Gui application interact with service,have you any idea. i think wheather i use socket or there is any other way I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

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

                        Alok the programmer wrote: how a Gui application interact with service,have you any idea. This is what a Service Control Program (SCP) is for. It's how the actual service is configured.


                        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

                        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