Advertisement
TizzyT

Working with Pointers in VB.Net

Sep 27th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.37 KB | None | 0 0
  1. ' Declare a new variable for the structure from the pointer
  2. Dim Intercept As New <Structure>
  3.  
  4. ' Get the structure from memory pointer
  5. Intercept = Runtime.InteropServices.Marshal.PtrToStructure(<poniter>, GetType(<Structure>))
  6.  
  7. ' Write the modified structure back to the pointer location in memory
  8. Runtime.InteropServices.Marshal.StructureToPtr(Intercept, <pointer>, True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement