/[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/03 02:10:27	457
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/03 02:23:04	459
@@ -1430,11 +1430,26 @@
                     int count = (int)((MemoryRangeSize - MemoryRangeStart) / STEP_SIZE);
                     SearchResultWriter writer = new SearchResultWriter((int)(count), SearchGuid);
                     provider.OnBytesRead += new BaseEventHandler<OnBytesReadEventArgs>(search_provider_OnBytesRead);
-                    provider.ReadProcessMemoryAtOnce(MemoryRangeStart, (MemoryRangeSize - MemoryRangeStart), writer);
+                    if (SearchArgs.IsFirstSearch)
+                    {
+                        provider.ReadProcessMemoryAtOnce(MemoryRangeStart, (MemoryRangeSize - MemoryRangeStart), writer);
+                    }
+                    else
+                    {
+                        // need to get the address list
+                        using (SearchResultReader reader = new SearchResultReader(SearchGuid))
+                        {
+                            var addresses = reader.GetResultAddresses(SearchArgs, (IAcceptsProcessAndConfig)this, resultsprogress);
+                            foreach (var address in addresses)
+                            {
+                                provider.ReadProcessMemoryAtOnce(address, STEP_SIZE, writer);
+                            }
+                        }
+                    }
                     provider.CloseProvider();
                     if (SearchWorkerThread.CancellationPending)
                     {
-                        provider_st.Stop(); 
+                        provider_st.Stop();
                         st.Stop();
                         writer.CancelRequest();
                         writer.Dispose();

 

  ViewVC Help
Powered by ViewVC 1.1.22