vb中创建ini文件的问题

来源:百度知道 编辑:UC知道 时间:2024/06/27 03:23:29
谁能完整的教我一下vb的ini创建读写的方法 我是新手 在网上找了很多都用不了 希望各位高手指点一下啦
这两个答案在Visual Studio里都不适用 有很多错误语句 难道没人知道正解了么

'==================================================
'Ini操作声明
'==================================================
Dim Ret As Long
Dim Start As Long
Public FileName As String
Public MaxthonPath As String
Public TimeID As Integer
Const BufSize = 10240
Dim buf As String * BufSize
Private Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any,