Public 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
Public 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
Function SaveIni(PsName As String, PsSection As String, Pskey As String,
PsSetting As String)
WritePrivateProfileString PsSection, Pskey, PsSetting, PsName
End Function
Function GetIni(PsName As String, PsSection As String, Pskey As String,
PsDefault As String) As String
Dim s As String * 256, initext
initext = GetPrivateProfileString(PsSection, Pskey, PsDefault, s, Len(s),
PsName)
GetIni = Left$(s, initext)
End Function
that uses a lokal ini file like the old days,
greet John
"Maarten" <gu******@hotmail.com> schreef in bericht
news:3f***********************@reader1.news.skynet .be...
hallow
i'm trying to make a simpel INI file, but it won't work
i want to write a value (of a selected printerport selected by an option
box)
to an INI file.
can someone plz help me.
thanks Maarten