6 Replies - 787 Views - Last Post: 21 October 2009 - 08:28 AM Rate Topic: -----

#1 hack_tr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 09

Write memory Text Not Working ?!

Posted 17 October 2009 - 02:46 PM

I have a problem Hi i readtext vb.net, but I can also use VB6 does not work any error in writetext stops but does not write ... Why?

WriteText Code:

	Public Sub WriteText(ByVal lngAddress As Integer, ByVal strText As String)
		Dim hWnd As Object, processHandle As Object, processId As Integer
		Dim fixedStr As String = ""

		hWnd = FindWindow(vbNullString, CurrentProcess)
		If (hWnd = 0) Then Exit Sub

		GetWindowThreadProcessId(hWnd, processId)
		processHandle = OpenProcess(PROCESS_ALL_ACCESS, False, processId)
		fixedStr = strText & Chr(0)
		WriteProcessMemory(processHandle, lngAddress, fixedStr, Len(fixedStr), 0)
		CloseHandle(processHandle)
	End Sub


Functions :

	Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
	Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Integer, ByRef lpdwProcessId As Integer) As Integer
	Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
	Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddressAsAny As Integer, ByRef lpBufferAsAny As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
	Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddressAsAny As Integer, ByRef lpBufferAsAny As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
	Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
	Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParamAsAny As Integer) As Integer
	Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
	Private Declare Sub ReleaseCapture Lib "user32" 
	Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Integer, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Integer) As Integer
	Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As Integer
	Private Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Integer, ByRef lpAddressAsAny As Integer, ByVal dwSize As Integer, ByVal dwFreeType As Integer) As Integer
	Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Integer, ByRef lpThreadAttributes As Integer, ByVal dwStackSize As Integer, ByRef lpStartAddress As Integer, ByRef lpParameterAsAny As Integer, ByVal dwCreationFlags As Integer, ByRef lpThreadId As Integer) As Integer
	Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
	Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal lFlags As Integer, ByVal lProcessID As Integer) As Integer
	Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Integer
	Public Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Integer, ByVal lpProcName As String) As Integer
	Public Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Integer
	Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal Key As Integer) As Short
	Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)
	Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Integer, ByVal hWndNewParent As Integer) As Integer
	Dim CurrentProcess As String="Window Name"


Rate What's wrong?

Is This A Good Question/Topic? 0
  • +

Replies To: Write memory Text Not Working ?!

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 1959
  • View blog
  • Posts: 8,700
  • Joined: 29-May 08

Re: Write memory Text Not Working ?!

Posted 17 October 2009 - 02:55 PM

What are you attempting to do? What is the final purpose of your program?
Was This Post Helpful? 0
  • +
  • -

#3 hack_tr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 09

Re: Write memory Text Not Working ?!

Posted 17 October 2009 - 04:02 PM

For example, as a sample of a game let's hand Al ...
BMW M3 Game ...
Summer Time is in the game, I Renanaming -:--:-- More Posts -:--:-- The but can not change ...

programs have to find something so I got the game

This post has been edited by hack_tr: 17 October 2009 - 04:03 PM

Was This Post Helpful? 0
  • +
  • -

#4 hack_tr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 09

Re: Write memory Text Not Working ?!

Posted 19 October 2009 - 10:13 AM

Nobody does not know me Urgent Please Help Getting hiçmi Lazım Where is the problem?
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6487
  • View blog
  • Posts: 23,571
  • Joined: 12-June 08

Re: Write memory Text Not Working ?!

Posted 19 October 2009 - 11:30 AM

You are trying to over write the memory contents of a game?
Was This Post Helpful? 0
  • +
  • -

#6 hack_tr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 09

Re: Write memory Text Not Working ?!

Posted 19 October 2009 - 11:39 AM

Yes , But I can do in the game, with Verdi Example CE nothing happens when I use Code
Was This Post Helpful? 0
  • +
  • -

#7 hack_tr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 09

Re: Write memory Text Not Working ?!

Posted 21 October 2009 - 08:28 AM

Admins - Moderetors Help Me !
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1