Advertisement
6_2008-2009 Files/ File Controls/ Input/ Output #198725

How To Write To a INI File

This VERY Simple 5 Line Code Writes To a INI File! Enjoy!

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Public Sub iniWrite(sFileName As String, sKey As String, sSection As String, ByVal sValue As String)
Dim iW As String
iW = WritePrivateProfileString(sSection, sKey, sValue, sFileName)
End Sub
Private Sub Command1_Click()
iniWrite "C:\Windows\Desktop\File.ini", "Neat", "Pretty", "Huh?"
End Sub
'Have Fun!
Original Comments (3)
Recovered from Wayback Machine