| || A function that returns the address, ie. pointer to, of the given variable name. Variable must be a declared variable, ie. not a component variable such as QForm.Caption |
Addr& = VARPTR(MyString$)
Addr& = VARPTR(MyArray(0)) 'be sure to reference the first element of your array
You can only get pointers to basic datatypes like INTEGER, SINGLE, DOUBLE. Pointers to Qobjects and components (like OBJPTR in visual basic) are not
Use UDTPTR for User Defined Types. Unlike C/C++, you cannot get a pointer of a member inside a
Also you cannot access an array pointer once the array is passed to a
SUB MySub (MyArray () AS INTEGER)
addr = VARPTR(MyArray(0)) '
doesn't recognize MyArray !
So if you want to fast copy data to your array using MEMCPY
then you will have to also pass the address of the array