<-- Previous || Up || Next -->

Write Private Profile String Function
Windows API Class

Public Function WritePrivateProfileString( _
      Optional ByVal vKeyName As Variant _
    , Optional ByVal vValue As Variant _
    , Optional ByVal vSectionName As Variant _
    , Optional ByVal vFileName As Variant _
    ) As Boolean

Writes a Key Name and Value pair into a Windows Private Profile (INI) file.

Example:
    Assuming
       Dim estWAPI As New WindowsAPI
       estWAPI.ProfileFileName = "Sample.Ini"
       estWAPI.ProfileSectionName = "Sample Section"
    for example
       estWAPI.WritePrivateProfileString("Convert From", "5 kilometers") = True
See also:
    GetPrivateProfileString Function
    GetPrivateProfileInt Function
    WriteProfileString Function
    ProfileFileName Property
    ProfileSectionName Property
    WritePrivateProfileString Function (Windows API)
    SaveSetting Function (Visual Basic 4.0+; not directly related)
    DeleteSetting Function (Visual Basic 4.0+; not directly related)
vKeyName: Name of the String setting whose value is to be written. Function returns Null if vKeyName is Null or cannot be fixed-up to a String.
vValue: The string Value that will be associated with the Name vKeyName. If vValue is Null, the Setting (Name and Value pair) with Name vKeyName will be removed. vValue defaults to Null if it is missing or Null or cannot be fixed-up to a string.
vSectionName: The Section Name into which the Setting will be written. vSectionName defaults to the current value of the ProfileSectionName Property if it is missing or Null or cannot be fixed-up to a String.
vFileName: The name of the Private Profile (INI) File into which the Setting will be written. vFileName defaults to the current value of the ProfileFileName Property if it is missing or Null or cannot be fixed-up to a String.
v1.3 Change: Removed 16-bit support from this function.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.