SharpDisasm.Disassembler.Disassembler C# (CSharp) Method

Disassembler() public method

Prepares a new disassembler instance for the code located at the memory address provided. The instructions can then be disassembled with a call to Disassemble. The base address used to resolve relative addresses should be provided in address.
public Disassembler ( IntPtr codePtr, int codeLength, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System
codePtr System.IntPtr A pointer to memory to be disassembled.
codeLength int The maximum length to be disassembled.
architecture ArchitectureMode The architecture of the code (e.g. 64-bit, 32-bit or 16-bit).
address ulong The address of the first byte of code. This value is used to resolve relative addresses into absolute addresses while disassembling.
copyBinaryToInstruction bool Keeps a copy of the binary code for the instruction. This will increase the memory usage for each instruction. This is necessary if planning on using the option.
vendor Vendor What vendors to support for disassembly, default is Any. Other options are AMD or Intel.
return System
        public Disassembler(IntPtr codePtr, int codeLength, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any)
            : this(new AssemblyCodeMemory(codePtr, codeLength), architecture, address, copyBinaryToInstruction, vendor)
        {
            if (codePtr == IntPtr.Zero)
                throw new ArgumentOutOfRangeException("codePtr");
            if (codeLength <= 0)
                throw new ArgumentOutOfRangeException("codeLength", "Code length must be larger than 0.");
        }

Same methods

Disassembler::Disassembler ( IAssemblyCode code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System
Disassembler::Disassembler ( byte code, ArchitectureMode architecture, ulong address = 0x0, bool copyBinaryToInstruction = false, Vendor vendor = Vendor.Any ) : System