Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing values to a text file
Message
From
13/01/2005 12:11:06
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00976803
Message ID:
00976827
Views:
9
Neil

So .. the reverse is READINI.PRG
PARAMETERS cSection, cEntry, cINIFile
LOCAL cDefault, cRetVal, nRetLen
cDefault = ""
cRetVal = space(255)
nRetLen = LEN(cRetVal)
DECLARE integer GetPrivateProfileString IN WIN32API ;
                STRING cSection, ;
                String cEntry, ;
                STRING cDefault, ;
                STRING @cRetVal, ;
                INTEGER nRetLen, ;
                STRING cINIFile 
nRetLen = GetPrivateProfileString(cSection,;
                                  cEntry, ;
                                  cDefault, ;
                                  @cRetVal, ;
                                  nRetLen, ;
                                  cINIFile)
return left(cRetVal,nRetLen)
and:
lcDatabaseFolder	= ALLTRIM( READINI( "your_square_bracketed_section", "Entry_in_section", lcIniFile))
Your servant, Sir.

>Terry,
>
>Just has a brainwave for my application, head is sore!!!
>
>My form when initialised has a combo with a list of all users from a table. When they click the button it opens up the application and writes the username in the combo to the ini file. Works great!!!
>
>That ini file is stored in the user home drive of the domain user that has logged on. therefore is it possible when they open the original form that it can write the contents of the username.ini file to be the default username?
>
>Basically reverse the process?
>
>Thanks
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform