home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual St-Petersburg
/
VirtualSaint-Petersburg.iso
/
vivat
/
tasks
/
calendar
/
profile.bas
< prev
next >
Wrap
BASIC Source File
|
1995-10-26
|
1KB
|
30 lines
Function ReadProfileString (ByVal szSection As String, ByVal szEntry As String, szProfile As String) As String
Dim szString As String, nBytesReceived As Integer
szString = Space$(500)
nBytesReceived = GetPrivateProfileString(szSection, szEntry, "", szString, Len(szString), szProfile)
ReadProfileString = Left$(szString, InStr(szString, Chr$(0)) - 1)
szString = ""
End Function
Function ReadProfileStringDef (ByVal szSection As String, ByVal szEntry As String, szProfile As String, szDefault As Variant) As String
Dim szString As String, nBytesReceived As Integer, szDefValue As String
szString = Space$(500)
If szDefault = Null Then
szDefValue = ""
Else
szDefValue = szDefault
End If
nBytesReceived = GetPrivateProfileString(szSection, szEntry, szDefValue, szString, Len(szString), szProfile)
ReadProfileStringDef = Left$(szString, InStr(szString, Chr$(0)) - 1)
End Function