Go Back   Winamp Forums > Developer Center > NSIS Discussion

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 3rd July 2005, 21:38   #1
nechai
Guest
 
Posts: n/a
System::Call kernel32::GetPrivateProfileSectionNamesA

Hi,

I try to call 'kernel32::GetPrivateProfileSectionNamesA' with
'System::Call' to get all section names from an Inifile.

The API function returns a buffer with null-terminated strings.

I use the following code:

StrCpy $2 ${NSIS_MAX_STRLEN}
StrCpy $3 "Test.ini"
System::Call "kernel32::GetPrivateProfileSectionNamesA(t, i, t) i(.r1, r2, r3) .r4"

MessageBox MB_ICONEXCLAMATION|MB_OK "$1 $4"

$1 contains only the first section name. Is it possible to use something like shift on $1 to get the other parameters or does System::Call cut off itself the string at first nullchar.

Is there a way to use GetPrivateProfileSectionNamesA in NSIS or should I better use FileOpen, FileRead?

thx
nethai
  Reply With Quote
 
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump