Archive: buffer allocation question


buffer allocation question
Hi!
I`m studying an example http://nsis.sourceforge.net/WinSxS_Q...y_is_installed
There is line:

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

http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx

Stu


Thanks, stu!
I guess that it is like

int* R1 = (int*) calloc (1,sizeof(QueryAssemblyInfo))

Could you explain
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

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


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