VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated)

Nick Campbeln  (7 Submissions)   VB function enhancement   Visual Basic 5.0   Beginner   Wed 3rd February 2021

This code module gives you the ability to convert between short (DOS style 8.3) and long paths under ANY Win32 system. If you've ever had to do path conversions with the API you know that Win95/NT4 does not support the GetLongPathName() API which allows for short to long path name conversions. Those of you who have looked for a solution may have found David Goben’s wonderful (though poorly commented) GetLongPath() function on SearchVB.com, but it relies on the FileSystemObject (which did me no good). So I built this module which utilizes both conversion APIs (GetShortPathName() and GetLongPathName()) on the systems that support them (Win98+). For systems that do not support GetLongPathName() (Win95/NT4) the GetShortPathName() API is used along with Dir() to determine the long path name from the passed short path name. The code is very well commented but is not thoroughly tested; so if you find a bug, please let me know!. Thanks and enjoy!

Rate Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated) (10(10 Vote))

Download Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated)

Long <-> Short Path Conversion via API Win95 and NT4 Friendly (Updated) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters