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. GetShortPathName

GetShortPathName

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminjson
4 Posts 2 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.
  • T Offline
    T Offline
    tom groezer
    wrote on last edited by
    #1

    I have an application which uses the win API GetShortPathName to get the short path(8.3) from a long path. The string is terminated with a '\'. Yet the path returned is not a short path. Is there any association with the registry key NtfsDisable8dot3 or does anyone have any idea as to what could be the reason of its not working. The platform is windows 2003.

    S 1 Reply Last reply
    0
    • T tom groezer

      I have an application which uses the win API GetShortPathName to get the short path(8.3) from a long path. The string is terminated with a '\'. Yet the path returned is not a short path. Is there any association with the registry key NtfsDisable8dot3 or does anyone have any idea as to what could be the reason of its not working. The platform is windows 2003.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      tom groezer wrote:

      Is there any association with the registry key NtfsDisable8dot3

      Yes - the first Google hit for 'NtfsDisable8dot3'[^] could have told you that.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      T 1 Reply Last reply
      0
      • S Stuart Dootson

        tom groezer wrote:

        Is there any association with the registry key NtfsDisable8dot3

        Yes - the first Google hit for 'NtfsDisable8dot3'[^] could have told you that.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        T Offline
        T Offline
        tom groezer
        wrote on last edited by
        #3

        Is there any other reason for such behavior

        S 1 Reply Last reply
        0
        • T tom groezer

          Is there any other reason for such behavior

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          For starters:

          1. The filesystem on which the file resides does not support short filenames (so, NTFS with the registry key we talked about, HFS+, extfs via a network connection)
          2. The file doesn't exist - it has to for GetShortPathName to work

          Did you check the extended error information (with GetLastError) to see what error was signalled?

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          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