Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Call Windows Explorer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00185851
Message ID:
00185867
Vues:
17
>Heres a simple example to fit your needs. Do this in a test:-
>
>DECLARE INTEGER GetWindowsDirectory IN Win32API; && Strict function name
>STRING lcBuffer; && to store the directory name
>INTEGER lnBufSize && to tell function max length
>
>STORE SPACE(100) TO lcBuffer
>GetWindowsDirectory(@lcBuffer,LEN(lcBuffer)
>
>lcBuffer will then contain the windows directory (with null terminator) look for null within the string (LEFT(lcBuffer,AT(CHR(0),lcBuffer)) to get directory.
>

*** You may need to change above to lnResult=GetWindowsDirectory(... then lnResult will contain length of data in lcBuffer (including terminator). It may be easier to then say lcWinDir=LEFT(lcBuffer,lnResult-1) after checking lnResult for non-positive values first (0 or negative=error).
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform