Default Blue Green Red
Pages: [1]
  Print  
Author Topic: CINIData  (Read 110 times)
BC_Programming
Administrator
Newbie
*

Total Thanks: 0
Posts: 15


View Profile Email
« on: January 11, 2010, 10:03:07 AM »

For quite some time now, I've been using a class I developed for accessing INI Files. The class is self-contained; I call it "CINIData".

The reasoning for creating a class for this, or more precisely, to redo the whole idea (there are API functions, ReadPrivateProfileString and WritePrivateProfileString, that can do the same thing; was because the APIs are deprecated, and they only work if the file size is < 64K.

The class is pretty simple; when you load an INI file, it populates it's data structures with the file contents; when you save, that structure is saved to disk. This was a faster alternative then constantly loading values from the file and constantly saving values to the file, since the structure essentially acts as a cache.

To demonstrate the class, I have created a simple INI file viewer, that views an INI File by section. Note that I did not compile this application. If you wish to have a compiled copy, let me know.


Logged
Pages: [1]
  Print  
 
Jump to: