Results 1 to 3 of 3

Thread: VB6 - Ini Class

  1. #1

    Thread Starter
    Member Doomguy0505's Avatar
    Join Date
    Apr 2005
    Posts
    55

    Smile VB6 - Ini Class

    This class can store information from an ini into memory rather than the API calls where you constantly open and close the same file over and over. It also does not require to load from a file, eg. if you have the ini code in a database then you can simply retreive the data and process it with the InputINI function rather than having to save it into to process it. Since it uses a Dictionary object you can process every key and/or section if you need to. This is very useful for loading massive amounts, saving a lot of processing time. (eg. if you wanted to load 600 different keys in a file, the IniClass only needs to open it once)

    It requires Microsoft Scripting Runtime in your application
    Attached Files Attached Files
    Last edited by Doomguy0505; Oct 3rd, 2006 at 11:55 PM.

  2. #2
    New Member
    Join Date
    Sep 2011
    Posts
    1

    Cool Re: VB6 - Ini Class

    Great class but there is an error in the OutputINI method.

    Here is the fixed code:

    NewData = NewData & k2(j) & "=" & IniCollection(k1(i))(k2(j))

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,115

    Re: VB6 - Ini Class

    There is a good reason why the API calls Lock/Read/Write/Unlock on every access: concurrency.

    But when your application isn't worried about the INI file being accessed by multiple processes (or threads for that matter) this is a decent way to go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width