Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Last Chaos
You last visited: Today at 09:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Copile Problem mit NormadMemory.au3

Discussion on Copile Problem mit NormadMemory.au3 within the Last Chaos forum part of the MMORPGs category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 1
Received Thanks: 1
Copile Problem mit NormadMemory.au3

Ich hab mir die NormadMemory.au3 gedownloadet und in meinen Trainer eingebau. Der Funktioniert auch super, allerdings nur uncopiliert!! Sobald ich ihn compiliere geht er nicht mehr und der FEhler liegt leider in der NormadMemory.au3!!!!
Kann mit jemand helfen?
Schon mal vielen Danke für eventuelle Hilfe!!!!
Code:
Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

	If Not ProcessExists($iv_Pid) Then
		SetError(1)
        Return 0
	EndIf

	Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

	If @Error Then
        SetError(2)
        Return 0
    EndIf

	Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

	If @Error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf

	$ah_Handle[1] = $av_OpenProcess[0]

	Return $ah_Handle

EndFunc

Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

	If Not IsArray($ah_Handle) Then
		SetError(1)
        Return 0
	EndIf

	Local $v_Buffer = DllStructCreate($sv_Type)

	If @Error Then
		SetError(@Error + 1)
		Return 0
	EndIf

	DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

	If Not @Error Then
		Local $v_Value = DllStructGetData($v_Buffer, 1)
		Return $v_Value
	Else
		SetError(6)
        Return 0
	EndIf

EndFunc

Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

	If Not IsArray($ah_Handle) Then
		SetError(1)
        Return 0
	EndIf

	Local $v_Buffer = DllStructCreate($sv_Type)

	If @Error Then
		SetError(@Error + 1)
		Return 0
	Else
		DllStructSetData($v_Buffer, 1, $v_Data)
		If @Error Then
			SetError(6)
			Return 0
		EndIf
	EndIf

	DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

	If Not @Error Then
		Return 1
	Else
		SetError(7)
        Return 0
	EndIf

EndFunc

Func _MemoryClose($ah_Handle)

	If Not IsArray($ah_Handle) Then
		SetError(1)
        Return 0
	EndIf

	DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
	If Not @Error Then
		DllClose($ah_Handle[0])
		Return 1
	Else
		DllClose($ah_Handle[0])
		SetError(2)
        Return 0
	EndIf

EndFunc

Func _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')

	If IsArray($av_Offset) Then
		If IsArray($ah_Handle) Then
			Local $iv_PointerCount = UBound($av_Offset) - 1
		Else
			SetError(2)
			Return 0
		EndIf
	Else
		SetError(1)
		Return 0
	EndIf

	Local $iv_Data[2], $i
	Local $v_Buffer = DllStructCreate('dword')

	For $i = 0 to $iv_PointerCount

		If $i = $iv_PointerCount Then
			$v_Buffer = DllStructCreate($sv_Type)
			If @Error Then
				SetError(@Error + 2)
				Return 0
			EndIf

			$iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
			DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(7)
				Return 0
			EndIf

			$iv_Data[1] = DllStructGetData($v_Buffer, 1)

		ElseIf $i = 0 Then
			DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(7)
				Return 0
			EndIf

			$iv_Data[1] = DllStructGetData($v_Buffer, 1)

		Else
			$iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
			DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(7)
				Return 0
			EndIf

			$iv_Data[1] = DllStructGetData($v_Buffer, 1)

		EndIf

	Next

	$iv_Data[0] = $iv_Address

	Return $iv_Data

EndFunc

Func _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data, $sv_Type = 'dword')

	If IsArray($av_Offset) Then
		If IsArray($ah_Handle) Then
			Local $iv_PointerCount = UBound($av_Offset) - 1
		Else
			SetError(2)
			Return 0
		EndIf
	Else
		SetError(1)
		Return 0
	EndIf

	Local $iv_StructData, $i
	Local $v_Buffer = DllStructCreate('dword')

	For $i = 0 to $iv_PointerCount
		If $i = $iv_PointerCount Then
			$v_Buffer = DllStructCreate($sv_Type)
			If @Error Then
				SetError(@Error + 3)
				Return 0
			EndIf

			DllStructSetData($v_Buffer, 1, $v_Data)
			If @Error Then
				SetError(8)
				Return 0
			EndIf

			$iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
			DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(9)
				Return 0
			Else
				Return $iv_Address
			EndIf
		ElseIf $i = 0 Then
			DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(3)
				Return 0
			EndIf

			$iv_StructData = DllStructGetData($v_Buffer, 1)

		Else
			$iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
			DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
			If @Error Then
				SetError(3)
				Return 0
			EndIf

			$iv_StructData = DllStructGetData($v_Buffer, 1)

		EndIf
	Next

EndFunc
Die Komentare hab ich wegen dem Platz entfernt
Rex_capt is offline  
Thanks
1 User
Old 01/05/2011, 15:39   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Das gehört hier rein:

Falls du an der NomadMemory.au3 nichts geändert hast, liegt der Fehler nicht an der .au3.

#Closed
KDeluxe is offline  
Closed Thread


Similar Threads Similar Threads
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +1. The time now is 09:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.