Size of int in nsis
Hi,
is it safe to assume that an int in nsis has always the size of 4 bytes? or is this platform dependet?
I have an NSDialog with a multiselection Listbox which I query in the following way:
(LB_GETSELITEMS places an array of ints at the given address)
I wonder if the addition of 4 to the current address will always give the correct result, even on a 64bit os for example?#get maximum of selected items
::Alloc $0
>SendMessage $ListBox ${LB_GETCOUNT} $0 $0 $itemCount
>#allocate memory for $itemCount integers
>IntOp $0 $itemCount * 4
System
Pop $address
>#place indices of selected items in the allocated memory
>SendMessage $ListBox ${LB_GETSELITEMS} $itemCount $address $selItemCount
>${For} $R1 1 $selItemCount
#get current index
System::Call "*$address(i .r1)"
MessageBox MB_OK "$1"
#move to next index
IntOp $address $address + 4
>${Next}
>System::Free $address
>