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. General Programming
  3. C / C++ / MFC
  4. STRRET Structure Question

STRRET Structure Question

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 3 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.
  • N Offline
    N Offline
    nm_114
    wrote on last edited by
    #1

    When uType is STRRET_OFFSET, MSDN doesn't say whether the string uOffset is pointing to is an ANSI or Unicode string. Is it always ANSI or always Unicode? Is it ANSI on Win9x systems and Unicode on WinNT systems? Thanks.

    M _ 2 Replies Last reply
    0
    • N nm_114

      When uType is STRRET_OFFSET, MSDN doesn't say whether the string uOffset is pointing to is an ANSI or Unicode string. Is it always ANSI or always Unicode? Is it ANSI on Win9x systems and Unicode on WinNT systems? Thanks.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      You shouldn't have to worry about that. Use one of the StrRetTo* functions in shlwapi.

      --Mike--

      1 Reply Last reply
      0
      • N nm_114

        When uType is STRRET_OFFSET, MSDN doesn't say whether the string uOffset is pointing to is an ANSI or Unicode string. Is it always ANSI or always Unicode? Is it ANSI on Win9x systems and Unicode on WinNT systems? Thanks.

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        uOffset is declared as UINT (unsigned int). So it is not a string. The only string in the union is pOleStr and it is declared as LPWSTR (pointer to unicode string). ANSI or UNICODE is not dependent on the OS. It depends on whether the macro UNICODE or _UNICODE is declared or not. For example, LPTSTR (TCHAR*) becomes LPSTR (CHAR*) if UNICODE is not declared and LPWSTR (WCHAR*) if UNICODE is declared.

        «_Superman_» I love work. It gives me something to do between weekends.

        N 1 Reply Last reply
        0
        • _ _Superman_

          uOffset is declared as UINT (unsigned int). So it is not a string. The only string in the union is pOleStr and it is declared as LPWSTR (pointer to unicode string). ANSI or UNICODE is not dependent on the OS. It depends on whether the macro UNICODE or _UNICODE is declared or not. For example, LPTSTR (TCHAR*) becomes LPSTR (CHAR*) if UNICODE is not declared and LPWSTR (WCHAR*) if UNICODE is declared.

          «_Superman_» I love work. It gives me something to do between weekends.

          N Offline
          N Offline
          nm_114
          wrote on last edited by
          #4

          «_Superman_» wrote:

          uOffset is declared as UINT (unsigned int). So it is not a string.

          uOffset is an offset to a string. I was wondering whether the string it's "pointing" to was ANSI or Unicode.

          «_Superman_» wrote:

          ANSI or UNICODE is not dependent on the OS. It depends on whether the macro UNICODE or _UNICODE is declared or not. For example, LPTSTR (TCHAR*) becomes LPSTR (CHAR*) if UNICODE is not declared and LPWSTR (WCHAR*) if UNICODE is declared.

          I know about the TCHAR stuff. The reason I mentioned the OS was because I was thinking since Win9x used ANSI internally (mostly, I think) and WinNT used Unicode (but supported programs compiled for ANSI for compatibilty), the string inside the PIDL where uOffset is "pointing" would be that type.

          _ 1 Reply Last reply
          0
          • N nm_114

            «_Superman_» wrote:

            uOffset is declared as UINT (unsigned int). So it is not a string.

            uOffset is an offset to a string. I was wondering whether the string it's "pointing" to was ANSI or Unicode.

            «_Superman_» wrote:

            ANSI or UNICODE is not dependent on the OS. It depends on whether the macro UNICODE or _UNICODE is declared or not. For example, LPTSTR (TCHAR*) becomes LPSTR (CHAR*) if UNICODE is not declared and LPWSTR (WCHAR*) if UNICODE is declared.

            I know about the TCHAR stuff. The reason I mentioned the OS was because I was thinking since Win9x used ANSI internally (mostly, I think) and WinNT used Unicode (but supported programs compiled for ANSI for compatibilty), the string inside the PIDL where uOffset is "pointing" would be that type.

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #5

            In that case, the string is a unicode string.

            «_Superman_» I love work. It gives me something to do between weekends.

            N 1 Reply Last reply
            0
            • _ _Superman_

              In that case, the string is a unicode string.

              «_Superman_» I love work. It gives me something to do between weekends.

              N Offline
              N Offline
              nm_114
              wrote on last edited by
              #6

              «_Superman_» wrote:

              In that case, the string is a unicode string.

              Um, if you don't mind me asking, how do you *know*. I was just guessing on how it (the PIDL) works internally.

              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