VB编程:利用地址偏移访问内存

1、运行效果


VB编程:利用地址偏移访问内存


2、程序代码;

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)


Private Sub Form_Load()

   Dim i As Long

   Dim j As Long

   i = 1234

   j = 4321

   CopyMemory ByVal VarPtr(i), ByVal VarPtr(i) - 4, 4

   Text1.Text = i

End Sub


上一篇:VB编程:传递指针变量


下一篇:please wait while windows configures microsoft visual studio&