打印本文 打印本文 关闭窗口 关闭窗口
使用 Visual Basic 通过 32 位 地址访问内存(中英对照)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3544  更新时间:2009/4/23 16:38:16  文章录入:mintao  责任编辑:mintao
;  CopyMemory ByVal MemPointer, VarPtr(DataToWrite), SizeInBytes
 End Sub

------------end cut here---------------------------------------------------------------


Usage:

 To assign to a variable using memory:

  Dim ptrVariable As Long
  Dim xCounter As Long

  ptrVariable = VarPtr(ptrVariable)
  WriteMem ptrVariable, DefineWord, &HFFFF
   '''' Same as ptrVariable = &HFFFF


 To read from a Memory, use:

  ptrVariable = ReadMem(ptrVariable, DefineWord)


Wow, we got a Pointer and we can access them now, but if you time instructions, you
may be amazed that a raw Visual Basic Assignment Operations is much faster that
of the Direct Memory Assignment Operation, but what i am pointing out here is that
Memory can now be Accessed Using Visual Basic, and the global Idea of this is to
Read and Analyse not only the Variable, from this Downward, you can simply run through
running DLL by acquiring their memory addresses, equiped with modMemory.bas with
knowledge of Portable Executable format, Bingo, you can play with the DLL Body, See
how they process and best of all, Get a List of all of its Exported Functions; and
before i forgot, why not spy em out or even get a copy of their function body to
Disassembly purpose, all of which and more are accessible on Low Level Languages,
thats why C was declared as Industry Standard; Now you can write Visual Basic
Application that can performs like C, goodluck

 

- Chris Vega [gwapo@models.com]

上一页  [1] [2] [3] [4] 

打印本文 打印本文 关闭窗口 关闭窗口