More questions
@Kon you changed
DllCall( "GetProcessAffinityMask", Int,hPr, Ptr, PAf, Ptr, SAf )
to
DllCall( "GetProcessAffinityMask", "Ptr",hPr, "Ptr",&PAf, "Ptr",&SAf )
which is 2 changes as far as i see
1: Changed type of variable hPR to ptr because as Coco also told me: Handles are pointers.
So in general i should use ptr when dealing with handles correct ?
2: You changed PAf and SAf to &PAf and &SAf. from what I've gather just reading around & indicates a pointer. So since the outputs is a pointer we are using the pointer indication on the variable.
You also inserted 2 extra lines
1: VarSetCapacity(PAf, 8, 0), VarSetCapacity(SAf, 8, 0)
So we are sure the Variables are Exactly 8bytes ( 64bits) which is the size of the affinity mask. When do i need to set that? is it a generally good thing or just for pointers ?
2: NumGet(PAf, 0, "Int64")
Because we are working with pointers so the variable contains an adress and not values. We use NumGet to get the actual value from where the pointer is pointing ?
Adress, ExtraToAddOnAdress, "TypeOfValueToGet"
Thank you for all the help im getting a bit closer to understand it i think
@Coco
Thank you for the explenation about the legacy part. I will adjust my code to be more correct