object command ?

BlitzMax Forums/BlitzMax Beginners Area/object command ?

I should probably apologise for this in advance...
Extern
	Function BlitzObject:Object(handle:Int) = "bbHandleToObject"
	Function BlitzHandle:Int(obj:Object) = "bbHandleFromObject"
	Function BlitzHandleRelease(handle:Int) = "bbHandleRelease"
End Extern

Type test
	Field id
End Type

a:test = New test
a.id = 100

s$ = BlitzHandle(a)

Print s$

b:test = test(BlitzObject(Int(s)))
BlitzHandleRelease(Int(s))

Print b.id