Ptr
From Xojo Documentation
A reference to a chunk of memory. You can pass a MemoryBlock object via this data type and it will be treated as a pointer to the memory contained within the MemoryBlock.
Methods | ||||||||||||||||||||
|
Notes
A Ptr is 4 bytes for 32-bit apps and 8 bytes for 64-bit apps.
You can compare one Ptr to another Ptr or to Nil.
You can convert the value referenced to by the pointer to a specific data type using the available methods.
You can assign a Ptr to a MemoryBlock.
You can convert the value referenced to by the pointer to a specific datatype using the Pointer Properties: Boolean, Byte, CFStringRef, Class, Color, CString, Currency, Double, Int16, Int32, Int64, Int8, Integer, Object, Ptr, Short, Single, String, UInt16, UInt32, UInt64, UInt8, Variant, WindowPtr, WString
Sample Code
p1 = AddressOf someMethod
p2 = someMemoryBlock // A Ptr to the MemoryBlock itself
p3 = someMemoryBlock.Ptr(n) // Retrieve Ptr stored within the MemoryBlock at offset n
Notes
You can compare one Ptr to another or to Nil.
See Also
AddressOf method; Declare statement; MemoryBlock class; MemoryBlock.Ptr function.