Jump to content

Partial Completion of WPM


Recommended Posts

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
Link to comment
Share on other sites

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

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

Edited by Ascend4nt
Link to comment
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
 Share

  • Recently Browsing   0 members

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