Men hur hittar man adressen som en sruktur har???
Att hitta adressen till en Integer går.
Men till en struktur???
<code>
Dim X As Integer = 120
' Note: after beta 1, addresses are no
' longer placed in Integer values, but
' use the IntPtr type instead.
Dim AddressOfX As IntPtr
' Pin the variable
Dim gh As GCHandle
gh = GCHandle.Alloc(X, GCHandleType.Pinned)
' Return the address of the variable
AddressOfX = gh.AddrOfPinnedObject()
' Display the address
Console.WriteLine(AddressOfX)
' Free the handle when you're done with
' the address so the GC can do its job later
gh.Free()
</code>