VB Code:
  1. Dim ptr As IntPtr
  2.  
  3.         System.Runtime.InteropServices.Marshal.StructureToPtr(SomeStruct, ptr, True)