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. The Lounge
  3. Windows Shutdown

Windows Shutdown

Scheduled Pinned Locked Moved The Lounge
helpquestion
14 Posts 9 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 rw104

    hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance.

    S Offline
    S Offline
    SteveKing
    wrote on last edited by
    #2

    rw104 wrote: Is there something else I need to do??? Use the right forum?

    R 1 Reply Last reply
    0
    • S SteveKing

      rw104 wrote: Is there something else I need to do??? Use the right forum?

      R Offline
      R Offline
      rw104
      wrote on last edited by
      #3

      doh! yeah yeah, realised that I soon as i pressed the submit button. thanks for the smart, witty, sarcastic comment though I did'nt expect that for a second

      W B 2 Replies Last reply
      0
      • R rw104

        doh! yeah yeah, realised that I soon as i pressed the submit button. thanks for the smart, witty, sarcastic comment though I did'nt expect that for a second

        W Offline
        W Offline
        Weiye Chen
        wrote on last edited by
        #4

        rw104 wrote: thanks for the smart, witty, sarcastic comment You are considered lucky. Some were shown a "Einstein scolding dumbass..." picture... :) Weiye Chen When pursuing your dreams, don't forget to enjoy your life...

        1 Reply Last reply
        0
        • R rw104

          hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance.

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #5

          You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

          W H 2 Replies Last reply
          0
          • D Daniel Turini

            You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

            W Offline
            W Offline
            Weiye Chen
            wrote on last edited by
            #6

            Daniel Turini wrote: Ok, I bet you also didn't expect two sarcastic replies in a row I would call this "Chain Reaction" :) Weiye Chen When pursuing your dreams, don't forget to enjoy your life...

            1 Reply Last reply
            0
            • D Daniel Turini

              You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message before you can do this. Ok, I bet you also didn't expect two sarcastic replies in a row :-D Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski

              H Offline
              H Offline
              Heath Stewart
              wrote on last edited by
              #7

              Daniel Turini wrote: You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message... Just wait - if he can't even understand that this isn't a programming forum, he'll probably be emailing you asking why the compiler can't resolve the WM_QUERYRIGHTFORUM token! :rolleyes:

              Microsoft MVP, Visual C# My Articles

              R 1 Reply Last reply
              0
              • R rw104

                hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance.

                N Offline
                N Offline
                Navin
                wrote on last edited by
                #8

                Put a piece of duct tape over the power button. Remember, even if you win the rat race, you're still a rat.

                L 1 Reply Last reply
                0
                • H Heath Stewart

                  Daniel Turini wrote: You need to do a call to SendMessage with the WM_QUERYRIGHTFORUM message... Just wait - if he can't even understand that this isn't a programming forum, he'll probably be emailing you asking why the compiler can't resolve the WM_QUERYRIGHTFORUM token! :rolleyes:

                  Microsoft MVP, Visual C# My Articles

                  R Offline
                  R Offline
                  Roger Wright
                  wrote on last edited by
                  #9

                  :laugh: Excellent point! I can't wait to see your response to the question about directly accessing the BIOS over in the VB forum.:-D Heard in Bullhead City - "You haven't lost your girl -
                  you've just lost your turn..." [sigh] So true...

                  H 1 Reply Last reply
                  0
                  • N Navin

                    Put a piece of duct tape over the power button. Remember, even if you win the rat race, you're still a rat.

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

                    #include <ducttape.h> tape SomeTape; SomeTape->Cover("PowerButton"); :rolleyes: Paul ;) Homepage: pvdw.ath.cx
                    Sonork: 100.33943

                    1 Reply Last reply
                    0
                    • R Roger Wright

                      :laugh: Excellent point! I can't wait to see your response to the question about directly accessing the BIOS over in the VB forum.:-D Heard in Bullhead City - "You haven't lost your girl -
                      you've just lost your turn..." [sigh] So true...

                      H Offline
                      H Offline
                      Heath Stewart
                      wrote on last edited by
                      #11

                      Now why would I visit the VB forum? :laugh:

                      Microsoft MVP, Visual C# My Articles

                      R 1 Reply Last reply
                      0
                      • R rw104

                        doh! yeah yeah, realised that I soon as i pressed the submit button. thanks for the smart, witty, sarcastic comment though I did'nt expect that for a second

                        B Offline
                        B Offline
                        Bruce Duncan
                        wrote on last edited by
                        #12

                        rw104 wrote: realised that I soon as i pressed the submit button Then I think that the 7 minutes that elapsed between your post and the first response would have been ample time for you to delete your post from the lounge and repost it in a more appropriate forum. Especially given the speed of CP as of late.

                        Searching the web without Google is like straining sewage with your teeth.
                        Userfriendly, 2003/06/07

                        R 1 Reply Last reply
                        0
                        • H Heath Stewart

                          Now why would I visit the VB forum? :laugh:

                          Microsoft MVP, Visual C# My Articles

                          R Offline
                          R Offline
                          Roger Wright
                          wrote on last edited by
                          #13

                          Erm, a little light entertainment? It does get rather slow around here at times...:-D Heard in Bullhead City - "You haven't lost your girl -
                          you've just lost your turn..." [sigh] So true...

                          1 Reply Last reply
                          0
                          • B Bruce Duncan

                            rw104 wrote: realised that I soon as i pressed the submit button Then I think that the 7 minutes that elapsed between your post and the first response would have been ample time for you to delete your post from the lounge and repost it in a more appropriate forum. Especially given the speed of CP as of late.

                            Searching the web without Google is like straining sewage with your teeth.
                            Userfriendly, 2003/06/07

                            R Offline
                            R Offline
                            rw104
                            wrote on last edited by
                            #14

                            well spotted, I forgot that directly after I posted the message I had to go to the toilet and crack one off over your mum...

                            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