Jump to content

Recommended Posts

Posted

I keep getting this message (sometimes, sometimes not):

_WinAPI_WriteProcessMemory: Only part of a ReadProcessMemory Or

WriteProcessMemory request was completed.

It happens when _MemWrite is called in Memory.au3

Func _MemWrite(ByRef $tMemMap, $pSrce, $pDest = 0, $iSize = 0, $sSrce = "ptr")
    Local $iWritten

    If $pDest = 0 Then $pDest = DllStructGetData($tMemMap, "Mem")
    If $iSize = 0 Then $iSize = DllStructGetData($tMemMap, "Size")
    Return _WinAPI_WriteProcessMemory(DllStructGetData($tMemMap, "hProc"), $pDest, $pSrce, $iSize, $iWritten, $sSrce)
EndFunc   ;==>_MemWrite

Is it my computer, or is there a general problem (I never have memory problems with any other programs)?

It's not meant for external use. Unless you know exactly what your doing, I'd quit now... :)
Posted

It's not me using Memory.au3. It is called from line 671 in GuiRichEdit.au3.

_MemWrite ($struct_MemMap, $TextRange_ptr)

Oh well -- And I donated $3 to Autoit yesterday, as an offering to the gods to try to get an answer.

:)

Posted

It's not me using Memory.au3. It is called from line 671 in GuiRichEdit.au3.

_MemWrite ($struct_MemMap, $TextRange_ptr)

Oh well -- And I donated $3 to Autoit yesterday, as an offering to the gods to try to get an answer.

:)

It might be worth reloading GuiRichEdit.au3 in case something is out of date with it because the one in gafrost's thread has that at line 670 not 671.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

@ToyleY

And if what Martin said doesn't fix the issue, post a small script which reproduces the problem, not just a snippet of some function which you think causes the problem (because if you need help, that often means your line of thinking isn't correct, otherwise you wouldn't need help to begin with :)). That greatly improves chances of getting help. Nothing's 100% guaranteed, but still, better chance.

"be smart, drink your wine"

  • 3 weeks later...
Posted

@syron

Since you found the include, I'm surprised you have not seen this from the same thread:

;Include my _Memory() functions
#include <Memory.au3>

;Get the process ID
Global $ProcessID = WinGetProcess("window_name");or however you want to get it

_ReadUsingPointers ()

Func _ReadUsingPointers ()
 
 ;define local variables
 Local $Data, $Pointer_1, $Pointer_2, $Pointer_3
 Local $StaticAddress = 0x6FBCBB60 ;input static address in hex
 Local $Offset1 = 56 ;enter offsets in decimal, not hex
 Local $Offset2 = 200
 Local $Offset3 = 40
 
 ;Open the process
 Local $DllHandle = _MemoryOpen($ProcessID)
 
 ;Read the process
 $Data = _MemoryRead($StaticAddress, $DllHandle)
 
 ;data returned is in decimal and must be combined
 ;with the offset for the next _MemoryRead().
 $Pointer_1 = '0x' & hex($Data + $Offset1)
 
 $Data = _MemoryRead($Pointer_1, $DllHandle)
 
 ;repeat
 $Pointer_2 = '0x' & hex($Data + $Offset2)
 
 $Data = _MemoryRead($Pointer_2, $DllHandle)
 
 ;repeat...
 $Pointer_3 = '0x' & hex($Data + $Offset3)
 
 $Data = _MemoryRead($Pointer_3, $DllHandle)
 ;continue repeating until you get to the desired data
 
 ;can use either way
 ;MsgBox(4096, "Data Read", $Data)
 MsgBox(4096, "Data Read", _MemoryRead($Pointer_3, $DllHandle))
 
 ;Close the process
 _MemoryClose($DllHandle)

EndFunc

http://www.autoitscript.com/forum/index.php?showtopic=28351

Or if you have already figured out your own solution, please do share...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...