
Accessing INI files in VB5 ?
Hello,
Get/WritePrivateProfileString() works fine under VB 5.0 for me. Here are
the declares right out of the API Viewer application:
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
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
I hope this helps,
--
Larry R. Tubbs Jr., MCPS, MCSD
Silverleaf Resorts Inc, NYSE: SVR
Quote:
>Hello,
>I hope you can help me with the following problem:
>I am working with Visual Basic 5.0 Professional Edition. The question is
>how I can access INI files from within my Visual Basic programs (read and
>write values) ???
>In earlier versions, you could use the GetPrivateProfileString and other
>functions from the Kernel, but this doesn't seem to work anymore with VB5
>(and kernel32).
>I think this is an easy one for you, but I am really desperate, so I would
>be very thankful if you can help me...
>A fellow-programmer from Belgium,
>Frederic Norro