VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



EZ INI Module to read / write INI Files

by Shroom (4 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

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

Rate EZ INI Module to read / write INI Files

Download EZ INI Module to read / write INI Files

Download EZ INI Module to read / write INI Files (1 KB)

EZ INI Module to read / write INI Files Comments

No comments have been posted about EZ INI Module to read / write INI Files. Why not be the first to post a comment about EZ INI Module to read / write INI Files.

Post your comment

Subject:
Message:
0/1000 characters