Read/Write Easy INI Example
Read/Write Easy INI Example
API Declarations
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Rate Read/Write Easy INI Example
(1(1 Vote))
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'read ini '
'x = readini("Example INI", "Example", "C:\Example.ini")'
'MsgBox X '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim strbuffer As String
Let strbuffer$ = String$(750, Chr$(0&))
Let readini$ = Left$(strbuffer$, GetPrivateProfileString(strsection$, ByVal LCase$(strkey$), "", strbuffer, Len(strbuffer), strfullpath$))
End Function
Public Sub WriteINI(strsection As String, strkey As String, strkeyvalue As String, strfullpath As String)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'write ini '
'Call writeini("Example INI", "Example", "Yes", "C:\Example.ini")'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Call WritePrivateProfileString(strsection$, UCase$(strkey$), strkeyvalue$, strfullpath$)
End Sub
Read/Write Easy INI Example Comments
No comments yet — be the first to post one!
Post a Comment