Index based read/write in VB

Visual Basic Topics
Post Reply
User avatar
malinda
Posts: 2
Joined: Tue Jul 21, 2009 11:13 pm

Index based read/write in VB

Post by malinda » Tue Jul 21, 2009 11:29 pm

Hi

I need to read/write a file which I can access with idexes.
Using a database isn't required as it would be just a few settings.
Could you suggest me a method for this?

Thanks in advance,

Malinda
User avatar
eranda
Posts: 1
Joined: Tue Jul 21, 2009 11:08 pm

Re: Index based read/write in VB

Post by eranda » Mon Aug 03, 2009 11:09 am

Use following API to read/write settings to and from INI files

Code: Select all

Private Declare Function GetPrivateProfileString Lib "kernel32.dll" 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.dll" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Post Reply

Return to “Visual Basic Programming”