• pivot_root@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      ·
      13 days ago

      Identifying the windows string types is fun. The letters are supposed to have a meaning. Without looking them up, my guess is:

      LP_ - Length Prepended
      C_STR - C string / null-terminated
      WSTR - “Wide” string / utf-16
      TSTR - I have no idea

      • toddestan@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        13 days ago

        LP is actually “Long Pointer”, which means 32 bits. Why is that called a long pointer? Because that’s what a long pointer was on win16. Same reason a DWORD (double word) is also 32 bits, because a word was 16 bits.

        I haven’t really done much with coding 64 bit Windows applications so I don’t if it’s the same, but Windows 16 bit roots was very obvious in win32.

        • wizardbeard@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          3
          ·
          13 days ago

          I haven’t done much programming that makes use of the win32 types, but just from tech support and sysadmin type stuff I can confirm that DWORDs are still 32 bits. See them a lot in the Registry.

          Given Window’s (sometimes questionable) attempts to maintain backwards compatibility, and the fact that a lot of the OS functionality and sysadmin tools are, at best, kludge built up in layers over decades on top of the old tools, I would strongly suspect that the win32 types are still the exact same size-wise despite the now 64-bit underlying architecture.

        • pivot_root@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          13 days ago

          Thanks for correcting me. Considering a long is also 32 bits, a “Long Pointer” being 32 bits makes sense.

      • optional@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 days ago

        I have no idea what the “T” stands for, but TSTR refers to either a Wide or ANSI string depending on whether the UNICODE symbol is defined