Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INI Files
Message
De
11/08/2004 11:19:00
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
11/08/2004 11:10:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Divers
Thread ID:
00932355
Message ID:
00932361
Vues:
23
Here is my program that does it:
*************************************************************************
* Function GetIni
* 
* This function returns the value of variable in an INI file
* Parm 1: INI file name
* Parm 2: Section name
* Parm 3: Variable name
*************************************************************************
Function GetIni
LPARAMETERS tcIniFile, tcSection, tcVarName
LOCAL lcReturn, lcStr, lnLength

lcStr = space(256)

DECLARE INTEGER GetPrivateProfileString IN WIN32API STRING lpAppName, STRING lpKeyName, STRING lpDefault, STRING @ lpReturnedString, INTEGER nSize, STRING lpFileName

lnLength = GetPrivateProfileString(TRIM(tcSection), TRIM(tcVarName), "", @ lcStr, LEN(lcStr), TRIM(tcIniFile))

lcReturn = LEFT(lcStr, lnLength)

RETURN lcReturn
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform