Sign in to follow this  
Followers 0
FinalVersion

Partial Completion of WPM

5 posts in this topic

#1 ·  Posted (edited)

I'm getting the error 299, which according to MSDN is "Only part of a ReadProcessMemory or WriteProcessMemory request was completed.". I'm unsure what I've done wrong.

Also I'm using Windows 7 & running as Administrator.

$pMem = _MemVirtualAllocEx($hProc, 0, StringLen($SomeVar) + 1, $MEM_COMMIT, $PAGE_READWRITE)
If $pMem = 0 Then
    MsgBox(16, $Title, "Failed to allocate memory.")
    Exit
EndIf

$nBytes = 0
If _WinAPI_WriteProcessMemory($hProc, $pMem, $SomeVar, StringLen($SomeVar) + 1, $nBytes) = 0 Then
    MsgBox(0, $Title, "Failed to write to allocated memory." & @CRLF & @CRLF & "Error Code: " & _WinAPI_GetLastError())
    Exit
EndIf
Edited by FinalVersion

Share this post


Link to post
Share on other sites



#4 ·  Posted (edited)

_WinAPI_WriteProcessMemory($hProc, $pMem, $SomeVar, StringLen($SomeVar) + 1, $nBytes, "str")

*edit: copy and pasting stuff makes a mess :mellow:

Edited by Ascend4nt

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0