title image


Smiley Re: A97: Section einer INI-Datei lesen


Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" _

(ByVal lpAppName As String, ByVal lpReturnedString As String, _

ByVal nSize As Long, ByVal lpFileName As String) As Long



Public Function fktProfileSection _

(IniFileName As String, SectionName As String) As String

Dim L As Long, Buf As String, Res As String



Buf = String(1024, 0)

Res = ""

L = GetPrivateProfileSection(SectionName, Buf, Len(Buf), IniFileName)

If L > 0 Then

Res = Left(Buf, L)

Res = Replace(Res, Chr(0), vbCrLf)

End If

fktProfileSection = Res

End Function





Zu "Replace" siehe hier.


Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: