Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System directory
Message
De
16/04/1999 18:52:57
 
 
À
16/04/1999 17:30:41
Jorge Haro
Independent Consultant
Juarez, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00209220
Message ID:
00209257
Vues:
17
>Is there a function that returns the name of the windows system folder?, I could just go ahead and put "windows\system" as a constant but of course it's not always the case, thanks in advance

I posted code earlier today that demonstrates how to use the GetSystemDirectory() API call; try:
DECLARE INTEGER GetSystemDirectory IN Win32API ;
	STRING  @cLocation, ;
	INTEGER nSize
LOCAL cLocation, nSize

cLocation = SPACE(256)
nSize = GetSystemDirectory(@cLocation, 256)

IF nSize > 0
   *
   * Got it - it's the size of the return
   *
   cLocation = LEFT(cLocation,nSize)
ELSE
   *
   *  An error occurred when retrieving the value - return the null string
   *
   cLocation = ''
ENDIF
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