>>321
こんな感じ
Public Function VarPtr(ByVal obj As Object) As Integer
Dim gch As GCHandle = GCHandle.Alloc(obj, GCHandleType.Pinned)
Dim address As Integer = gch.AddrOfPinnedObject().ToInt32()

gch.Free()
VarPtr = address
End Function