/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 07:14:15	522
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 07:27:44	523
@@ -1421,353 +1421,354 @@
         //}
         #endregion
 
-        private void search_provider_OnBytesRead(OnBytesReadEventArgs e)
-        {
-            if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
-            SearchDataTypes sdt = SearchArgs.DataType;
-            bool unsigned = SearchArgs.IsUnsignedDataType;
-            int Last_Whole_Percent_Done = 0;
-            uint CurrentIndex = e.CurrentIndex;
-            if (e.UserState != null)
-            {
-                SearchResultWriter writer = (e.UserState as SearchResultWriter);
-                if (writer == null)
-                    throw new InvalidOperationException("writer cannot be null");
-
-               
-                using (MemoryStream ms = new MemoryStream(e.Data))
-                {
-                    using (BinaryReader br = new BinaryReader(ms))
-                    {
-                        while (br.BaseStream.Position < br.BaseStream.Length)
-                        {
-                            try
-                            {
-                                //if (e.ReportProgress)
-                                //{
-                                //    double double_percent_done = 100.0 * (double)((double)CurrentIndex / (double)e.TotalCount);
-                                //    int int_percent_done = (int)double_percent_done;
-                                //    int align_base = 100;
-                                //    int align_power = 1;
-                                //    int align = align_base * align_power;
-                                //    if (int_percent_done != Last_Whole_Percent_Done && (CurrentIndex % align) == 0)
-                                //    {
-                                //        string message = string.Format(" -> Reading Address: 0x{0:x8}", (CurrentIndex + MemoryRangeStart));
-                                //        UpdateProgress((int)double_percent_done, message);
-                                //        //new Action<int, string>(UpdateProgress).Invoke(int_percent_done, message);
-                                //        Last_Whole_Percent_Done = int_percent_done;
-                                //        if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
-                                //    }
-                                //}
+        #region old-code: private void search_provider_OnBytesRead(OnBytesReadEventArgs e)
+        //private void search_provider_OnBytesRead(OnBytesReadEventArgs e)
+        //{
+        //    if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
+        //    SearchDataTypes sdt = SearchArgs.DataType;
+        //    bool unsigned = SearchArgs.IsUnsignedDataType;
+        //    int Last_Whole_Percent_Done = 0;
+        //    uint CurrentIndex = e.CurrentIndex;
+        //    if (e.UserState != null)
+        //    {
+        //        SearchResultWriter writer = (e.UserState as SearchResultWriter);
+        //        if (writer == null)
+        //            throw new InvalidOperationException("writer cannot be null");               
+        //        using (MemoryStream ms = new MemoryStream(e.Data))
+        //        {
+        //            using (BinaryReader br = new BinaryReader(ms))
+        //            {
+        //                while (br.BaseStream.Position < br.BaseStream.Length)
+        //                {
+        //                    try
+        //                    {
+        //                        //if (e.ReportProgress)
+        //                        //{
+        //                        //    double double_percent_done = 100.0 * (double)((double)CurrentIndex / (double)e.TotalCount);
+        //                        //    int int_percent_done = (int)double_percent_done;
+        //                        //    int align_base = 100;
+        //                        //    int align_power = 1;
+        //                        //    int align = align_base * align_power;
+        //                        //    if (int_percent_done != Last_Whole_Percent_Done && (CurrentIndex % align) == 0)
+        //                        //    {
+        //                        //        string message = string.Format(" -> Reading Address: 0x{0:x8}", (CurrentIndex + MemoryRangeStart));
+        //                        //        UpdateProgress((int)double_percent_done, message);
+        //                        //        //new Action<int, string>(UpdateProgress).Invoke(int_percent_done, message);
+        //                        //        Last_Whole_Percent_Done = int_percent_done;
+        //                        //        if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
+        //                        //    }
+        //                        //}
 
-                                switch (sdt)
-                                {
-                                    case SearchDataTypes._8bits:
-                                        if (unsigned)
-                                        {
-                                            #region 8bits - unsigned
-                                            var Value = br.ReadByte();
-                                            using (_8bit_unsigned_comparer_ comparer = new _8bit_unsigned_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                byte value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToByte(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToByte(Value), value))
-                                                {
-                                                    writer.WriteResult<byte>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion                                            
-                                        }
-                                        else
-                                        {
-                                            #region 8bits - signed
-                                            var Value = br.ReadSByte();
-                                            using (_8bit_signed_comparer_ comparer = new _8bit_signed_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                sbyte value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToSByte(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToSByte(Value), value))
-                                                {
-                                                    writer.WriteResult<sbyte>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion                                              
-                                        } break;
-                                    case SearchDataTypes._16bits:
-                                        if (unsigned)
-                                        {
-                                            #region 16bits - unsigned
-                                            var Value = br.ReadUInt16();
-                                            using (_16bit_unsigned_comparer_ comparer = new _16bit_unsigned_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                ushort value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToUInt16(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToUInt16(Value), value))
-                                                {
-                                                    writer.WriteResult<ushort>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion
-                                        }
-                                        else
-                                        {
-                                            #region 16bits - signed
-                                            var Value = br.ReadInt16();
-                                            using (_16bit_signed_comparer_ comparer = new _16bit_signed_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                short value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToInt16(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToSByte(Value), value))
-                                                {
-                                                    writer.WriteResult<short>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion
-                                        } break;
-                                    case SearchDataTypes._32bits:
-                                        if (unsigned)
-                                        {
-                                            #region 32bits - unsigned
-                                            var Value = br.ReadUInt32();
-                                            using (_32bit_unsigned_comparer_ comparer = new _32bit_unsigned_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                uint value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToUInt32(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToUInt32(Value), value))
-                                                {
-                                                    writer.WriteResult<uint>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion                                            
-                                        }
-                                        else
-                                        {
-                                            #region 32bits - signed
-                                            var Value = br.ReadInt32();
-                                            using (_32bit_signed_comparer_ comparer = new _32bit_signed_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                int value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToInt32(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToInt32(Value), value))
-                                                {
-                                                    writer.WriteResult<int>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion
-                                        } break;
-                                    case SearchDataTypes._64bits:
-                                        if (unsigned)
-                                        {
-                                            #region 64bits - unsigned
-                                            var Value = br.ReadUInt64();
-                                            using (_64bit_unsigned_comparer_ comparer = new _64bit_unsigned_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                ulong value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToUInt64(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToUInt64(Value), value))
-                                                {
-                                                    writer.WriteResult<ulong>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion                                            
-                                        }
-                                        else
-                                        {
-                                            #region 64bits - signed
-                                            var Value = br.ReadInt64();
-                                            using (_64bit_signed_comparer_ comparer = new _64bit_signed_comparer_(SearchArgs, CurrentIndex))
-                                            {
-                                                long value = 0;
-                                                if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
-                                                {
-                                                    using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
-                                                    {
-                                                        try
-                                                        {
-                                                            gmp.OpenProvider();
-                                                            gmp.ReadMemory(CurrentIndex, out value);
-                                                            gmp.CloseProvider();
-                                                        }
-                                                        catch (Exception ex)
-                                                        {
-                                                            logger.VerboseError.WriteLine(ex.ToString());
-                                                        }
-                                                    }
-                                                    comparer.Value = value;
-                                                }
-                                                else
-                                                {
-                                                    value = Convert.ToInt64(SearchArgs.CompareStartValue);
-                                                    comparer.Value = value;
-                                                }
-                                                if (comparer.Compare(Convert.ToInt64(Value), value))
-                                                {
-                                                    writer.WriteResult<long>(comparer.Address, comparer.Value);
-                                                }
-                                            }
-                                            #endregion
-                                        } break;
-                                }
-                                if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
-                            }
-                            catch (EndOfStreamException) { }
+        //                        switch (sdt)
+        //                        {
+        //                            case SearchDataTypes._8bits:
+        //                                if (unsigned)
+        //                                {
+        //                                    #region 8bits - unsigned
+        //                                    var Value = br.ReadByte();
+        //                                    using (_8bit_unsigned_comparer_ comparer = new _8bit_unsigned_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        byte value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToByte(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToByte(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<byte>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion                                            
+        //                                }
+        //                                else
+        //                                {
+        //                                    #region 8bits - signed
+        //                                    var Value = br.ReadSByte();
+        //                                    using (_8bit_signed_comparer_ comparer = new _8bit_signed_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        sbyte value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToSByte(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToSByte(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<sbyte>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion                                              
+        //                                } break;
+        //                            case SearchDataTypes._16bits:
+        //                                if (unsigned)
+        //                                {
+        //                                    #region 16bits - unsigned
+        //                                    var Value = br.ReadUInt16();
+        //                                    using (_16bit_unsigned_comparer_ comparer = new _16bit_unsigned_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        ushort value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToUInt16(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToUInt16(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<ushort>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion
+        //                                }
+        //                                else
+        //                                {
+        //                                    #region 16bits - signed
+        //                                    var Value = br.ReadInt16();
+        //                                    using (_16bit_signed_comparer_ comparer = new _16bit_signed_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        short value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToInt16(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToSByte(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<short>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion
+        //                                } break;
+        //                            case SearchDataTypes._32bits:
+        //                                if (unsigned)
+        //                                {
+        //                                    #region 32bits - unsigned
+        //                                    var Value = br.ReadUInt32();
+        //                                    using (_32bit_unsigned_comparer_ comparer = new _32bit_unsigned_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        uint value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToUInt32(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToUInt32(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<uint>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion                                            
+        //                                }
+        //                                else
+        //                                {
+        //                                    #region 32bits - signed
+        //                                    var Value = br.ReadInt32();
+        //                                    using (_32bit_signed_comparer_ comparer = new _32bit_signed_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        int value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToInt32(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToInt32(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<int>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion
+        //                                } break;
+        //                            case SearchDataTypes._64bits:
+        //                                if (unsigned)
+        //                                {
+        //                                    #region 64bits - unsigned
+        //                                    var Value = br.ReadUInt64();
+        //                                    using (_64bit_unsigned_comparer_ comparer = new _64bit_unsigned_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        ulong value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToUInt64(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToUInt64(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<ulong>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion                                            
+        //                                }
+        //                                else
+        //                                {
+        //                                    #region 64bits - signed
+        //                                    var Value = br.ReadInt64();
+        //                                    using (_64bit_signed_comparer_ comparer = new _64bit_signed_comparer_(SearchArgs, CurrentIndex))
+        //                                    {
+        //                                        long value = 0;
+        //                                        if (SearchArgs.CompareValueType == CompareValueTypes.OldValue)
+        //                                        {
+        //                                            using (GenericMemoryProvider gmp = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
+        //                                            {
+        //                                                try
+        //                                                {
+        //                                                    gmp.OpenProvider();
+        //                                                    gmp.ReadMemory(CurrentIndex, out value);
+        //                                                    gmp.CloseProvider();
+        //                                                }
+        //                                                catch (Exception ex)
+        //                                                {
+        //                                                    logger.VerboseError.WriteLine(ex.ToString());
+        //                                                }
+        //                                            }
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        else
+        //                                        {
+        //                                            value = Convert.ToInt64(SearchArgs.CompareStartValue);
+        //                                            comparer.Value = value;
+        //                                        }
+        //                                        if (comparer.Compare(Convert.ToInt64(Value), value))
+        //                                        {
+        //                                            writer.WriteResult<long>(comparer.Address, comparer.Value);
+        //                                        }
+        //                                    }
+        //                                    #endregion
+        //                                } break;
+        //                        }
+        //                        if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
+        //                    }
+        //                    catch (EndOfStreamException) { }
                          
-                            uint size = 0;
-                            BitTools.SizeOf(sdt, out size);
-                            CurrentIndex += size;                          
-                        }
-                    }
-                }
-            }
-            if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
-        }
+        //                    uint size = 0;
+        //                    BitTools.SizeOf(sdt, out size);
+        //                    CurrentIndex += size;                          
+        //                }
+        //            }
+        //        }
+        //    }
+        //    if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
+        //}
+        #endregion
+
         private void SearchWorkerThread_DoWork(object sender, DoWorkEventArgs e)
         {
             try

 

  ViewVC Help
Powered by ViewVC 1.1.22