[Windows] GetLongPathName API

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

[Windows] GetLongPathName API

Post by Little John »

Please include a wrapper for the Windows GetLongPathName API function.

Regards, Little John
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [Windows] GetLongPathName API

Post by ts-soft »

Little John wrote:Please include a wrapper for the Windows GetLongPathName API function.

Regards, Little John
This API is not available on Win95 and NT4, i think this will never come :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [Windows] GetLongPathName API

Post by IdeasVacuum »

....It would be very good to have since the world is going 64bit very rapidly thanks to Win7.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [Windows] GetLongPathName API

Post by nco2k »

i second the request. :)

it would be weird to not add a function, only because a 16 years old os doesnt support it. :?

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [Windows] GetLongPathName API

Post by ts-soft »

What should the Function do on linux and MacOS :mrgreen:
I would say, simple use the API if required.
And after over 16 years long names, there should no more many short names in this world :mrgreen:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [Windows] GetLongPathName API

Post by nco2k »

what? Oo

im talking about a simple GetLongPathName_() wrapper, without the need for OpenLibrary, Import etc. :wink:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [Windows] GetLongPathName API

Post by ts-soft »

nco2k wrote:what? Oo

im talking about a simple GetLongPathName_() wrapper, without the need for OpenLibrary, Import etc. :wink:

c ya,
nco2k
If you use this function and your program start on older OS, it will crash on static binding. Better use dynamic Bindung vor this functions, to solve this crash. Only OpenLibrary is good in this case, Import is the same problem.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Little John
Addict
Addict
Posts: 4779
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: [Windows] GetLongPathName API

Post by Little John »

ts-soft wrote:What should the Function do on linux and MacOS :mrgreen:
Plese read at least the title of this thread ...
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [Windows] GetLongPathName API

Post by nco2k »

@ts-soft
i know, but thats something the programmer should be aware of, before using such a function. besides GlobalMemoryStatusEx_() wont work on win9x aswell, but its available in pb. its good to have the choice and no one forces you to use it. if you need win9x support you simply use OpenLibrary() instead. :)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [Windows] GetLongPathName API

Post by ts-soft »

Many NTFS System creates no more shortpath names. This make the saving and so on faster.
But if you really require this IMHO useless function :mrgreen:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [Windows] GetLongPathName API

Post by nco2k »

well, you never know and one extra line of code doesnt hurt. :D

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply