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. Nice change to Windows 7...

Nice change to Windows 7...

Scheduled Pinned Locked Moved The Lounge
combeta-testingtutorialquestion
15 Posts 10 Posters 3 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.
  • D Offline
    D Offline
    Dave Kreskowiak
    wrote on last edited by
    #1

    This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

    A guide to posting questions on CodeProject[^]
    Dave Kreskowiak

    R D N Richard Andrew x64R S 7 Replies Last reply
    0
    • D Dave Kreskowiak

      This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      I don't like hooks. Particularly the really small fiddly ones that end up getting stuck in your finger. Maybe that why I didn't do a lot of fishing as a youngster. :rolleyes:

      Dave Find Me On: Web|Facebook|Twitter|LinkedIn


      Latest Article: Data Historians! You Bought It, Use It! Real World Example

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

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

        First they create a PC that is not owned by the user anymore, now it is even not owned by the programmers... Can anybody write a descent OS?

        D L 2 Replies Last reply
        0
        • R Rozis

          First they create a PC that is not owned by the user anymore, now it is even not owned by the programmers... Can anybody write a descent OS?

          D Offline
          D Offline
          DaveAuld
          wrote on last edited by
          #4

          Rozis wrote:

          Can anybody write a descent OS?

          Have you just laid the bait for all the Apple and Linux fan-boys to coming shouting?

          Dave Find Me On: Web|Facebook|Twitter|LinkedIn


          Latest Article: Data Historians! You Bought It, Use It! Real World Example

          T 1 Reply Last reply
          0
          • D Dave Kreskowiak

            This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #5

            SetWindowsHookEx, I remember the days... Well, I can see the defensive side, by trashing every api call that *could* create perfomance issues.

            Software Kinetics - The home of good software

            1 Reply Last reply
            0
            • R Rozis

              First they create a PC that is not owned by the user anymore, now it is even not owned by the programmers... Can anybody write a descent OS?

              L Offline
              L Offline
              LloydA111
              wrote on last edited by
              #6

              You could write one :)


              See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef

              The unofficial awesome history of Code Project's Bob! "People demand freedom of speech to make up for the freedom of thought which they avoid."

              1 Reply Last reply
              0
              • D DaveAuld

                Rozis wrote:

                Can anybody write a descent OS?

                Have you just laid the bait for all the Apple and Linux fan-boys to coming shouting?

                Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                Latest Article: Data Historians! You Bought It, Use It! Real World Example

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

                DaveAuld wrote:

                Apple and Linux

                LOL! as if!

                "If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams

                D 1 Reply Last reply
                0
                • T TheGreatAndPowerfulOz

                  DaveAuld wrote:

                  Apple and Linux

                  LOL! as if!

                  "If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams

                  D Offline
                  D Offline
                  DaveAuld
                  wrote on last edited by
                  #8

                  ahmed zahmed wrote:

                  as if

                  I know that, but 'they' don't!

                  Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                  Latest Article: Data Historians! You Bought It, Use It! Real World Example

                  1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak

                    Richard Andrew x64R Online
                    Richard Andrew x64R Online
                    Richard Andrew x64
                    wrote on last edited by
                    #9

                    At least they do provide a workaround with that Raw Input thing.

                    The difficult we do right away... ...the impossible takes slightly longer.

                    1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak

                      S Offline
                      S Offline
                      Shog9 0
                      wrote on last edited by
                      #10

                      Good to know, thanks for posting this! And, about time... LL hooks can stall input processing. If your hook gets removed because it times out 10 times, that's 3 seconds of lag it introduced into the Windows UI. Not your program's UI, the entire desktop. That's unacceptable! You shouldn't be doing any serious processing in a hook routine; check a flag, post a message, and return - if this consistently chews up more than 300ms per call, something is very, very wrong. And you won't even get the blame for it. User notices all their apps are laggy, they blame Windows, not some program that doesn't even have input focus. Maybe eventually they figure it out, after re-installing Windows and finding that helps right up 'til they get around to running your software again... But probably not. I suspect they realized this was causing problems and rather than simply reducing the default timeout value (which might have caused problems for software that has a legitimate need to eat certain input events), they decided to just go after software that consistently hurt performance.

                      D 1 Reply Last reply
                      0
                      • D Dave Kreskowiak

                        This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak

                        P Offline
                        P Offline
                        peterchen
                        wrote on last edited by
                        #11

                        Arguably a reasonable change for Windows 7, but a high risk item to introduce in RTM! Anyway, bookmarket as "Why you shouldn't use hooks unless you really need to". I've seen to many people using hooks "because it's easy", when there was a less intrusive solution. [edit] Proof that it works: My customer got rid of the hooks and used Raw Input instead with success. I hope this helps you too.

                        FILETIME to time_t
                        | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                        1 Reply Last reply
                        0
                        • D Dave Kreskowiak

                          This little "feature"[^] was added to Windows 7, not before or during the Beta, but RIGHT WHEN IT WENT TO RTM!! Who the hell gets away with these decisions?! I love how Windows 7 will now VERY silently disconnect your global hooks for you. Talk about a royal PITA to diagnose!

                          A guide to posting questions on CodeProject[^]
                          Dave Kreskowiak

                          H Offline
                          H Offline
                          Henry Minute
                          wrote on last edited by
                          #12

                          Dave, it has just occurred to me that maybe this should be a Tip/Trick as I'm sure that it will catch somebody out sooner or later.

                          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus!

                          D 1 Reply Last reply
                          0
                          • D DaveAuld

                            I don't like hooks. Particularly the really small fiddly ones that end up getting stuck in your finger. Maybe that why I didn't do a lot of fishing as a youngster. :rolleyes:

                            Dave Find Me On: Web|Facebook|Twitter|LinkedIn


                            Latest Article: Data Historians! You Bought It, Use It! Real World Example

                            D Offline
                            D Offline
                            Dave Kreskowiak
                            wrote on last edited by
                            #13

                            Well, the point wasn't the hooks themselves, but MS's change to how the code behaves AFTER it's out of Beta and immediately before the code went Gold. Making a last minute change like that, especially one that changes the behavior of a well-known API, is scary at best.

                            A guide to posting questions on CodeProject[^]
                            Dave Kreskowiak

                            1 Reply Last reply
                            0
                            • S Shog9 0

                              Good to know, thanks for posting this! And, about time... LL hooks can stall input processing. If your hook gets removed because it times out 10 times, that's 3 seconds of lag it introduced into the Windows UI. Not your program's UI, the entire desktop. That's unacceptable! You shouldn't be doing any serious processing in a hook routine; check a flag, post a message, and return - if this consistently chews up more than 300ms per call, something is very, very wrong. And you won't even get the blame for it. User notices all their apps are laggy, they blame Windows, not some program that doesn't even have input focus. Maybe eventually they figure it out, after re-installing Windows and finding that helps right up 'til they get around to running your software again... But probably not. I suspect they realized this was causing problems and rather than simply reducing the default timeout value (which might have caused problems for software that has a legitimate need to eat certain input events), they decided to just go after software that consistently hurt performance.

                              D Offline
                              D Offline
                              Dave Kreskowiak
                              wrote on last edited by
                              #14

                              I agree it had to be changed. I have a problem with how they did it. Dropping that little fix in at the last second, just before the code went Gold is a mistake IMHO. What if they totally screwed the pooch and the timeout was "documented" at 300ms, but the code timedout at 30ms?? Not good. Plus, it gave nobody any time to test their code against the new behavior.

                              A guide to posting questions on CodeProject[^]
                              Dave Kreskowiak

                              1 Reply Last reply
                              0
                              • H Henry Minute

                                Dave, it has just occurred to me that maybe this should be a Tip/Trick as I'm sure that it will catch somebody out sooner or later.

                                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus!

                                D Offline
                                D Offline
                                Dave Kreskowiak
                                wrote on last edited by
                                #15

                                I think your right. I'll drop it in Tips/Tricks even though it's just a link. Thanks!

                                A guide to posting questions on CodeProject[^]
                                Dave Kreskowiak

                                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