Read INI
Opens a INI-file and Get the value of ex: "Screensaver=" without using any system calls!!!
Inputs
x = ReadINI("screensaver", "c:\windows\system.ini")
'or what ever
Returns
the value of the keyname
in this ex it would be perhaps: screensav.exe
API Declarations
NONE that is why i posted it!!!
Rate Read INI
(3(3 Vote))
Function ReadINI(keyname As String, filename As String) As String
Open filename For Input Access Read As 1
Do Until EOF(1)
Line Input #1, stemp
ipos = InStr(stemp, keyname & "=")
If ipos Then
strinnick = strinnick + stemp
ifound = True
Allofit$ = strinnick
wow$ = Mid(Allofit$, Len(keyname) + 2)
GetINI = wow$
Close 1
Exit Function
End If
Loop
Close 1
End Function
'Written by: Dan Einarsson
Read INI Comments
No comments yet — be the first to post one!
Post a Comment