VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Write and read from an INI

by PulseWave (25 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 23rd February 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Write and read from an INI

API Declarations


'WritePrivateProfileString
'GetPrivateProfileString
'I cant get them because i am at school!
'C YA

Rate Write and read from an INI



Function ReadInI (strSectionHeader As String, strVariableName As String, strFileName As String) As String
    Dim strReturn As String
    strReturn = String(255, Chr(0))
    ReadINI = Left$(strReturn,
    GetPrivateProfileString(strSectionHeader, ByVal strVariableName, "",strReturn, Len(strReturn), strFileName))
End Function

Function WriteINI(strSectionHeader As String, strVariableName As
    WriteINI = WritePrivateProfileString(strSectionHeader,strVariableName, strValue, strFileName)
End Function

Download this snippet    Add to My Saved Code

Write and read from an INI Comments

No comments have been posted about Write and read from an INI. Why not be the first to post a comment about Write and read from an INI.

Post your comment

Subject:
Message:
0/1000 characters