I have a good handle on vb.net programming, but im planning to expand my knowledge.
I feel like fooling around with some code, could someone shed some light on how I would fool around with memory address's on a process.
Posted 27 March 2008 - 03:33
Posted 27 March 2008 - 06:34
Posted 28 March 2008 - 02:05
x0r, on Mar 26 2008, 23:34, said:
Imports System Imports System.Diagnostics Imports System.ComponentModel Sub ReadMem() Dim myProcesses As Process = Process.GetProcessesByName(pinball) Dim memRead as String = myProcesses.ReadProcessMemory
Posted 28 March 2008 - 10:02
Dim pointer as IntPtr Dim number as Integer = 20 pointer = Marshal.AllocHGlobal(4) Marshal.WriteInt32(pointer, number)
Dim anotherInteger as Integer = Marshal.ReadInt32(pointer)
Dim message as String = "I know, I'm awesome..." Dim pointer as IntPtr = Marshal.StringToHGlobalAuto(message)
Dim anotherMessage as String = Marshal.PtrToStringAuto(pointer)
Public Structure MyStruct Dim x as Integer Dim y as Integer End Structure Dim structure1 as MyStruct structure1.x = 1 structure1.y = 2 Dim pointer = Marshal.AllocHGlobal(Marshal.SizeOf(structure1)) Marshal.StructureToPtr(structure1, pointer, True) Dim structure2 as MyStruct = Marshal.PtrToStructure(pointer, New MyStruct().GetType)
Public Class MyClass Public Name As String Public Age as Integer End Class Dim handle as GCHandle Dim person as MyClass person.Name = "Matthew Abbott" person.Age = 24 handle = GCHandle.Alloc(person)
Dim person2 as MyClass = handle.Target handle.Free()
Posted 01 April 2008 - 10:27
Public Static Class WINAPI Declare Static Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal pDst As IntPtr, ByVal pSrc As String, ByVal length As Long) End Class
Posted 30 May 2008 - 17:52