|
may i ask how to write the memory completely succed?
in your programe it write like this. and why i can't use the same method?
If GUICtrlRead($CHK_FZ) <> IniRead($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_FREEZE_KEY, "0") Then
IniWrite($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_FREEZE_KEY, GUICtrlRead($CHK_FZ))
If GUICtrlRead($CHK_FZ) = 5 Then
MEMWRITE(10439036, 1)
EndIf
EndIf
Func MEMWRITE($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
it always show the same error.
like this
ERROR: MEMWRITE() called by a previous line with 2 arg(s). Min = 3. First previous line calling this Func is 3783.
Func MEMWRITE($IV_ADDRESS, $AH_HANDLE, $V_DATA, $SV_TYPE = "dword")
3783 is the line that MEMWRITE(10439036, 1) located
sorry prophet to peek into your code
|