I've got problem... im writing module for VB.net (declaring basic functions for trainers: reading, writing 2 bytes, 4 bytes and floating point values). Writing went easy, but im stuck at reading. Here's code of ReadALong function:
Code:
Public Function ReadALong(ByVal address As Integer, ByVal vBuffer As Long) As Long
Dim ReadBuffer As Long() = New Long(0) {}
If SetProcess(("WarRock")) Then
MemAPI.PeekLong(mGameProcess, address, ReadBuffer)
vBuffer = ReadBuffer(0)
Return vBuffer
Else
MsgBox("Warrock not found", MsgBoxStyle.Critical, "Error")
Exit Function
End If
End Function
i tried modifying it in multiple ways, but it always returns me 0. That means i cant make pointers, read any value... maybe here's some1 who can help me? I won't post code for PeekLong or SetProcess here, not yet for sure. When im done then i'll probably releasing this to public, so u can make trainers in VB.net, not only in VB 6