Attribute vb_name = "module1"
Option explicit
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
Public Function readini (byval section as string, byval key as string) as string
dim X as long, buff as string * 128, I as integer
X = getprivateprofilestring (section, key, "", buff, 128, app. path + "tmplayer. ini ")
I = instr (buff, CHR (0)
readini = trim (left (buff, I-1 ))
end function
Public Function writeini (byval section as string, byval key as string) as string
dim X as long, buff as string * 128, I as integer
X = writeprivateprofilestring (section, key, "", buff, 128, app. path + "tmplayer. ini ")
I = instr (buff, CHR (0)
writeini = trim (left (buff, I-1 ))
end function