Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetLongPathName
Message
De
11/02/2002 12:07:33
 
 
À
11/02/2002 11:11:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00618327
Message ID:
00618421
Vues:
36
>>>>>Anything I can use that is included in the earlier versions of windows (95,NT)?
>>>>>
>>>>
>>>Ed,
>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.
>
>
>Ed,
>Not sure we are talking about the same API. Here is the one I am talking about, and the MSDN does say it applies to Win95 and NT3.1:
>
>DWORD GetFullPathName(
> LPCTSTR lpFileName, // file name
> DWORD nBufferLength, // size of path buffer
> LPTSTR lpBuffer, // path buffer
> LPTSTR *lpFilePart // address of file name in path
>);
>
>lpFilePart is defined as thus.
>
>lpFilePart
>[out] Pointer to a buffer that receives the address (in lpBuffer) of the final file name component in the path.
>
>
>So I need to pass something from VFP that will hold an address?

I cut the wrong code from one of my function libraries; I posted the correction as a follow-up.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform