0

Errors Can Be Found Underneath the Code!

The Base Code:

XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)

What I have NEW:

        uint num1;
        uint num2;
        uint num4;


        num1 = Convert.ToUInt32(textBox2.Text);
        num2 = Convert.ToUInt32(textBox3.Text);
        num4 = Convert.ToUInt32(textBox5.Text);
        byte[] num3;
        num3 = BitConverter.GetBytes(Convert.ToInt32(textBox3.Text));


        IXboxManager xbm = new XboxManager();
        IXboxConsole xbc = xbm.OpenConsole("textBox1.Text"); //Or Console Name in "" 
        IXboxDebugTarget xdt = xbc.DebugTarget;
        xdt.ConnectAsDebugger("XeDevMemPatcher", XboxDebugConnectFlags.Force); // this isn't always needed 
        IXboxDebugTarget.GetMemory(num1, num2, num3, out num4);

    }

ERRORS

1) The name 'Encoding' does not exist in the current context

2) The best overloaded method match for 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' has some invalid arguments

3) Argument 3: cannot convert from 'byte' to 'byte[]'

Source:

using System; using System.Windows.Forms;

namespace XDevkit { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

    private void button1_Click(object sender, EventArgs e)
    {
        IXboxManager xbm = new XboxManager();
        //IXboxConsole xbc = xbm.OpenConsole(xbm.DefaultConsole); // dev 
        IXboxConsole xbc = xbm.OpenConsole("textBox1.Text");
        IXboxDebugTarget xdt = xbc.DebugTarget;
        xdt.ConnectAsDebugger("XeDevMemPatcher", XboxDebugConnectFlags.Force);

    }

    private void button2_Click(object sender, EventArgs e)
    {
    uint num1 = Convert.ToUInt32(textBox2.Text);
    uint num2 = Convert.ToUInt32(textBox3.Text);
    byte[] num3 = Encoding.ASCII.GetBytes(textBox4.Text);
    uint num4 = Convert.ToUInt32(textBox5.Text);
    int num5 = Convert.ToInt32(textBox4.Text);

// ...

    if (num3.Length > 1) 
    {    
        IXboxManager xbm = new XboxManager();
        IXboxConsole xbc = xbm.OpenConsole("textBox1.Text");
        IXboxDebugTarget xdt = xbc.DebugTarget;
        xdt.ConnectAsDebugger("XeDevMemPatcher", XboxDebugConnectFlags.Force);
        IXboxDebugTarget.GetMemory(num1, num2, num3, out num4);
}

    private void button3_Click(object sender, EventArgs e)
    {
        string a;
        a = "textBox6.Text";

        IXboxManager xbm = new XboxManager();
        IXboxConsole xbc = xbm.OpenConsole(textBox1.Text);
        IXboxConsole.ScreenShot(a)

    }
}

}

CaffGeek
  • 21,856
  • 17
  • 100
  • 184
user1205336
  • 15
  • 1
  • 5
  • What is that answeredanswered? – chaliasos Jun 21 '12 at 20:09
  • 2
    @Schaliasos, for some reason, the user edited their question to mark that it was answered by replacing everything with "Answered" text, I rolled it back – CaffGeek Jun 21 '12 at 20:11
  • I saw that twice to the same question just few minutes ago. @user1205336 you don't have to change your question after it is answered. This is very clear since you have accepted an answer – chaliasos Jun 21 '12 at 20:13

1 Answers1

0

Since the third argument to GetMemory is expecting a byte array, and your num3 variable is a byte array, you should just pass it as num3

As for Encoding not existing in the current context, you are likely just missing using System.Text

MrOBrian
  • 2,189
  • 16
  • 13
  • Ok I did that, now I am getting this error: -An object reference is required for the non-static field, method, or property 'XDevkit.IXboxDebugTarget.GetMemory(uint, uint, byte[], out uint)' ------------Updated OP------------ – user1205336 Jun 21 '12 at 19:58
  • 1
    you have `IXboxDebugTarget xdt = ...` so you should be using `xdt.GetMemory(...)` I would imagine – MrOBrian Jun 21 '12 at 20:05