Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Key or Section in Ini-File
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00947097
Message ID:
00947101
Vues:
16
>Hi there,
>
>exists a function in the Win-Api to delete a key or a section in an ini-file?
>
>Thanks in advance
>
>Thomas

Thomas, If You place NULL in third parameter of the WritePrivateProfileString with NULL it will delete the key of that section, If You place NULL for second parameter it will delete entire section, i.e.:
   DECLARE INTEGER WritePrivateProfileString IN Win32API AS WritePrivStr ;
                                                            String cSection, String cKey, String cValue,;
                                                            String cINIFile
   WritePrivStr("TestSection","SomeKey",NULL,"c:\myIniFile.INI") && This will delete SomeKey key from INI file

   WritePrivStr("TestSection",NULL,NULL,"c:\myIniFile.INI") && It will delete Entire testSection
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform