Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Foundation Class: INI Access
Message
From
28/06/1999 14:37:21
 
 
To
28/06/1999 14:17:47
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00234883
Message ID:
00234892
Views:
27
>I am trying to use the INI Access foundation class to retrieve information from the INI file. The code below:
>PUBLIC g_cLocalPath
>PUBLIC g_cServerPath
>g_cLocalPath = ""
>g_cServerPath = ""
>
>* Using the non visual class oldinireg from the registry class for INI Access in the project
>oIniFile = NewObject('oldinireg' , 'registry')
>IF VARTYPE(oIniFile) = "O"
>WITH oIniFile
>.GetINIEntry(g_cLocalPath,"Preferences","Local","Cats98.ini")
>.GetINIEntry(g_cServerPath,"Preferences","Server","Cats98.ini")
>

You have to pass the variable you want updated by reference; rather than using a PUBLIC variable, try:

.GetINIEntry(@variablename,section name,value name,INI file)

>ENDWITH
>ENDIF
>
>In the debugging of the procedure getinientry:
>
>m.c_value = "c:\Projects\cats98\data"
>
>However when I call on the variable somewhere else I get an empty character string!
>
>Thanks
>
>Sanjay
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform