I need to get a pointer to a variable i have declared so i can pass it to a structure(that is being passed to a api function)

Is this the best method do so?

VB Code:
  1. Dim intvalue as Integer = 32
  2.  
  3. Dim GC As System.Runtime.InteropServices.GCHandle = System.Runtime.InteropServices.GCHandle.Alloc(intValue, System.Runtime.InteropServices.GCHandleType.Pinned)
  4.  
  5. Dim ret As Integer = GC.AddrOfPinnedObject.ToInt32
  6.  
  7. GC.Free()