Get a string data from an INI file using GetPrivateProfileString API
Get a string data from an INI file using GetPrivateProfileString API
Rate Get a string data from an INI file using GetPrivateProfileString API
(1(1 Vote))
' Read the "email" value under the [ReleaseSoft] section of
' the INI file G:\myagent.ini.
Dim mymail As String ' receives the value read from the INI file
Dim slength As Long ' receives length of the returned string
mymail = Space(255) ' provide enough room for the function to put the value into the buffer
' Read from the INI file
slength = GetPrivateProfileString("ReleaseSoft", "email", "-1", mymail, 255, "G:\myagent.ini")
mymail = Left(mymail, slength) ' extract the returned string from the buffer
If mymail <> "-1" Then
MsgBox "Mail ID is " & mymail
Else
MsgBox "Data not found"
End If
End
End Sub
Get a string data from an INI file using GetPrivateProfileString API Comments
No comments yet — be the first to post one!
Post a Comment