LerN

inireadsectionnames problem

5 posts in this topic

#1 ·  Posted

Hi, what's the problem in this source ? i have a similar source to it, the problem is the inireadsectionnames reads just 239 section while there's 2000 section in the txt file here's the source :

$writes = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
for $i = 1 to 2000
FileWrite("lk.txt","[" & $i & "  " & $writes & "]" & @CRLF & @CRLF)
Next

MsgBox(0,"",UBound(IniReadSectionNames("lk.txt")))

I wish if u could tell me another way to read the section name.

Share this post


Link to post
Share on other sites



#2 ·  Posted

In the IniReadSection, we can read this : Only the first 32767 chars are read for legacy reasons.

It seems that this remark applies to IniReadSectionNames too. I checked with a smaller string for $write (eg : 123456), it works.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

i also tried the (ex: of 123456) and it works the question here is why the number i wrote above didn't work ? bec the length ?

Share this post


Link to post
Share on other sites

#4 ·  Posted

Ini files have a 32kb limitation, when using large Ini files I use @SmOke_N awesome Ini+Ex udf (see link below) , this has always worked for me.  If you try it on your code you'll see it now displays all 2000 sections.

 

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  Posted

Well done @Subz ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now