• Test_Tickles@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    3 hours ago

    Microsoft’s version function didn’t return what you think it returned. They would deliver massive changes to OS functionality and call it “second edition” or just some service pack number. The version function gave you the same value for all of it. Literally, the only way to know what version you were working with was to parse the name. Microsoft’s own documentation on new functionality told you that was the way to do it. MS even gave you example code to copy and paste.
    It wasn’t until much later, well after the dumpster fire they had created was blazing away, that they took the time to revise the way any of it worked.

    • AnyOldName3@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 hours ago

      If you’re checking for Windows 9 in order to disable features, which is what the jump straight to ten was supposed to protect against (when running a 16-bit binary for 3.1/95 on 32-bit Windows 10, it lies and says it’s Windows 98), then you’re using at least the Windows 2000 SDK, which provided GetVersion, which includes the build and revision numbers in its return value, and the revision number was increased over 7000 times by updates to Windows 2000.