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.
Statt eines Stringbuffers solltest Du Allocate Memory verwenden und anschießend z.B. Byteweise auslesen, bis 2 Chr(0) vorhanden waren. Danach kannste mit Stringfield oder sonstwas weiterarbeiten um an alle Werte zu kommen
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.