EZ - .ini
Access .ini files in the blink of an eye. Use one line of your input to quickly retrive .ini values. With the same one line of code write to your .ini file. If you have any improvements on this code, E-Mail me at "karatebob@hotmail.com".
AI
Riepilogo AI: 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.
Codice sorgente
Function mfncGetFromIni(strSectionHeader As String, strVariableName As String, strFileName As String) As String
'**********************************************************************************************
' DESCRIPTION:Reads from an *.INI file strFileName (full path & file name)
' RETURNS:The string stored in [strSectionHeader], line beginning
' strVariableName=
'**********************************************************************************************
' Initialise variable
Dim strReturn As String
' Blank the return string
strReturn = String(255, Chr(0))
'Get requested information, trimming the returned
' string
mfncGetFromIni = Left$(strReturn, GetPrivateProfileString(strSectionHeader, ByVal strVariableName, "", strReturn, Len(strReturn), strFileName))
End Function
Function mfncWriteIni(strSectionHeader As String, strVariableName As String, strValue As String, strFileName As String) As Integer
'*****************************************************************************************************
' DESCRIPTION:Writes to an *.INI file called strFileName (full path & file name)
' RETURNS:Integer indicating failure (0) or success (other) to write
'*****************************************************************************************************
mfncWriteIni = WritePrivateProfileString(strSectionHeader, strVariableName, strValue, strFileName)
End Function
Commenti originali (3)
Recuperato da Wayback Machine