Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading from ini file
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01112566
Message ID:
01112828
Vues:
11
Bharat

If I have read your message correctly you could try this. Create an INI File on each workstation in your installation loadpoint and within this file create a section called PATHS. Under here you could set all your paths. For example:

Myapp.INI
[PATHS]
myhomepath=C:\neil\
mydatapath=U:\neildbf\
Then put this code in a procedure / program in your application
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)
Then just call it when the user starts the application:
lcpath = ALLTRIM(READINI( "PATHS", "myhomepath", "C:\myapp\myapp.INI"))
set path to &lcpath
Hope this helps.
Neil Lewis
IT R&D Manager
Velmore Ltd
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform