Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. Never trust the windows api docs!

Never trust the windows api docs!

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
10 Posts 9 Posters 1 Views
  • 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.
  • cm0002@lemmy.worldC This user is from outside of this forum
    cm0002@lemmy.worldC This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1
    This post did not contain any content.
    perishthethought@lemm.eeP S N jumuta@sh.itjust.worksJ irelephant@programming.devI 6 Replies Last reply
    66
    • cm0002@lemmy.worldC [email protected]
      This post did not contain any content.
      perishthethought@lemm.eeP This user is from outside of this forum
      perishthethought@lemm.eeP This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      And the next thing you know...

      1 Reply Last reply
      1
      • cm0002@lemmy.worldC [email protected]
        This post did not contain any content.
        S This user is from outside of this forum
        S This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        Or any documentation. Or bug reports.

        1 Reply Last reply
        3
        • cm0002@lemmy.worldC [email protected]
          This post did not contain any content.
          N This user is from outside of this forum
          N This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          What does it do?

          T 1 Reply Last reply
          18
          • N [email protected]

            What does it do?

            T This user is from outside of this forum
            T This user is from outside of this forum
            [email protected]
            wrote on last edited by [email protected]
            #5

            Trying to disable the windows key hotkey that opens the start menu, so the game The Witness can pause stuff, minimize, open the start menu and release the block on the windows key (IE do a more controlled start menu hotkey, instead of having windows rudely interrupt everything and break the game).

            Started with a 5 second hang whenever a debug breakpoint was reached. The dev started digging into the issue.

            Games use RawInput to get better mouse interactions, but that breaks the Microsoft recommended way of disabling windows key (as all input goes through RawInput instead of whatever the other windows API is).
            In the documentation for RawInput, it specifically states the flag to disable the windows key doesn't work. So the Dev that was debugging the issue didn't try it. Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

            The linked article is quite a good read, actually.
            I had to use one of the mirrors in the SO answer

            Edit:
            The mirror I used https://caseymuratori.com/blog_0006

            D 1 Reply Last reply
            15
            • cm0002@lemmy.worldC [email protected]
              This post did not contain any content.
              jumuta@sh.itjust.worksJ This user is from outside of this forum
              jumuta@sh.itjust.worksJ This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              smh my head if the docs is untrustworthy just read the source

              1 Reply Last reply
              3
              • T [email protected]

                Trying to disable the windows key hotkey that opens the start menu, so the game The Witness can pause stuff, minimize, open the start menu and release the block on the windows key (IE do a more controlled start menu hotkey, instead of having windows rudely interrupt everything and break the game).

                Started with a 5 second hang whenever a debug breakpoint was reached. The dev started digging into the issue.

                Games use RawInput to get better mouse interactions, but that breaks the Microsoft recommended way of disabling windows key (as all input goes through RawInput instead of whatever the other windows API is).
                In the documentation for RawInput, it specifically states the flag to disable the windows key doesn't work. So the Dev that was debugging the issue didn't try it. Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

                The linked article is quite a good read, actually.
                I had to use one of the mirrors in the SO answer

                Edit:
                The mirror I used https://caseymuratori.com/blog_0006

                D This user is from outside of this forum
                D This user is from outside of this forum
                [email protected]
                wrote on last edited by [email protected]
                #7

                Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

                This now leaves us with an uncomfortable question: is the real bug in the docs, or the API implementation? If it's the latter, it's at risk of being patched out since the behavior doesn't match the docs.

                Edit: did a grammar.

                T 1 Reply Last reply
                4
                • D [email protected]

                  Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

                  This now leaves us with an uncomfortable question: is the real bug in the docs, or the API implementation? If it's the latter, it's at risk of being patched out since the behavior doesn't match the docs.

                  Edit: did a grammar.

                  T This user is from outside of this forum
                  T This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #8

                  That's the fun part about windows: who the fuck knows?
                  Can't look at the source, can't confirm if it's bad API implementation or bad documentation.

                  1 Reply Last reply
                  8
                  • cm0002@lemmy.worldC [email protected]
                    This post did not contain any content.
                    irelephant@programming.devI This user is from outside of this forum
                    irelephant@programming.devI This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #9

                    I'm convinced at this point that the docs only exist to confuse WINE devs.

                    1 Reply Last reply
                    1
                    • cm0002@lemmy.worldC [email protected]
                      This post did not contain any content.
                      kojichan@lemmy.worldK This user is from outside of this forum
                      kojichan@lemmy.worldK This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #10

                      Luckily, I love snooping through the source code and reverse engineering how functions and.code works and figure it out that way.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups