diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-20 06:06:03 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-20 06:06:03 -0800 |
commit | e26ec99873f763f83df4fa8c75e3b80d6689350d (patch) | |
tree | 716b36ce9e63792f8f28f13b172292683cbba0d1 | |
parent | f609d75481da23c635c1884275a6e0366e871013 (diff) | |
download | psutil-e26ec99873f763f83df4fa8c75e3b80d6689350d.tar.gz |
types refactoring
-rw-r--r-- | psutil/arch/windows/ntextapi.h | 9 | ||||
-rw-r--r-- | psutil/arch/windows/process_handles.c | 2 | ||||
-rw-r--r-- | psutil/arch/windows/process_handles.h | 15 |
3 files changed, 9 insertions, 17 deletions
diff --git a/psutil/arch/windows/ntextapi.h b/psutil/arch/windows/ntextapi.h index e6a9d028..548c437c 100644 --- a/psutil/arch/windows/ntextapi.h +++ b/psutil/arch/windows/ntextapi.h @@ -260,6 +260,13 @@ typedef NTSTATUS (NTAPI *_NtQueryInformationProcess)( PDWORD ReturnLength ); +typedef NTSTATUS (NTAPI *_NtQuerySystemInformation)( + ULONG SystemInformationClass, + PVOID SystemInformation, + ULONG SystemInformationLength, + PULONG ReturnLength +); + typedef NTSTATUS (NTAPI *_NtSetInformationProcess)( HANDLE ProcessHandle, DWORD ProcessInformationClass, @@ -369,7 +376,7 @@ typedef enum _PROCESSINFOCLASS2 { * on module import. */ -NTQSI_PROC \ +_NtQuerySystemInformation \ psutil_NtQuerySystemInformation; _NtQueryInformationProcess \ diff --git a/psutil/arch/windows/process_handles.c b/psutil/arch/windows/process_handles.c index 89bc7d8f..4910f4ef 100644 --- a/psutil/arch/windows/process_handles.c +++ b/psutil/arch/windows/process_handles.c @@ -259,7 +259,7 @@ cleanup: } -DWORD +static DWORD psutil_create_thread() { DWORD dwWait = 0; diff --git a/psutil/arch/windows/process_handles.h b/psutil/arch/windows/process_handles.h index 050d6ec3..dc0b7655 100644 --- a/psutil/arch/windows/process_handles.h +++ b/psutil/arch/windows/process_handles.h @@ -30,21 +30,6 @@ #define HANDLE_TYPE_FILE 28 #define NTQO_TIMEOUT 100 -typedef NTSTATUS (NTAPI *_NtQuerySystemInformation)( - ULONG SystemInformationClass, - PVOID SystemInformation, - ULONG SystemInformationLength, - PULONG ReturnLength -); - -typedef NTSTATUS (NTAPI *_NtQueryObject)( - HANDLE ObjectHandle, - ULONG ObjectInformationClass, - PVOID ObjectInformation, - ULONG ObjectInformationLength, - PULONG ReturnLength -); - // Undocumented FILE_INFORMATION_CLASS: FileNameInformation static const SYSTEM_INFORMATION_CLASS SystemExtendedHandleInformation = (SYSTEM_INFORMATION_CLASS)64; |