Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

FileInsertLine & WriteProfString fail with files > 1024K


3 replies to this topic

tlukareski

tlukareski
  • Members
  • 4 posts

Posted 21 August 2001 - 19:54

Since the FileInsertLine & WriteProfString do not work properly with text files > 1024K, how can I add sections to this text files?  Can I used the binary manipulation functions with text files?

The file in question is a .ini file that is 68,000k in size.

Thanks-
Thomas


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 22 August 2001 - 12:55

Well, do you mean 68 kB (or 68000 Bytes) ???
The functions do work with file > 1024 Byte, but the lines have to be <= 1024 Bytes !!!

So there will be no problem editing a large ini file if the lines are not larger than a thousand letters (and spaces and ...).


tlukareski

tlukareski
  • Members
  • 4 posts

Posted 22 August 2001 - 16:16

Okay, here's a better explaniation of what is happening...

When I use the FileInsertLine, WriteProfString or ReplaceProfString with an unedited version of my .ini file, the functions fail.  There are lines in the .ini that are very long, but the lines I am replacing are well under 30 bytes long.  

When I remove the lines from the .ini file that are very long, the functions seem to work correctly.

So what I need to know is how do I write to these files if the lines exceed the limits?  


Perotin

Perotin
  • Full Members
  • 407 posts

Posted 23 August 2001 - 13:06

The documentation of IS6 says, GetProfString returns -2 if the line exceeds 2048 characters ...
WriteProfString and WriteLine in IS6 do not give information about max line length.

btw: posting the problem twice returns less than twice the number of answers ...