Hi !
I need to read 3 bytes from a address in some application, however i cant because i dont have permissions for that.
I tried changing the permissions, i found some code on the internet and i edited it a bit so it looks like this:
However it doesnt work, i still cant read or write to the address im trying to change.
My VirtualProtectEx declaration:
Could someone help me with this ?
I need to read 3 bytes from a address in some application, however i cant because i dont have permissions for that.
I tried changing the permissions, i found some code on the internet and i edited it a bit so it looks like this:
Code:
For Each p As Process In Process.GetProcessesByName("ProcessName_Here")
Const PAGE_EXECUTE_READWRITE As Integer = &H40
Dim oldProtect As Integer
VirtualProtectEx(p.Handle, &Haddress_here, 3, PAGE_EXECUTE_READWRITE, oldProtect)
p.Dispose()
Next
My VirtualProtectEx declaration:
Code:
Declare Function VirtualProtectEx Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, ByVal dwSize As IntPtr, ByVal newProtect As Integer, ByRef oldProtect As Integer) As Boolean