# RemoteBuf [v2.0]

Author: majkinetor, infogulch Last Modified: 20081225

Manipulates and extracts information from other programs memory. This can be useful to "hack" other games in example.

RemoteBuf_Close(ByRef H)
RemoteBuf_Get(ByRef H, pQ="adr")
RemoteBuf_Open(ByRef H, hwnd, size)
RemoteBuf_Read(ByRef H, ByRef pLocal, pSize, pOffset = 0)
RemoteBuf_Write(Byref H, byref pLocal, pSize, pOffset=0)

For more details of the functions's parameters and return value, please see it's source code or the document.

#### Remarks

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/viewtopic.php?t=12251

#### License

The functions is an open source item under the CC By-Nc 3.0 license. For details, please see http://creativecommons.org/licenses/by-nc/3.0/

#### Example

    ; #Include RemoteBuf.ahk
    ; Example by majkinetor
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

    ;get the handle of the Explorer window
       WinGet, hw, ID, ahk_class ExploreWClass

    ;open two buffers
       RemoteBuf_Open( hBuf1, hw, 128 )
       RemoteBuf_Open( hBuf2, hw, 16  )

    ;write something
       str := "1234"
       RemoteBuf_Write( hBuf1, str, strlen(str) )

       str := "_5678"
       RemoteBuf_Write( hBuf1, str, strlen(str), 4)

       str := "_testing"
       RemoteBuf_Write( hBuf2, str, strlen(str))

    ;read
       RemoteBuf_Read( hBuf1, str, 10 )
       out = %str%
       RemoteBuf_Read( hBuf2, str, 10 )
       out = %out%%str%

       MsgBox %out%

    ;close
       RemoteBuf_Close( hBuf1 )
       RemoteBuf_Close( hBuf2 )