# Re: about .INI file

Posted by Albert on July 24, 1998 at 13:47:40:

In Reply to: about .INI file posted by hujian on July 24, 1998 at 10:50:58:

Public Function GetIniString(ByVal Sec As String, ByVal Key As String) As String
Const MaxLen = 254
Dim lpReturnedString As String * MaxLen
Dim bytesBack As Long

bytesBack = GetPrivateProfileString(Sec, Key, "", _
lpReturnedString, MaxLen, "C:\TEST.ini")
GetIniString = IIf(bytesBack > 0, Left$(lpReturnedString, bytesBack), "")
End Function

Follow Ups: