Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INI Files
Message
From
11/08/2004 11:19:00
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
11/08/2004 11:10:53
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00932355
Message ID:
00932361
Views:
21
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/
Previous
Reply
Map
View

Click here to load this message in the networking platform