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:
Dim intvalue as Integer = 32 Dim GC As System.Runtime.InteropServices.GCHandle = System.Runtime.InteropServices.GCHandle.Alloc(intValue, System.Runtime.InteropServices.GCHandleType.Pinned) Dim ret As Integer = GC.AddrOfPinnedObject.ToInt32 GC.Free()




Reply With Quote