GetPrivateProfileSection
Verfasst: 23.06.2005 23:29
Hi All,
ich habe ein kleines problem ...
über diesen API aufruf ist es möglich die "sektion" einer ini-datei auszulesen... und in einen string zu übergeben!
The format of the returned keys and values is one or more null-terminated strings, followed by a final null character
z.b.
mein problem ist das buffer nicht alle zeile beinhaltet ...
value1=1 test=4 value2=2 value3=3
sondern nur die erste
value=1
meine frage ist natürlich ....
was mache ich falsch?
Grüsse
JPD
anbei die infos über diesen api aufruf im MSDN:
DWORD GetProfileSection(
LPCTSTR lpAppName, // address of section name
LPTSTR lpReturnedString, // address of return buffer
DWORD nSize // size of return buffer
);
Parameters
lpAppName
Pointer to a null-terminated string containing the section name in the WIN.INI file.
lpReturnedString
Pointer to a buffer that receives the keys and values associated with the named section. The buffer is filled with one or more null-terminated strings; the last string is followed by a second null character.
nSize
Specifies the size, in characters, of the buffer pointed to by the lpReturnedString parameter.
ich habe ein kleines problem ...
über diesen API aufruf ist es möglich die "sektion" einer ini-datei auszulesen... und in einen string zu übergeben!
The format of the returned keys and values is one or more null-terminated strings, followed by a final null character
z.b.
- [section_1]
value1=1
test=4
value2=2
value3=3
Code: Alles auswählen
buffer.s=Space(32767)
size.l=32767
sect.s="section_1"
path.s="C:\test\config.ini"
result.l =GetPrivateProfileSection_(@Sect, @Buffer, size, Path)
Debug buffer
value1=1 test=4 value2=2 value3=3
sondern nur die erste
value=1
meine frage ist natürlich ....
was mache ich falsch?
Grüsse
JPD
anbei die infos über diesen api aufruf im MSDN:
DWORD GetProfileSection(
LPCTSTR lpAppName, // address of section name
LPTSTR lpReturnedString, // address of return buffer
DWORD nSize // size of return buffer
);
Parameters
lpAppName
Pointer to a null-terminated string containing the section name in the WIN.INI file.
lpReturnedString
Pointer to a buffer that receives the keys and values associated with the named section. The buffer is filled with one or more null-terminated strings; the last string is followed by a second null character.
nSize
Specifies the size, in characters, of the buffer pointed to by the lpReturnedString parameter.