Wren Plugin for Xojo

VM.FromVMPtr Method

Casts Ptr gotten in Foreign method callback to VM class.

shared FromVMPtr(
   ctx as Ptr) as EinhugurWren.VM

Parameters

ctx
The Ptr to be converted to VM instance.

Returns

EinhugurWren.VM
VM instance.

Remarks

The Ptr must actually be from Foreign method callback, if you use this shared method for anything else then you will for sure get crash.

See Also

VM Class