Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Declare PtrSafe Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA"
- (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
- Private Declare PtrSafe Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA"
- (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
- Private Sub Write_Click()
- WritePrivateProfileString "Parameters", "Autolaunch", "1", "D:Test.ini"
- End Sub
- Private Sub Read_Click()
- Dim buffer As String, IniData As String
- buffer = String(255, Chr(0))
- MsgBox Left(buffer, GetPrivateProfileString("Parameters", "Autolaunch", "1",
- buffer, Len(buffer), "D:Test.ini"))
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement