Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add a key to a ini file?
Message
 
À
12/11/2002 04:36:09
F Bilo
Bilo Office
Fuyang, Chine
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00721447
Message ID:
00721612
Vues:
8
>I am trying to create a class to access ini file,and get this problem: How to add a key to a section? i use this:
>
>init event:
>*******************************************************************
>Declare WritePrivateProfileSection IN kernel32 As WriPrivSect ;
> STRING lpAppName,;
> STRING lpString,;
> STRING lpFileName
>*******************************************************************
>
>addkey method:
>*******************************************************************
>LPARAMETERS cSection, ckeyname
>
>LOCAL nResult
>nResult = WriPrivSect(cSection, ckeyname ,"", this.inifile)
>Return nResult
>*******************************************************************
>
>Although it will work, but if i try to write a value for this key, always failed.The GetPrivateProfileString API always return this key's name!
>
>How can i do?

In addition to Ed's reply, you can use my IniFiles class from the download section.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform