tngo un bas para leer INI's y asi cargar cierta configuracion
weno tngo una lista d juegos asi en el INI
Código:
[1]
nombre=juego1
autor=pepe
estado=ktimporta
[2]
nombre=juego2
autor=pepe2
estado=ktimporta2
y asi sucesivamente
lo k quiero es mostrar todo eso en un ListView cada categoria en una columna, para ello pense usar un bucle pero me da el siguiente error
"El tipo de agurmento ByRef no coincide"
el código del bas es este
Código:
Option Explicit
Private Declare 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 Function WritePrivateProfileString Lib "Kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public Function LeerIni(lpFileName As String, lpAppName As String, lpKeyName As String, Optional vDefault) As String
Dim lpString As String
Dim LTmp As Long
Dim sRetVal As String
If IsMissing(vDefault) Then
lpString = ""
Else
lpString = vDefault
End If
sRetVal = String$(255, 0)
LTmp = GetPrivateProfileString(lpAppName, lpKeyName, lpString, sRetVal, Len(sRetVal), lpFileName)
If LTmp = 0 Then
LeerIni = lpString
Else
LeerIni = Left(sRetVal, LTmp)
End If
End Function
Sub GuardarIni(lpFileName As String, lpAppName As String, lpKeyName As String, lpString As String)
Dim LTmp As Long
LTmp = WritePrivateProfileString(lpAppName, lpKeyName, lpString, lpFileName)
End Sub
tambien he usado un timer pero me da otro error
saludos