Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get the windows system Directory in Win 2K
Message
De
08/04/2002 15:10:23
 
 
À
08/04/2002 14:50:42
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00642313
Message ID:
00642322
Vues:
12
Peter,
Try the following:
DECLARE Integer GetSystemDirectory IN Win32API;
                String @cWinDir, Integer iSize

LOCAL lcSysDir, lnSize

lnSize   = 100
lcSysDir = SPACE(lnSize)

lnRetVal = GetSystemDirectory(@lcSysDir, lnSize)

IF lnRetVal > 0
	RETURN LEFT(lcSysDir, lnRetVal)
ELSE
	RETURN ""
ENDIF
HTH
>How can I get the windows system Directory in Win2000
>I used the function below, but in Win2000 it returns an empty string
>Is there a workaround for this ?
>Does the same happens in Windows XP ?
>Using VFP 7.0 + SP1 and Win 2K + SP2
>TIA
>
>Peter
>
>function sysdir
>
>local x
>local retlen
>local winsysdir
>
>* This gets the windows system directory
>string= replicate(chr(0), 144)
>x = RegFn("GetSystemDirectory", "@CI", "I")
>retlen = CallFn(x, @string, 144)
>winsysdir=LEFT(string, retlen)
>Return(winsysdir)
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform