Hi all,
I'm using the "sgetini" function for years. It's a well-known function that reads INI files very well:
It works very well with strings up to 256 characters.
Now I have a situation in which I have more than 256 chars. I try to change the numbers in the function accordingly, but nothing helps.
Do you know for a solution?
Do you have any alternate functions that works well?
Thanks in advance
I'm using the "sgetini" function for years. It's a well-known function that reads INI files very well:
Code:
Public Function sGetINI(sINIFile As String, sSection As String, sKey _
As String, sDefault As String) As String
Dim sTemp As String * 256
Dim nLength As Integer
sTemp = Space$(256)
nLength = GetPrivateProfileString(sSection, sKey, sDefault, sTemp, _
255, sINIFile)
sGetINI = Left$(sTemp, nLength)
End Function
It works very well with strings up to 256 characters.
Now I have a situation in which I have more than 256 chars. I try to change the numbers in the function accordingly, but nothing helps.
Do you know for a solution?
Do you have any alternate functions that works well?
Thanks in advance