Hi there everyone!
My question is whats the difference between
CopyMemory ByVal VarPtr(a), ByVal VarPtr(b), 100
and
CopyMemory VarPtr(a), VarPtr(b), 100
They give different results.
Also, how do you get the address of an array? Thank you!!
Printable View
Hi there everyone!
My question is whats the difference between
CopyMemory ByVal VarPtr(a), ByVal VarPtr(b), 100
and
CopyMemory VarPtr(a), VarPtr(b), 100
They give different results.
Also, how do you get the address of an array? Thank you!!
Omitting ByVal means that the values are passed 'ByRef' as default.
ByVal means that the values of the variables can be used but not changed within the sub or function (or at least if they are, I believe they are passed back as the original value).
ByRef (default) means that the values of the variable can be changed in the sub or function and the altered value is passed back to the calling sub or function.
Hope I've explained that OK :)