Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetLongPathName
Message
De
11/02/2002 10:42:04
 
 
À
11/02/2002 10:32:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00618327
Message ID:
00618341
Vues:
33
>>>Actually, GetLongPathName works fine. Trouble is it does'nt exist prior to windows 98/2000. Anything I can use that is included in the earlier versions of windows (95,NT)?
>>>
>>
>>SHGetFileInfo(), with any OS implementing Shell v 4.0 or later, including Win95 and WinNT, although you'll have to upgrade the shell components on original Win95 retail installations. It's a good idea to do so IAC, since original Win95 is pretty badly flawed.
>
>Ed,
>Thanks for the tip. Trouble is there are several and varied customers out there and several probably do have the retail install of 95. I have been trying to make GetFullPathName work but can figure out how to lpass the last parameter (a pointer) and what it is expecting there, i.e. what it is supposed to point to. Not even sure if that API will work anyway.
>
>What do you think?

It's trivial:
DECLARE INTEGER GetFullPathName IN WIN32API ;
   STRING @ LPCTSRSHORTNAME, ;
   STRING @ LPTSRFULLNAME, ;
   INTEGER cbBuffer
cFullName = REPL(chr(0), 262)
nBufLen = 261
IF GetFullPathName('Short\path\name'+CHR(0),@cFullName,nBufLen) # 0
   cFullName = STRTRAN(cFullName,CHR(0),'')
ELSE
   && retrieve error using GetLastError()
ENDIF
It isn't supported by Win95.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform