Old 19th September 2010, 18:05   #1
Annihilatorrr
Junior Member
 
Join Date: Sep 2010
Posts: 2
buffer allocation question

Hi!
I`m studying an example http://nsis.sourceforge.net/WinSxS_Q...y_is_installed
There is line:
code:
System::Call '*(i 24,i 0,l,i 0,i 0)i.R1' ;

As I guess from here
It allocates the buffer and place
24, 0, <some large int>, 0, 0 and return pointer to int?
Also question - why 1st parameter = 24?

Thanks
Annihilatorrr is offline   Reply With Quote
Old 19th September 2010, 19:00   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx

Stu
Afrow UK is offline   Reply With Quote
Old 22nd September 2010, 13:33   #3
Annihilatorrr
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks, stu!
I guess that it is like
code:
int* R1 = (int*) calloc (1,sizeof(QueryAssemblyInfo))

Could you explain
code:
i0,l,i0,i0

in original script there is no space between 'i' and '0'. And why 'l' is used without value. I know it is 'large integer'. Is it 0 by default?

Ruslan
Annihilatorrr is offline   Reply With Quote
Old 22nd September 2010, 14:48   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
There should be a 0 there but perhaps System doesn't mind and uses 0 anyway. You don't need to have spaces; they are optional.

Stu
Afrow UK is offline   Reply With Quote
Old 22nd September 2010, 20:03   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
I'm not 100% sure if a missing 0 is the same as using 0, but I did not really care about the value of that field so I did not specify anything (That member is used for output, not input) The first two members (size and flags) need to be set correctly. Not sure if the last members for the manifest path needs to be 0 or not, but it does not hurt to set them

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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