home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / various / sizing / profile.txt < prev    next >
Encoding:
Text File  |  1994-08-16  |  1.1 KB  |  26 lines

  1. This module will allow the reading/writing of an INI file. 
  2.  
  3. Below are the API calls needed to access the modules.
  4.  
  5.     msReturnValue = ProfileString("ININame", "Header", "Keyword", "Default")
  6.     mnReturnValue = ProfileInt("ININame", "Header", "Keyword", Default)
  7.     mnReturnValue = SetProfileString("ININame", "Header", "Keyword", "Value")
  8.  
  9. -    The Default paramter will be returned if the ININame, Header or Keyword are not found.
  10.  
  11. -    SetProfileString will create ININame, Header and Keyword, but the directory path must exist. It will return a 0 on failure.
  12.  
  13. -    The other two calls will return the specified value or Default.
  14.  
  15. -    The ProfileString will only handle a string of 512 bytes (I thought that might be sufficient).
  16.  
  17. -    Here is a quick way I found to get the INI string built, if the INI file is in the same area as the executable:
  18.         msProfilePath = App.Path & "\" & App.EXEName & ".ini"
  19.  
  20. -    The module will use both GetProfile and GetPrivateProfile API calls to take advantage of cached INI files.
  21.  
  22. If you have any questions, please let me know.
  23.  
  24. Chad 
  25.  
  26.