/[RomCheater]/trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs
ViewVC logotype

Diff of /trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs

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

--- trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2012/06/20 11:18:56	397
+++ trunk/Win32/Sojaner.MemoryScanner/MemoryScanner.cs	2012/06/20 12:16:34	398
@@ -72,10 +72,12 @@
         {
             try
             {
-                SafeWaitHandle handle = new SafeWaitHandle(m_hProcess, false);
+                SafeWaitHandle handle = new SafeWaitHandle(m_hProcess, true);
                 if (handle.IsInvalid) { return; }
-                if (handle.IsClosed) { return; }                
+                if (handle.IsClosed) { return; }
                 handle.Close();
+                handle = null;
+                m_hProcess = IntPtr.Zero;
                 //string stack_trace = System.Environment.StackTrace;
                 //int iRetValue;
                 //iRetValue = ProcessMemoryReaderApi.CloseHandle(m_hProcess);

 

  ViewVC Help
Powered by ViewVC 1.1.22