From db9a5ce312175f8a9d46e91c7254bcb3671a1c2d Mon Sep 17 00:00:00 2001 From: wj32 Date: Thu, 24 Sep 2009 09:17:25 +0000 Subject: [PATCH] removed GetCurrentProcess, fixed CreateThread return value git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1935 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- trunk/ProcessHacker.Native/Api/Functions.cs | 5 +---- trunk/ProcessHacker/Components/ThreadList.cs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/trunk/ProcessHacker.Native/Api/Functions.cs b/trunk/ProcessHacker.Native/Api/Functions.cs index 563e6f7b9..1520ebdc9 100644 --- a/trunk/ProcessHacker.Native/Api/Functions.cs +++ b/trunk/ProcessHacker.Native/Api/Functions.cs @@ -868,9 +868,6 @@ namespace ProcessHacker.Native.Api [In] IntPtr ProcessHandle ); - [DllImport("kernel32.dll", SetLastError = true)] - public static extern int GetCurrentProcess(); - [DllImport("kernel32.dll", SetLastError = true)] public static extern int GetCurrentProcessId(); @@ -1928,7 +1925,7 @@ namespace ProcessHacker.Native.Api public static extern int GetThreadPriority([In] IntPtr ThreadHandle); [DllImport("kernel32.dll", SetLastError = true)] - public static extern int CreateThread( + public static extern IntPtr CreateThread( [In] [Optional] IntPtr ThreadAttributes, [In] int StackSize, [In] [MarshalAs(UnmanagedType.FunctionPtr)] ThreadStart StartAddress, diff --git a/trunk/ProcessHacker/Components/ThreadList.cs b/trunk/ProcessHacker/Components/ThreadList.cs index 33e631ec7..d5144b9b1 100644 --- a/trunk/ProcessHacker/Components/ThreadList.cs +++ b/trunk/ProcessHacker/Components/ThreadList.cs @@ -601,7 +601,7 @@ namespace ProcessHacker.Components } // Suspending PH threads is not a good idea :( - if (_pid == Win32.GetCurrentProcessId()) + if (_pid == ProcessHandle.GetCurrentId()) { if (!PhUtils.ShowConfirmMessage( "inspect",