Esempio n. 1
0
    public byte[] Read(int offset, int size)
    {
        byte[] buffer = new byte[size];
        IntPtr numRead;

        if (!Available)
        {
            throw new ApplicationException("Process no longer available.");
        }

        ProcessMemoryApi.ReadProcessMemory(process.Handle, (IntPtr)offset, buffer, size, out numRead);

        return(buffer);
    }