XINI.DLL  V1.0     10.January 2000

VDS extension written by Ralph Ludwig.

This extension allows deleting of keys and entire sections in an INI-File. 
Info-command to give back a list of all sectionnames or all keynames inside a section.


For this extension to work the script must start with a <External XINI> command.





Syntax:

delete:
<VDS-Variable> = @XINI(delete,Filename,sectionname[,keyname])

info:
<VDS-Variable> = @XINI(info,Filename[,sectionname][,separator])  



Description:

<VDS-Variable>  =  any variablename (ie. %X).

filename        =  the name of the inifile incl. the whole path.

sectionname     =  name of the section without the brackets [].

keyname         =  name of the key to delete.
                   note: the entire key will be deleted,
                   not only its contents.

Separator       =  separator-value only for the info-command.
                   this value is optional. If you leave it out, 
                   no separator is used.




Examples:

rem  include the extension
external XINI.DLL


- delete an entire section:

%X = @xini(delete,c:\test.ini,S2)

rem  %X now includes the message 'section "S2" deleted'
     no matter if the section exists or not 



- delete a key:

%X = @xini(delete,c:\test.ini,S1,c)

rem  %X now includes the message 'key "c" deleted'  or  'key "c" not found'



- get section-names:

%X = @XINI(info,c:\test.ini,,|)

rem  %X now includes the number of the sections and the sectionnames separated by the separator-value.
rem  with the sample-ini its: 2|S1|S2



- get key-names:

%X = @XINI(info,c:\test.ini,S2)

rem  %X now includes the number of the keys and the keynames separated by the separator-value.
rem  with the sample-ini its: 3efg  (no separator is used)




sample inifile:

TEST.INI:

[S1]
a=1
b=2
c=
d=4

[S2]
e=5
f=6
g=7





if you find bugs or have any suggestions please write to:  Ralph.Ludwig@lhsysnet.com





History:

V1.0:  10.1.2000:
 first version




