Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetLongPathName
Message
De
11/02/2002 11:11:17
 
 
À
11/02/2002 10:42:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00618327
Message ID:
00618371
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform