; 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] |