Advertisement
6_2008-2009 Files/ File Controls/ Input/ Output #200180

EZ INI Module to read / write INI Files

Offers 6 ini functions that are extremely useful. Handy, because it has a "setup" function that specifies the filename and the number of characters you'ld like to retrieve (max) so that you don't have to re-specify them every time you write to your INI file (great if you only have one or two INI files per project). Someone else did a "complete INI module" that actually hard-code edited the ini file to find out the number of sections, and so on, but this one uses in-built features of GetPrivateProfileString. Have fun! Read_Ini -- Returns a string with the appropriate INI key in it Write_Ini -- Writes to a specific ini key Read_Sections -- Returns a Chr(0) delimited string containing all the [Sections] of the INI file Read_Keys -- Same as above, but returns all the keys=values under the appropriate section Delete_Key and Delete_Section do just what they say =) Note: vbCrLf's are turned into a funky string because I noticed when writing vbcrlf's to ini files it has the tendency to screw up and actually place them on separate lines so you can't retrieve the whole thing again. The funky string is recognized by this module when you read the values in again, and converts em back to vbCrLf

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine