VB6.0实现读写配置文件(*.ini文件)
'声明:
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA
Declare Function WritePrivateProfileStrin 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
'读写例子:
Sub RWConfigFile()
End Sub
config.ini配置文件格式:
特别提示:
说明:上面的文章虽然是转载来的,不过我测试后读写字符串没问题但读整数部分不正确,希望能对才学VB6.0的朋友们有所帮助 |
|