read a ini file

Login to reply to this topic.
Sat, 2005-08-06 08:10
Joined: 2005-08-06
Forum posts: 2
i read a few mails regarding this topic..

i need to know more about it.
i wanna read from a ini file and then that function should return a string back

how do i go about it?

Sat, 2005-08-06 08:14
Joined: 2004-01-09
Forum posts: 188
Re: read a ini file
ini file is just as same as a simple binary file. Reading ini file can be achieve same as we read any binary file.
You can have your own format of storing the data in the ini file.
say for example :

first 10 byte is for application version
second 10 byte is for IMEI no
third for bla bla bla...

and read it according to same format.

----
Chetan Kulshrestha

Sat, 2005-08-06 08:41
Joined: 2005-08-06
Forum posts: 2
Re: read a ini file
okies..

can i have a simple example to make it a lil more clear..
Mon, 2005-08-08 03:16
Joined: 2004-08-16
Forum posts: 98
Re: read a ini file
For example, you can define the ini format as follows:

BlankLine =newline
Comment=BlankLine|(”;”(~newline)*newline)
KeyString=~(“;”|”[”](~newline)*newline
Key=Comment*KeyString?newline
SectionName =”[”(~newline)*”]”newline
Section=SectionName(Key)*
IniFile=Key*Section*EOF
(Character set Σ=ASCII)

Then you can write the corresponding ini parser !!!
Mon, 2005-08-08 15:26
Joined: 2005-03-31
Forum posts: 173
Re: read a ini file
as far as my knowledge , u need to use DictionaryStore to read ini files


this is what Series60 sdk says:

A dictionary store contains a sequence of streams, each of which is accessed using a UID, rather than a simple stream ID. Dictionary stores are used by the application architecture to handle .ini files for applications.

The dictionary store base class is CDictionaryStore. Specialised stream types, RDictionaryReadStream and RDictionaryWriteStream, are provided for use with dictionary stores.


search by RDictionaryReadStream and RDictionaryWriteStream in sdk, u will get valueable articles

 

  • Login to reply to this topic.