NTRDebuggerTool.Forms.MainForm.GetSearchMemorySize C# (CSharp) Method

GetSearchMemorySize() private method

private GetSearchMemorySize ( ) : uint
return uint
        internal uint GetSearchMemorySize()
        {
            return GetSearchMemorySize(ThreadEventDispatcher.CurrentSelectedDataType);
        }

Same methods

MainForm::GetSearchMemorySize ( DataTypeExact DataType ) : uint

Usage Example

        private void DoSearch()
        {
            Form.NTRConnection.SetCurrentOperationText = "Searching Memory";
            uint ProcessID = BitConverter.ToUInt32(Utilities.GetByteArrayFromByteString(CurrentSelectedProcess.Split('|')[0]), 0);
            uint StartAddress, MemorySize;

            if (CurrentMemoryRange.Equals("All"))
            {
                StartAddress = MemorySize = uint.MaxValue;
            }
            else
            {
                StartAddress = BitConverter.ToUInt32(Utilities.GetByteArrayFromByteString(Form.MemoryStart.Text).Reverse().ToArray(), 0);
                MemorySize   = BitConverter.ToUInt32(Utilities.GetByteArrayFromByteString(Form.MemorySize.Text).Reverse().ToArray(), 0);
            }

            if (Form.ResultsGrid.Rows.Count > 0 || Form.NTRConnection.AddressesFound.Count > 0)
            {
                MemorySize = Form.GetSearchMemorySize();
            }

            switch (CurrentSelectedDataType)
            {
            case 0:     //1 Byte
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, (byte)uint.Parse(Form.SearchValue.Text));
                break;

            case 1:     //2 Bytes
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, ushort.Parse(Form.SearchValue.Text));
                break;

            case 2:     //4 Bytes
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, uint.Parse(Form.SearchValue.Text));
                break;

            case 3:     //8 Bytes
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, ulong.Parse(Form.SearchValue.Text));
                break;

            case 4:     //Float
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, float.Parse(Form.SearchValue.Text));
                break;

            case 5:     //Double
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, double.Parse(Form.SearchValue.Text));
                break;

            case 6:     //Raw Bytes
                Form.NTRConnection.SendReadMemoryPacket(ProcessID, StartAddress, MemorySize, Utilities.GetByteArrayFromByteString(Form.SearchValue.Text));
                break;
            }
            Form.ControlEnabledSearchButton = true;
        }
All Usage Examples Of NTRDebuggerTool.Forms.MainForm::GetSearchMemorySize