Get an integer data from an INI file using GetPrivateProfileInt API
Get an integer data from an INI file using GetPrivateProfileInt API
Rate Get an integer data from an INI file using GetPrivateProfileInt API
(1(1 Vote))
' Read the "Accesscode" value under the "[Sample]" section
' of the INI file G:\myagent.ini
Dim mycode As Long ' receives the value returned from the INI file
mycode = GetPrivateProfileInt("Sample", "AccessCode", -1, "G:\myagent.ini")
' Display the result
If mycode = -1 Then ' failure
MsgBox "Could not read the information from the INI file."
Else
MsgBox "Access Code = " & mycode
End If
End
End Sub
'Note: Values read are not case sensitive
Get an integer data from an INI file using GetPrivateProfileInt API Comments
No comments yet — be the first to post one!
Post a Comment