Ptr.Structure

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

Ptr.String(offset As Integer = 0) As Structure

Supported for all project types and targets.

Converts the value referenced to by the pointer to a specific Structure type.

Sample Code

Given a structure, you can dereference it from a pointer like this:

Structure TestStruct
Value As Int64
End Structure
Var p As Ptr // assign an appropriate Ptr value
Var structVar As TestStruct = p.TestStruct

structVar.Value = 42