Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

System.OverflowException Error [ReadProcessMemory]

I am getting an Overflow error, And I really don't understand why I am getting it.


[Image: Ud87XGO.png]

Code
//This is your offset, 0x432
Dim bSpotted As Integer = &H432

//This is our function
Private Function leet()
    Do
        For i As Integer = 1 To 64

            //This is an entity you read
            Dim dwEntity As UInteger
            ReadProcessMemory(hProcess, CByte(dwClient + dwEntityList + (&H10 * i)), dwEntity, 4, 0)
            
            //Entity not found?! SKIP!
            If Not dwEntity Then
                Continue For
            End If
            
            //Set target spotted, write 1
            WriteProcessMemory(hProcess, CByte(dwEntity + bSpotted), 1,  1, 0)
        Next i
    Loop
End Sub

thanks for helping! 🤝
CByte max value is 255
also check that u use the api with the right args
I am using this:

Code
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer

And for WPM:

Code
Public Declare Function WriteProcessMemory Lib "kernel32" ( _
    ByVal hProcess As Integer, _
    ByVal lpBaseAddress As Integer, _
    ByVal lpBuffer As String, _
    ByVal nSize As Integer, _
    ByRef lpNumberOfBytesWritten As Integer) As Integer
? anyone able to help me? thanks _)
https://msdn.microsoft.com/en-us/library/s2dy91zy.aspx

Quote:CByte
Byte Data Type (Visual Basic)
0 through 255 (unsigned);


Check the parameter you are using the byte in, it is not of the type byte. What type is it? Check the website I posted to find out that type ranges from -2,147,483,648 through 2,147,483,647.
FR1908
It looks like you have no idea what you're doing. The second param is an integer, so why converting to byte? Btw. I believe your bSpotted offset is wrong.

csgo hackz copypasta
"Never be a spectator of unfairness or stupidity. Seek out argument and disputation for their own sake; the grave will supply plenty of time for silence." - C.H.



Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by ProtectedOverrideOct 21, 2019 05:54 AM 21 554 Oct 21, 2019 05:54 AM
Last Post: ProtectedOverride
[C] by MalentorOct 30, 2017 01:24 PM 7 307 Oct 30, 2017 01:24 PM
Last Post: int main()
[C] by _Wozniak_Jun 9, 2015 08:16 AM 10 393 Jun 9, 2015 08:16 AM
Last Post: _Wozniak_